function Validate1(x)
 {
 var retValue=false;
 var invalidChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$%^&*(){}|\':;?/<>,.@-+=[]~`_ ";
 var i;
  
for(i=0;i<invalidChars.length;i++)
 {
  if(x.indexOf(invalidChars.charAt(i))>-1)
  {
     retValue=true;
     break;
   }
 }
 
return retValue;
 }


function validate_bigform() {
		
		if (document.bigform.fname.value=="") {
		alert("Please enter First Name");
		document.bigform.fname.focus();
		return false;
		}
		if (document.bigform.lname.value=="") {
		alert("Please enter Last Name");
		document.bigform.lname.focus();
		return false;
		}
        if (document.bigform.address.value=="") {
		alert("Please enter Address");
		document.bigform.address.focus();
		return false;
		}
		if (document.bigform.city.value=="") {
		alert("Please enter City");
		document.bigform.city.focus();
		return false;
		}
		if (document.bigform.state.value=="") {
		alert("Please select State");
		document.bigform.state.focus();
		return false;
		}
		if (document.bigform.zip_code.value=="") {
			alert("Please Enter zip");
			document.bigform.zip_code.focus();
			return false;
			}
		if(isNaN(document.bigform.zip_code.value)) {
			alert("Please Enter a Valid Zip");
			document.bigform.zip_code.focus();
			return false;
			}

		if (document.bigform.email.value=="") {
				alert("Please Enter The email");
				document.bigform.email.select();
				document.bigform.email.focus();
				return false;
				}
				else {
					var evalue=document.bigform.email.value;
					var emailPat = /^(\".*\"|\w*)@(\[\d{1,3}(\.\d{1,3}){3}]|[A-Za-z]\w*(\.[A-Za-z]\w*)+)$/;
					var matchArray = evalue.match(emailPat);
					
					if(!emailPat.test(evalue))	{
						alert("Your email address is invalid.  Please try again !!");
						document.bigform.email.select();
						document.bigform.email.focus();
						return false;
						}
					}
         

			if( document.bigform.phone_1.value != '' &&  document.bigform.phone_2.value != '' && document.bigform.phone_3.value != '' ) {
				
				if ( Validate1(document.bigform.phone_1.value) || Validate1(document.bigform.phone_2.value) || Validate1(document.bigform.phone_3.value) ||  (document.bigform.phone_1.value.length) < 3 || document.bigform.phone_2.value.length < 3 || document.bigform.phone_3.value.length < 4)	{
					alert("Please Enter Phone Number");	
					document.bigform.phone_1.value="";
					document.bigform.phone_2.value="";
					document.bigform.phone_3.value="";
					document.bigform.phone_1.focus();
					return false;
				}
			}
				else {
					alert("Please Enter Phone number");
					document.bigform.phone_1.value="";
					document.bigform.phone_2.value="";
					document.bigform.phone_3.value="";
					document.bigform.phone_1.focus();
					return false;
					}



		    /*	if( document.bigform.w_phone_1.value != '' &&  document.bigform.w_phone_2.value != '' && document.bigform.w_phone_3.value != '' ) {
				
				if ( Validate1(document.bigform.w_phone_1.value) || Validate1(document.bigform.w_phone_2.value) || Validate1(document.bigform.w_phone_3.value) ||  (document.bigform.w_phone_1.value.length) < 3 || document.bigform.w_phone_2.value.length < 3 || document.bigform.w_phone_3.value.length < 4)	{
					alert("Please Enter Work Phone Number");	
					document.bigform.w_phone_1.value="";
					document.bigform.w_phone_2.value="";
					document.bigform.w_phone_3.value="";
					document.bigform.w_phone_1.focus();
					return false;
				}
			}
				else {
					alert("Please Enter Work Phone number");
					document.bigform.w_phone_1.value="";
					document.bigform.w_phone_2.value="";
					document.bigform.w_phone_3.value="";
					document.bigform.w_phone_1.focus();
					return false;
					}  */




/*			if(document.bigform.month.value=="") {
				alert("Please enter Month in your Date of Birth");
				document.bigform.month.focus();
				return false;
				}
			if(document.bigform.day.value=="") {
				alert("Please enter date in your Date of Birth");
				document.bigform.day.focus();
				return false;
				}
			if(document.bigform.year.value=="") {
				alert("Please enter year in your Date of Birth");
				document.bigform.year.focus();
				return false;
				}*/

				if(document.bigform.age.value=="") {
				alert("Please select your Age");
				document.bigform.age.focus();
				return false;
				}


         	if (document.bigform.Amount.value=="") {
				alert("Please select Investment Money Available:");
				document.bigform.Amount.focus();
				return false;
				}
			if (document.bigform.annual_income.value=="") {
				alert("Please select Annual Household Income");
				document.bigform.annual_income.focus();
				return false;
				}

/*				var objRegExp  = /^\([1-9]\d{2}\)\s?\d{3}\-\d{4}$/;
//				var objRegExp  = /^\d(*)\d(*)\d(*)$/;
				var strValue = document.bigform.annual_income.value;
				if (objRegExp.test(strValue)) {
				alert("Please enter Annual Household Income");
				document.bigform.annual_income.focus();
				return false;
				}

			if (document.bigform.money.checked == false && document.bigform.certificate.checked == false && document.bigform.mutual.checked == false && document.bigform.bonds.checked == false && document.bigform.annuities.checked == false && document.bigform.stocks.checked == false && document.bigform.life.checked == false)	{
				alert("Which of the following do you own?");
				return false;
			}

			if (document.bigform.growth.checked == false && document.bigform.safety.checked == false && document.bigform.liquidity.checked == false && document.bigform.income.checked == false && document.bigform.yield.checked == false && document.bigform.estate.checked == false && document.bigform.life.checked == false)	{
				alert("Among your retirement priorities, which of the following are most important to you?");
				return false;
			}*/

			if (document.bigform.purchase_plan.value=="") {
				alert("How soon do you plan to purchase an annuity?");
				document.bigform.purchase_plan.focus();
				return false;
				}
			if (document.bigform.funds_coming.value=="") {
				alert("Where are the funds coming from? ");
				document.bigform.funds_coming.focus();
				return false;
				}
			if (document.bigform.own.value=="") {
				alert(" Which of the following do you own? ");
				document.bigform.own.focus();
				return false;
				}
				//if (!(form1.prop[0].checked) && !(form1.prop[1].checked)) {
			if (!(document.bigform.investment_money_tax[0].checked) && !(document.bigform.investment_money_tax[1].checked)) {
				alert("Has your investment money been taxed?");
//				document.bigform.own.focus();
				return false;
				}
				if (document.bigform.retirement_priorities.value=="") {
				alert("Among your retirement priorities, which of the following are most important to you?");
				document.bigform.retirement_priorities.focus();
				return false;
				}





document.bigform.method = "post"
document.bigform.action = "http://www.annuitiesweb.com/cgi-bin/annuitiesweb/annuties-insert.cgi";
//document.bigform.action = "http://www.annuitiesweb.com/cgi-bin/annuitiesweb/annuties-insert-newform.cgi";

}


function PhoneMove(nLength, sMoveFrom, sMoveTo) {
	if (sMoveTo != '') {
		if (document.bigform[sMoveFrom].value.length >= nLength) {
			document.bigform[sMoveTo].focus();
		}

	}
}

function WorkPhoneMove(nLength, sMoveFrom, sMoveTo) {
	if (sMoveTo != '') {
		if (document.bigform[sMoveFrom].value.length >= nLength) {
			document.bigform[sMoveTo].focus();
		}

	}
}
