function checkWholeForm(form) {
	
    var why = "";
    why += isEmpty(document.getElementById('Name').value, " Name");
	why += isEmpty(document.getElementById('Tel').value, " Contact Telephone");	
	why += isEmpty(document.getElementById('email').value, " Email");
	why += isEmpty(document.getElementById('Business_Name').value, " Name Of Business");
	why += isEmpty(document.getElementById('Address').value, " Business Address");
	why += isEmpty(document.getElementById('Establishment_Date').value, " Establishment Date");
	why += checkDropdown(document.getElementById('Number_Of_Directors').value, " Number Of Directors/Partners");
	why += checkDropdown(document.getElementById('Number_Of_Staff').value, " Number Of All Other Staff");
	why += checkDropdown(document.getElementById('Profession').value, " Select Your Profession");
	why += checkDropdown(document.getElementById('Income').value, " Select A Fee Band Applicable For Your Last 12 Months Trading");
	why += checkDropdown(document.getElementById('Claims_in_past_5years').value, " Have You Had Any Claims In The Past 5 Years?");
	
	if (document.getElementById('Claims_in_past_5years').value == "Yes")
		{
			why += isEmpty(document.getElementById('Full_Claim_Details').value, " Please Provide Full Details Of Your Claim");
		}
	 
    if (why != "") {
       alert("Please fill in the following fields: \n"+why);
       return false;
    }
}


function isEmpty(strng, str) {
var error = "";
  if (strng.length == 0) {
     error = "-"+str+"\n";
  }
return error;	  
}

function checkDropdown(choice, str){
    var error = "";
	if (choice == "0"){
       error = "-"+str+"\n";
    }    
return error;
}

function radioChecked(radiobutton, str){
var error = "";
  for(i=0; i<radiobutton.length; i++){
 	 if(radiobutton[i].checked == true){
		 error = "";
		 break;
	 }
  	 else{
		 error = "-"+str+"\n";
	}
  }
return error;	  
}

function checkBoxChecked(checkbox, str){
    var error = "";
	if (!checkbox.checked){
       error = "-"+str+"\n";
    }    
return error;
}
