<!--//
function validate(theForm){
	if(theForm.ASI.value == "" || theForm.ASI.value.length < 4 || IsNumeric(theForm.ASI.value)==false){
		alert("Please input your ASI number.");
		theForm.ASI.focus();
		return false;
	}
	if(theForm.Company.value == "" || theForm.Company.value.length < 2){
		alert("Please input your company name.");
		theForm.Company.focus();
		return false;
	}
	if (theForm.First_Name.value == "" || theForm.First_Name.value.length < 2){
		alert("Please enter your First Name.");
		theForm.First_Name.focus();
		return false;
	}
	if (theForm.Last_Name.value == "" || theForm.Last_Name.value.length < 2){
		alert("Please enter your Last Name.");
		theForm.Last_Name.focus();
		return false;
	}
	if(theForm.Address.value == "" || theForm.Address.value.length < 6){
		alert("Please enter your Address.");
		theForm.Address.focus();
		return false;
	}
	if(theForm.City.value == "" || theForm.City.value.length < 2){
		alert("Please enter your City.");
		theForm.City.focus();
		return false;
	}
	if(theForm.State.value == "" || theForm.State.value.length < 2){
		alert("Please enter your State.");
		theForm.State.focus();
		return false;
	}
	if(theForm.Zip.value == "" || theForm.Zip.value.length < 2){
		alert("Please enter your Postal Code.");
		theForm.Zip.focus();
		return false;
	}
	if(theForm.Country.value == "" || theForm.Country.value.length < 2){
		alert("Please enter your Country.");
		theForm.Country.focus();
		return false;
	}
	if(theForm.Phone.value == "" || theForm.Phone.value.length < 10){
		alert("Please enter your phone number.\r\n\r\ni.e. Area code, Prefix, and Suffix");
		theForm.Phone.focus();
		return false;
	}
	if (theForm.Email.value == "" || theForm.Email.value.indexOf('@',1)== -1 || theForm.Email.value.indexOf('.',2)==-1){
		alert("Please fill in your email address.");
		theForm.Email.focus();
		return false;
	}

	return true;
}

function validate_cont(theForm){
	if(theForm.Name.value == "" || theForm.Name.length < 5){
		alert("Please input your Full Name.");
		theForm.Name.focus();
		return false;
	}
	if(theForm.Company.value == "" || theForm.Company.value.length < 2){
		alert("Please input your Company name.");
		theForm.Company.focus();
		return false;
	}
	if(theForm.Zip.value == "" || theForm.Zip.value.length < 2){
		alert("Please enter your Postal Code.");
		theForm.Zip.focus();
		return false;
	}
	if(theForm.Phone.value == "" || theForm.Phone.value.length < 10){
		alert("Please enter your Phone Number.\r\n\r\ni.e. Area code, Prefix, and Suffix");
		theForm.Phone.focus();
		return false;
	}
	if (theForm.Email.value == "" || theForm.Email.value.indexOf('@',1)== -1 || theForm.Email.value.indexOf('.',2)==-1){
		alert("Please fill in your Email Address.");
		theForm.Email.focus();
		return false;
	}

	return true;
}

function IsNumeric(strString){
   var strValidChars = "0123456789.-";
   var strChar;
   var blnResult = true;

   if (strString.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++){
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1){
         blnResult = false;
      }
   }
   return blnResult;
}
//-->