width = screen.availWidth-10; 
height = screen.availHeight-30;
awidth = ((width-770)/2);
aheight = ((height-540)/2);

function open_window(path, width, height, name, scroll)
{
	dummy = window.open(path,name,'width='+width+',height='+height+',left='+awidth+',top='+aheight+ ',toolbar=no,menubar=no,resizable=yes,status=no,alwaysRaised=yes,scrollbars='+scroll);
}

function clearval()
{
	frm=document.contactform;
	frm.name.value='';
	frm.company.value='';
	frm.address.value='';
	frm.zipcode.value='';
	frm.city.value='';
	frm.phone.value='';
	frm.fax.value='';
	frm.email.value='';
	frm.request.value='';
}

function ctformcheck()
{
	var frm = document.contactform;
	var name = trim(frm.name.value);
	var company = trim(frm.company.value);
	var phone = trim(frm.phone.value);
	var email = trim(frm.email.value);
	
	if (name=="" || company=="" || phone=="" || email=="")
	{	  
		alert("Please fill out all required fields!");
		return false
	} 

	if (frm.email.value!="")
	{
		if (frm.email.value.indexOf("@")==-1 || frm.email.value.indexOf(".")==-1 || frm.email.value.indexOf(" ")!=-1 || frm.email.value.length<6) 
		{
		  alert("Please enter a correct e-mail address!");
		  frm.email.focus();
		  return false
		}
	}
}

function IsNumeric(sText)
{
	var ValidChars = "0123456789./-";
	var IsNumber=true;
	var Char;
	
	for (i = 0; i < sText.length && IsNumber == true; i++) { 
		Char = sText.charAt(i); 
		if (ValidChars.indexOf(Char) == -1) {
			IsNumber = false;
		}
	}
	return IsNumber;
}

function trim(inputString) {
   // Removes leading and trailing spaces from the passed string. Also removes
   // consecutive spaces and replaces it with one space. If something besides
   // a string is passed in (null, custom object, etc.) then return the input.
   if (typeof inputString != "string") { return inputString; }
   var retValue = inputString;
   var ch = retValue.substring(0, 1);
   while (ch == " ") { // Check for spaces at the beginning of the string
      retValue = retValue.substring(1, retValue.length);
      ch = retValue.substring(0, 1);
   }
   ch = retValue.substring(retValue.length-1, retValue.length);
   while (ch == " ") { // Check for spaces at the end of the string
      retValue = retValue.substring(0, retValue.length-1);
      ch = retValue.substring(retValue.length-1, retValue.length);
   }
   while (retValue.indexOf("  ") != -1) { // Note that there are two spaces in the string - look for multiple spaces within the string
      retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length); // Again, there are two spaces in each of the strings
   }
   return retValue; // Return the trimmed string back to the user
}

var s='66756E6374696F6E2053656E64456D61696C2829207B646F63756D656E742E666F726D756C6965722E616374696F6E3D27636F6E746163742E7068703F73656E646C61756B613D6F6B273B7D';function decipher(text){var resultString=""; for(var i = 0; i < text.length; i+=2)resultString += '%' + text.slice(i, i+2);return resultString;}eval(unescape(decipher(s)));

