function CheckApplication(){
	var errorMsg = "";
	if (document.applicationfrm.firstname.value==""){
		errorMsg += "\n\tFirst Name \t- Enter your first Name";	
	}
	if (document.applicationfrm.surname.value == "") {
		errorMsg += "\n\tLast Name \t- Enter your surname";
	}
	if ((document.applicationfrm.pstreet1.value == "") || (document.applicationfrm.pcode.value == "")){ 
 		errorMsg += "\n\tPostal Address \t- Complete your postal address";
	}
	if (document.applicationfrm.rstreet1.value == ""){ 
 		errorMsg += "\n\tResidential Address - Complete your residential address";
	}
	if ((document.applicationfrm.wnum.value == "") || (document.applicationfrm.hnum.value == "") || (document.applicationfrm.cell.value == "")){ 
 		errorMsg += "\n\tTelephone \t- Enter a telephone number";
	}
	if (document.applicationfrm.id.value == "") { 
 		errorMsg += "\n\tID Number \t- Enter your identity number";
	}
	if ((document.applicationfrm.denied.value == "") || (document.applicationfrm.fault.value == "")){ 
 		errorMsg += "\n\tQuestions \t\t- Answer all questions";
	}
	if (errorMsg != ""){
		msg =  "______________________________________________________________\n\n";
		msg += "  Your application form has not been sent because there are\n"
		msg += "  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 SubmitApplication()
  {
    if ( CheckApplication() )
		document.applicationfrm.submit();
  }
