<!--<script src="../include/validation.js"></script>

<script src="validation.js"></script>-->

<script language="javascript">



function show(divid,msgid)

{

 <? for($a=1;$a<11;$a++)

  {?> 

  document.getElementById("err<?=$a?>").style.display='none';

  document.getElementById("tip<?=$a?>").style.display='none';

<? }?>

  document.getElementById(divid).style.display='';

  

  if(divid=='tip1')

  {

     if(msgid=='1')

	document.getElementById('nametip').innerHTML='<?=_PLS_YR_FRSTNM1_?>';

	 

  }

   if(divid=='tip2')

  {

     if(msgid=='2')

	document.getElementById('nametip').innerHTML='<?=_PLS_YR_LSTNM1_?>!';

	 

  }

  

 

   if(divid=='tip3')

  {

     if(msgid=='1')

	document.getElementById('bdaytip').innerHTML='<?=_PLS_DOB1_?>';

	else if(msgid=='2')

	document.getElementById('bdaytip').innerHTML='<?=_PLS_DOB1_?>';  

	else

	document.getElementById('bdaytip').innerHTML='<?=_PLS_DOB1_?>';  

  }

  

}





function validate()

{

 



 

if(document.form1.fname.value=='') 

{

 document.getElementById("err1").style.display='';

 return false;

 }

 if(document.form1.lname.value=='') 

{

 document.getElementById("err2").style.display='';

 return false;

 }





  if(document.form1.day.value=='0') 

  

{

 document.getElementById("err3").style.display='';

 return false;

 }

  if(document.form1.month.value=='0') 

  

{

 document.getElementById("err3").style.display='';

 return false;

 }

  if(document.form1.year.value=='0') 

  

{

 document.getElementById("err3").style.display='';

 return false;

 }

  

  if(document.form1.country.value=='0') 

{

 document.getElementById("err4").style.display='';

 return false;

 }



 if(document.form1.uname.value=='') 

{

 document.getElementById("err5").style.display='';

 return false;

 }



 if(document.form1.password.value=='' || document.form1.password.value.length <'6' || document.form1.password.value.length >'20')

{ 

		document.getElementById("err6").style.display='';

		return false;

		

}

if(document.form1.password.value != document.form1.cpassword.value)

{

document.getElementById("err7").style.display='';



return false;

}

var email=document.form1.email;

	if (trim(email.value) == 0) {

		document.getElementById("err8").style.display='';

		

		return false;

	} else if (email.value.indexOf("@") < 0) {

		document.getElementById("err8").style.display='';

	

		return false;

	} else if (email.value.indexOf(".") < 0) {

		document.getElementById("err8").style.display='';

	

		return false;

	} else if (trim(email.value).indexOf(" ") >= 0) {

		document.getElementById("err8").style.display='';

		email.focus();

		return false;

	}

if(document.form1.email.value != document.form1.cemail.value)

{

document.getElementById("err9").style.display='';



return false;

}





	var captcha=trim(document.form1.security_code.value);

	if(is_empty(captcha))

	{

			document.getElementById("err10").style.display='';

		

		return false;

	}

	

	

	var checkbox1=document.form1.checkbox1;

	if (!checkbox1.checked) {

		alert("<?=_PLS_RDSLCT_DBTRMS_?>");

		checkbox1.focus();

		return false;

	}

var checkbox2=document.form1.checkbox2;

	if (!checkbox2.checked) {

		alert("<?=_PLS_RDSLCT_DBPRVC_?>");

		checkbox2.focus();

		return false;

	}



	 

 

  return true;

}

 

</script>



