<!--


function ValidEmail(str) {



	Valid = false;






	if (str.length > 0) {



		if (str.indexOf(' ') > 0 || str.indexOf(',') > 0 || str.indexOf(';') > 0)



			return false;		



		



		at = str.indexOf('@');



		if (at > 0) {



			dot = str.indexOf('.',at);



			if (dot > (at + 1) && dot < str.length - 1)



				Valid = true;



		}			



	}



	return Valid;



}






function isEmpty(strng) {



	if (strng == null || strng == "") {



		return true;



	}



	for (i=0;i<strng.length;i++) {



		if (strng.charAt(i) != ' ')



			return false;



	}



	return true;



}
        
        
        
        function submitit() {



					var o = document.form1;



										if (isEmpty(o.name.value)) {



						alert('Please enter your name.');



						o.name.focus();				

                      return false;

					}
					
					
					
					else
					if (isEmpty(o.userkey.value)) {



						alert('Please enter password.');



						o.userkey.focus();				

                      return false;

					}



					
					
				
				else
					if (o.userkey.value != o.cuserkey.value)
					{
								alert('Password you entered does not mismatch.');

						o.userkey.value="";
						o.cuserkey.value="";

						o.userkey.focus();				

  return false;
					}
					
					else
					if (isEmpty(o.gender.value)) {



						alert('Please enter gender.');



						o.gender.focus();				

                      return false;

					}



else



					if (!ValidEmail(o.email.value)) {



						alert('Please enter a valid email address.');



						o.email.focus();



						o.email.select();



						o.email.focus();

return false;

					}


else
					if (isEmpty(o.correspondentad.value)) {



						alert('Please enter correspondent address.');



						o.correspondentad.focus();				

                      return false;

					}


else
					if (isEmpty(o.cphone.value)) {



						alert('Please enter contact phone.');



						o.cphone.focus();				

                      return false;

					}
else
					if (isEmpty(o.height.value)) {



						alert('Please enter height.');



						o.height.focus();				

                      return false;

					}




else
					if (isEmpty(o.occupation.value)) {



						alert('Please enter occupation.');



						o.occupation.focus();				

                      return false;

					}


else
					if (isEmpty(o.appearance.value)) {



						alert('Please enter appearance.');



						o.appearance.focus();				

                      return false;

					}

else
					if (isEmpty(o.education.value)) {



						alert('Please enter education.');



						o.education.focus();				

                      return false;

					}

else
					if (isEmpty(o.monthlyincome.value)) {



						alert('Please enter monthly income.');



						o.monthlyincome.focus();				

                      return false;

					}

else
					if (isEmpty(o.father.value)) {



						alert('Please enter name of father or guardian.');



						o.father.focus();				

                      return false;

					}

else
					if (isEmpty(o.agerange.value)) {



						alert('Please enter age range.');



						o.agerange.focus();				

                      return false;

					}


else
					if (isEmpty(o.heightrange.value)) {



						alert('Please enter height range.');



						o.heightrange.focus();				

                      return false;

					}
else
			 {



						o.submit();
                    return true;


					}				



				}





//-->
