// JavaScript Document
function addEvent(elm, evType, fn, useCapture)
// addEvent and removeEvent
// cross-browser event handling for IE5+,  NS6 and Mozilla

{
  if (elm.addEventListener){
    elm.addEventListener(evType, fn, useCapture);
    return true;
  } else if (elm.attachEvent){
    var r = elm.attachEvent("on"+evType, fn);
    return r;
  } else {
    alert("Handler could not be removed");
  }
} 


function prepareTextBoxes(){
 if (!document.getElementsByTagName) return;
 var oi=0;
 var thisObj;
 var objs = document.getElementsByTagName("input");


 for (oi=0;oi<objs.length;oi++) {
  thisObj = objs[oi];
  if(thisObj.getAttribute('type') == 'text'){
   thisObj.className = 'text ' + thisObj.className;
  }
 }
}

addEvent(window, "load", prepareTextBoxes);





function checkform(){



	

	
	
		if (document.myForm.fname.value.length < 1 ){
	document.getElementById("fnamebad").style.display='block';    
	alert("Please Write Your First Name Under General Information");
	document.myForm.fname.focus();
	return false;}
	
	

		if (document.myForm.lastname.value.length < 1 ){
	document.getElementById("lastnamebad").style.display='block';    
	alert("Please Write Your Last Name Under General Information");
	document.myForm.lastname.focus();
	return false;}	
	

		if (document.myForm.city.value.length < 1 ){
	document.getElementById("city").style.display='block';    
	alert("Please Write Your City Name Under General Information");
	document.myForm.city.focus();
	return false;}


		if (document.myForm.state.value.length < 1 ){
	document.getElementById("state").style.display='block';    
	alert("Please Select Your state Under General Information");
	document.myForm.state.focus();
	return false;}	
	
	
		if (document.myForm.age.value.length < 1 ){
	document.getElementById("age").style.display='block';    
	alert("Please enter Your age Under General Information");
	document.myForm.age.focus();
	return false;}
	
	
		if (document.myForm.gender.value.length < 1 ){
	document.getElementById("gender").style.display='block';    
	alert("Please Select Your Gender Under General Information");
	document.myForm.gender.focus();
	return false;}


		if (document.myForm.cell.value.length < 1 ){
	document.getElementById("cell").style.display='block';    
	alert("Please Enter Your Phone Number Under General Information");
	document.myForm.cell.focus();
	return false;}
	
		if (document.myForm.email.value.length < 1 ){
	document.getElementById("email").style.display='block';    
	alert("Please Enter Your Email Under General Information");
	document.myForm.email.focus();
	return false;}



		if (document.myForm.maritalstatus.value.length < 1 ){
	document.getElementById("maritalstatus").style.display='block';    
	alert("Please Write Your Marital Status Under Personal Information");
	document.myForm.maritalstatus.focus();
	return false;}
	

		if (document.myForm.Children.value.length < 1 ){
	document.getElementById("Children").style.display='block';    
	alert("Please Select The Number of Your childrens Under Personal Information");
	document.myForm.Children.focus();
	return false;}	
	
	
	
		if (document.myForm.Immigration_Status.value.length < 1 ){
	document.getElementById("Immigration_Status").style.display='block';    
	alert("Please Select Your Immigration Status Under Personal Information");
	document.myForm.Immigration_Status.focus();
	return false;}	

	
	
		if (document.myForm.Height.value.length < 1 ){
	document.getElementById("Height").style.display='block';    
	alert("Please Enter Your Height Under Personal Information");
	document.myForm.Height.focus();
	return false;}	
	
	
	
		if (document.myForm.Body_Type.value.length < 1 ){
	document.getElementById("Body_Type").style.display='block';    
	alert("Please Select Your Body Type Under Personal Information");
	document.myForm.Body_Type.focus();
	return false;}	
	

	
		if (document.myForm.Ethnicity.value.length < 1 ){
	document.getElementById("Ethnicity").style.display='block';    
	alert("Please Select Your Ethnicity Under Personal Information");
	document.myForm.Ethnicity.focus();
	return false;}	
	
	
			if (document.myForm.Education.value.length < 1 ){
	document.getElementById("Education").style.display='block';    
	alert("Please Select Your Education Under Personal Information");
	document.myForm.Education.focus();
	return false;}	
				
	
		if (document.myForm.Occupation.value.length < 1 ){
	document.getElementById("Occupation").style.display='block';    
	alert("Please Enter Your Occupation Under Personal Information");
	document.myForm.Occupation.focus();
	return false;}	
	


		
		if (document.myForm.Salary.value.length < 1 ){
	document.getElementById("Salary").style.display='block';    
	alert("Please Enter Your Salary Under Personal Information");
	document.myForm.Salary.focus();
	return false;}	

	if(!document.myForm.agree.checked){alert("Please Read And Agree On The Terms Of Services");
return false;} 

			if (document.myForm.Want.value.length < 1 ){
	document.getElementById("Want").style.display='block';    
	alert("Please Select Your Service Under You And Islamic Intros");
	document.myForm.Want.focus();
	return false;}	
	

	
	
	return true;
}
