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.txtpropvalue[0].checked == false && TheForm.txtpropvalue[1].checked == false)
  	{
	alert("Property value can't be empty");
	return false;
  	}
	if (TheForm.txtpropvalue[0].checked == true)
  	{
			if (TheForm.txtpropamt.value.length == 0) {
	   		alert("Property amount can't be empty");
	  		 TheForm.txtpropamt.focus(); 
	  		 return false;
  			}
  	}
	if (TheForm.txtloanbalan1.value.length == 0) {
   alert("First Loan balance can't be empty");
   TheForm.txtloanbalan1.focus(); 
   return false;
  	}
	if (TheForm.txtreason[0].checked == false && TheForm.txtreason[1].checked == false && TheForm.txtreason[2].checked == false && TheForm.txtreason[3].checked == false && TheForm.txtreason[4].checked == false)
  	{
	alert("Refinance reason can't be empty");
	return false;
  	}
	if (TheForm.txtreason[3].checked == true)
  	{
			if (TheForm.txtneedcash.value.length == 0) {
	   		alert("Cash needed  can't be empty");
	  		 TheForm.txtneedcash.focus(); 
	  		 return false;
  			}
  	}
	if (TheForm.txtreason[4].checked == true)
  	{
			if (TheForm.txtreasonothers.value.length == 0) {
	   		alert("Other reasons can't be empty");
	  		 TheForm.txtreasonothers.focus(); 
	  		 return false;
  			}
  	}
	if (TheForm.txtcurrentloantype[0].checked == false && TheForm.txtcurrentloantype[1].checked == false && TheForm.txtcurrentloantype[2].checked == false)
  	{
	alert("Current loan type can't be empty");
	return false;
  	}
	if (TheForm.txtcurrentloantype[2].checked == true)
  	{
			if (TheForm.txtcurrenttypeothers.value.length == 0) {
	   		alert("Other current type can't be empty");
	  		 TheForm.txtcurrenttypeothers.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 DynamicContentAdjustment1(e)
{
	document.DropdownExample.txtpropamt.style.visibility = 'visible';
}
function DynamicContentAdjustment2(e)
{
	document.DropdownExample.txtpropamt.style.visibility = 'hidden';
}
function DynamicContentAdjustment3(e)
{
	document.DropdownExample.txtneedcash.style.visibility = 'visible';
	document.DropdownExample.txtreasonothers.style.visibility = 'hidden';
}
function DynamicContentAdjustment4(e)
{
	document.DropdownExample.txtreasonothers.style.visibility = 'visible';
	document.DropdownExample.txtneedcash.style.visibility = 'hidden';
}
function DynamicContentAdjustment5(e)
{
	document.DropdownExample.txtreasonothers.style.visibility = 'hidden';
	document.DropdownExample.txtneedcash.style.visibility = 'hidden';
}
function DynamicContentAdjustment6(e)
{
	document.DropdownExample.txtcurrenttypeothers.style.visibility = 'visible';
}
function DynamicContentAdjustment7(e)
{
	document.DropdownExample.txtcurrenttypeothers.style.visibility = 'hidden';
}

function bl()
{

//document.getElementById('others').style.display = 'none';
	document.DropdownExample.txtloanothers.style.visibility = 'hidden';
   document.DropdownExample.txtpropamt.style.visibility = 'hidden';
   document.DropdownExample.txtpropamt.value = "";
   document.DropdownExample.txtneedcash.style.visibility = 'hidden';
   document.DropdownExample.txtneedcash.value = "";
   document.DropdownExample.txtreasonothers.style.visibility = 'hidden';
   document.DropdownExample.txtreasonothers.value = "";
   document.DropdownExample.txtcurrenttypeothers.style.visibility = 'hidden';
   document.DropdownExample.txtcurrenttypeothers.value = "";
}
