function validate () { 

	//Initialise variables
	var errorMsg = "";

	//Check for a first name
	if (document.onlinefrm.fname.value == ""){
		errorMsg += "\n\tFirst Name \t- Enter your First Name";	
	}
	
	//Check for a last name
	if (document.onlinefrm.lname.value == ""){
		errorMsg += "\n\tLast Name \t- Enter your Last Name";
	}
	
	if (document.onlinefrm.address.value == ""){
		errorMsg += "\n\tAddress  \t\t- Enter your Address";
	}
	
	if (document.onlinefrm.pstcode.value == ""){
		errorMsg += "\n\tPost Code \t- Enter your Post Code";
	}
	
	if (document.onlinefrm.phone.value == ""){
		errorMsg += "\n\tPhone    \t\t- Enter your Phone Number";
	}
	
   if (document.onlinefrm.debtsNumber.value == "sel"){
		errorMsg += "\n\tTotal Creditors \t- Please select total number of creditors";
	}
	
//	if (document.onlinefrm.mobile.value == ""){
	//	errorMsg += "\n\tMobile   \t- Enter your Mobile Number";
	//}
	
		 	
	//Check for an e-mail address and that it is valid
//	if ((document.onlinefrm.email.value == "") || (document.onlinefrm.email.value.length > 0 && (document.onlinefrm.email.value.indexOf("@",0) == - 1 || document.onlinefrm.email.value.indexOf(".",0) == - 1))) { 
//		errorMsg += "\n\tE-mail Address  \t- Enter your valid e-mail address";
//	}
			
	//Check for an enquiry
	if (document.onlinefrm.crntdebt.value == "") { 
 		errorMsg += "\n\tDebt level \t- Enter Your Debt level";
	}
	
      frm=document.onlinefrm.pp;
   checked =frm.checked;

      if (!checked)
    {
       //alert("Not checked");
    errorMsg += "\n\tPrivacy Policy \t- Please read and agree to the privacy policy";
    }
   // else
   // {
   //  return false;
  //  }	
	
	//If there is aproblem with the form then display an error
	if (errorMsg != ""){
		msg = "______________________________________________________________\n\n";
		msg += "Your enquiry has not been sent because there are problem(s) with the form.\n";
		msg += "Please correct the problem(s) and re-submit the form.\n";
		msg += "______________________________________________________________\n\n";
		msg += "The following field(s) need to be corrected: -\n";
		
		errorMsg += alert(msg + errorMsg + "\n\n");
		return false;
	}
	
	return true;
}
// -->
function newwindow()
{
window.open('privacy_policy.asp','Privacy Policy','width=400,height=200')
}

