<!--
function testForm() {
var reg = document.applyForm;
var regForm = document.applyForm;

var fName=reg.yourname;
var vfName=fName.value;
var password=reg.password;
var vpassword=reg.password.value;
var emailStr = reg.email.value;
var emailAdd = reg.email;
var company = reg.companyname;
var membership = reg.membership;
var payt = reg.payt;

// checks if the e-mail address is valid
if (emailStr == "") {
alert("Email is empty!!");
	emailAdd.select();
  	emailAdd.focus();
return false;
}

var emailPat = /^(\".*\"|[A-Za-z]\w*)@(\[\d{1,3}(\.\d{1,3}){3}]|[A-Za-z]\w*(\.[A-Za-z]\w*)+)$/;
var matchArray = emailStr.match(emailPat);

if (matchArray == null) {
alert("Your email address seems incorrect.  Please try again (check the '@' and '.' in the email address)");
	emailAdd.select();
  	emailAdd.focus();
return false;
}
// make sure the IP address domain is valid
var IPArray = matchArray[2].match(/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/);
if (IPArray != null) {
for (var i=1;i<=4;i++) {
if (IPArray[i]>255) {
alert("Destination IP address is invalid in the email!")
	emailAdd.select();
  	emailAdd.focus();
return false;
      }
   }
}

if ((password.value == ""))
		{
			alert("Please enter password.");
 			password.select();
  			password.focus();
		    return false;
		}

var str=vpassword;
for (var i = 0; i < str.length; i++) 
	{
 		 var ch = str.substring(i, i + 1);
 		 if ( ((ch < "a" || "z" < ch) && (ch < "A" || "Z" < ch) && (ch < "0" || "9" < ch) && (ch != '_')) )
{
   			alert("You can create a Password with a combination of only letters, numbers & underscore. No other characters will be accepted. Please type in a new password.");
 			password.select();
  			password.focus();
 			return false;
		  }
}
if ((password.value.length<4)||(password.value.length>12))
		{
			alert("Password should be minimum of 4 to maximum of 12 characters in length.");
		    return false;
		}


if ((company.value == "")||(company.value ==" "))
{
alert("Please enter Company Name.");
 			company.select();
  			company.focus();
    return false;
}
var str=company.value;
for (var i = 0; i < str.length; i++) 
	{
 		 var ch = str.substring(i, i + 1);
 		 if ( (ch < "a" || "z" < ch) && (ch < "A" || "Z" < ch) && (ch != " ") )
	{
   			alert("Please enter your correct Company Name. You can not type anything other than alphabets.");
 			company.select();
  			company.focus();
 			return false;
		  }

}

if ((fName.value == "")||(fName.value ==" "))
{
alert("Please enter Your Name.");
 			fName.select();
  			fName.focus();
    return false;
}
var str=vfName;
for (var i = 0; i < str.length; i++) 
	{
 		 var ch = str.substring(i, i + 1);
 		 if ( (ch < "a" || "z" < ch) && (ch < "A" || "Z" < ch) && (ch != " ")  )
	{
   			alert("Please enter your correct Name. You can not type anything other than alphabets.");
 			fName.select();
  			fName.focus();
 			return false;
		  }

}

if ((membership.value == "0"))
   {
      alert("Please select one of the Memberships.");
      membership.select();
  	  membership.focus();
      return false;
     }


if ((payt.value == "0"))
   {
      alert("Please select one of the Payment options.");
      payt.select();
  	  payt.focus();
      return false;
     }

reg.swap.disabled = true;
reg.action = "ApplyFormPro.asp";
reg.submit();
}
// -->
