function checkForm(TheForm) {
  // url, title, description
     if (TheForm.txtname.value.length == 0) {
   alert("Name can't be empty");
   TheForm.txtname.focus(); 
   return false;
  }
    if (TheForm.txthomephone.value.length == 0) {
   alert("Home Phone can't be empty");
   TheForm.txthomephone.focus(); 
   return false;
  }
  //if(isNaN(TheForm.txthomephone.value)) {
 // alert("Enter valid Home Phone");
  //TheForm.txthomephone.value="";
  //TheForm.txthomephone.focus();
  //return false;
 // }
   if (TheForm.txtworkphone.value.length == 0) {
   alert("Work Phone can't be empty");
   TheForm.txtworkphone.focus(); 
   return false;
  }
 // if(isNaN(TheForm.txtworkphone.value)) {
  //alert("Enter valid Work Phone");
  //TheForm.txtworkphone.value="";
 // TheForm.txtworkphone.focus();
 // return false;
 // }
   if(TheForm.txtemail.value.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) == -1)
  {
   alert("E-Mail can't be empty");
   TheForm.txtemail.value = "";
   TheForm.txtemail.focus();
   return false;
   }
   if (TheForm.txtreachtime.value.length == 0) {
   alert("Best reach time can't be empty");
   TheForm.txtreachtime.focus(); 
   return false;
  }
	 if (TheForm.txtcity.value.length == 0) {
   alert("City no can't be empty");
   TheForm.txtcity.focus(); 
   return false;
  	}
   	 if (TheForm.txtstate.value.length == 0) {
   alert("State can't be empty");
   TheForm.txtstate.focus(); 
   return false;
  	}
	 if (TheForm.txtannual.value.length == 0) {
   alert("Annual Household Income can't be empty");
   TheForm.txtannual.focus(); 
   return false;
  	}
	if (TheForm.txtcredit[0].checked == false && TheForm.txtcredit[1].checked == false && TheForm.txtcredit[2].checked == false && TheForm.txtcredit[3].checked == false && TheForm.txtcredit[4].checked == false)
  	{
	alert("Credit History can't be empty");
	return false;
  	}
   if (TheForm.txtloanamt.value.length == 0) {
   alert("Loan amount can't be empty");
   TheForm.txtloanamt.focus(); 
   return false;
  	}
	if (TheForm.txtloantype[0].checked == false && TheForm.txtloantype[1].checked == false && TheForm.txtloantype[2].checked == false && TheForm.txtloantype[3].checked == false && TheForm.txtloantype[4].checked == false && TheForm.txtloantype[5].checked == false && TheForm.txtloantype[6].checked == false && TheForm.txtloantype[7].checked == false)
  	{
	alert("Loan type can't be empty");
	return false;
  	}
	if (TheForm.txtloantype[7].checked == true)
	{
		if (TheForm.txtloanothers.value.length == 0) {
	   alert("Please specify loan type");
	   TheForm.txtloanothers.focus(); 
	   return false;
  		}
	}
	if (TheForm.txttimeframe[0].checked == false && TheForm.txttimeframe[1].checked == false && TheForm.txttimeframe[2].checked == false && TheForm.txttimeframe[3].checked == false)
  	{
	alert("Time frame can't be empty");
	return false;
  	}
	if (TheForm.txtrealtor[0].checked == false && TheForm.txtrealtor[1].checked == false && TheForm.txtrealtor[2].checked == false && TheForm.txtrealtor[3].checked == false)
  	{
	alert("Realtor information can't be empty");
	return false;
  	}
	if (TheForm.txtpice1.value.length == 0) {
   alert("Purchase price can't be empty");
   TheForm.txtpice1.focus(); 
   return false;
  	}	
	if (TheForm.txtpice2.value.length == 0) {
   alert("Purchase price can't be empty");
   TheForm.txtpice2.focus(); 
   return false;
  	}
	if (TheForm.txtdown1.value.length == 0) {
   alert("Down payment can't be empty");
   TheForm.txtdown1.focus(); 
   return false;
  	}	
	if (TheForm.txtdown2.value.length == 0) {
   alert("Down payment can't be empty");
   TheForm.txtdown2.focus(); 
   return false;
  	}
	if (TheForm.txtmonths.value.length == 0) {
   alert("Month of buying a home can't be empty");
   TheForm.txtmonths.focus(); 
   return false;
  	}	
	if (TheForm.txthomecity.value.length == 0) {
   alert("City of buying a home can't be empty");
   TheForm.txthomecity.focus(); 
   return false;
  	}
	if (TheForm.txthomestate.value.length == 0) {
   alert("State of buying a home can't be empty");
   TheForm.txthomestate.focus(); 
   return false;
  	}
  //You did not confirm that you have read and understood our privacy policy.
 return true;
}
function DynamicContent1(e)
{
	document.DropdownExample.txtloanothers.style.visibility = 'visible';
}
function DynamicContent2(e)
{
	document.DropdownExample.txtloanothers.style.visibility = 'hidden';
}
function bl()
{

//document.getElementById('others').style.display = 'none';
	document.DropdownExample.txtloanothers.style.visibility = 'hidden';

}
