function validate()
{
 if (document.info_form.fname.value == "")
   {
      alert("Please enter your First Name");
      document.info_form.fname.focus();
      return false;
    }
 else if(!(CheckAlphabet(document.info_form.fname.value)))
	 {
	   alert ("Please Enter a Valid First Name  (eg.  A-Z,a-z).");
	   document.info_form.fname.focus();
	   return false;
	  }
    if (document.info_form.lname.value == "")
    {
        alert("Please enter your Last Name");
        document.info_form.lname.focus();
        return false;
    }
	else if(!(CheckAlphabet(document.info_form.lname.value)))
	 {
	   alert ("Please Enter a Valid Last Name  (eg.  A-Z,a-z).");
	   document.info_form.lname.focus();
	   return false;
	 }

	
 if ((document.info_form.month.value == ""))
	 {
        alert("Please select the Month you were born");
        document.info_form.month.focus();
        return false;
   }
   if ((document.info_form.date.value == ""))
	 {
        alert("Please select the Day you were born");
        document.info_form.date.focus();
        return false;
   }
     if ((document.info_form.year.value == ""))
	 {
        alert("Please select the Year you were born");
        document.info_form.year.focus();
        return false;
   }
   
  
  if ((document.info_form.mb1.value == ""))
      {
          alert("Please enter your Mobile Area Code");
          document.info_form.mb1.focus();
          return false;
      }
   else if(!(CheckDigits(document.info_form.mb1.value)))
  	 {
  	   alert ("Please Enter a Valid Mobile Area Code (eg.0-9).");
  	   document.info_form.mb1.focus();
  	   return false;
    }
    if ((document.info_form.mb2.value == ""))
  	 {
          alert("Please enter the First 3 digits of your Mobile Number");
          document.info_form.mb2.focus();
          return false;
      }
   else if(!(CheckDigits(document.info_form.mb2.value)))
  	 {
  	   alert ("Please correct the First 3 digits of your Mobile Number (eg.0-9).");
  	   document.info_form.mb2.focus();
  	   return false;
    }
    if ((document.info_form.mb3.value == ""))
  	 {
          alert("Please enter the Last 4 digits of your Mobile Number");
          document.info_form.mb3.focus();
          return false;
      }
  else if(!(CheckDigits(document.info_form.mb3.value)))
  	 {
  	   alert ("Please correct the Last 4 digits of your Mobile Number (eg.0-9).");
  	   document.info_form.mb3.focus();
  	   return false;
         }
  


         
  if (document.info_form.email.value == "")
	 {
	   alert("Please enter your Email");
	   document.info_form.email.focus();
	   return false;
         }
         
  if ((document.info_form.zip.value == ""))
	 {
        alert("Please enter your zip code");
        document.info_form.zip.focus();
        return false;
    }
 else if(!(CheckDigits(document.info_form.zip.value)))
	 {
	   alert ("Please correct your zip code (eg.0-9).");
	   document.info_form.zip.focus();
	   return false;     
	 }

  if ((document.info_form.terms.checked == false))	
   	{
  	   alert ("Please accept the Term & Conditions");
  	   return false;     
	 }

 }
 

function IsValid( oField )
{
  if (oField.name=='email')
    {
        re = /^(([a-z\._\-0-9])+\@([a-z\._\-0-9])+\.([a-z])+)?$/i;
        $sMsg = "E-Mail is invalid.\E-Mail should be in user@domain.com format."
    }
   if ( !re.test(oField.value) )
    {
        alert( $sMsg );
        //oField.value = '';
        oField.focus();
        return false;
    }
}

function CheckAlphabet(character) {
var valid = 1
character=character.toUpperCase();

var GoodChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ. "
var GoodChars1 = " "
var i = 0
if (character=="") {
// Return false if number is empty
valid = 0
}
for (i =0; i <= character.length -1; i++) {
if (GoodChars.indexOf(character.charAt(i)) == -1) {
// Note: Remove the comments from the following line to see this
// for loop in action.
// alert(character.charAt(i) + " is no good.")
valid = 0
} // End if statement

} // End for loop
return valid
}


function CheckDigits(TheNumber) {
var valid = 1
var GoodChars = "0123456789-+() "
var i = 0
if (TheNumber=="") {
// Return false if number is empty
valid = 0
}
for (i =0; i <= TheNumber.length -1; i++) {
if (GoodChars.indexOf(TheNumber.charAt(i)) == -1) {
// Note: Remove the comments from the following line to see this
// for loop in action.
// alert(TheNumber.charAt(i) + " is no good.")
valid = 0
} // End if statement
} // End for loop
return valid
}

function OpenWindow(URL) {


    window.open(URL,'_blank','scrollbars,left=75,top=75,width=800,height=800');	

}


