function contactUsValid(theform){
 
	var total = theform.length;
	var div = document.getElementById("errorMessage");
	var errors = 0;
	var errorInclude = new Array();
	var errorMessage = new Array(4);
	errorMessage[0]="<li>You must complete the 'Name' field</li>";
	errorMessage[1]="<li>You must complete the 'Email' field</li>";
	errorMessage[2]="<li>You must complete the 'Contact Number' field</li>";
	errorMessage[3]="<li>You must complete the 'Query' field</li>";

		
	for(i = 0; i < (total - 1); i++){
		theform[i].style.backgroundColor = "";
		theform[i].style.border = "1px solid";
		//alert(theform[i].name + " " +i);
		if(theform[i].value == ""){
			theform[i].style.backgroundColor = "#ff7777";
			theform[i].style.border = "2px solid #bd2424";
			errorInclude = errorInclude.concat(errorMessage[i]);
			errors = 1;
		}
	}
	//alert(errors);
	if(errors == 1){
		var totalE = errorInclude.length;
		div.innerHTML = "<h4>Errors</h4><ul>" + errorInclude.join("") +"</ul>";
		div.style.backgroundColor = "#ff7777";
		div.style.border = "2px solid #bd2424";
		div.style.color = "#000";
		div.style.margin = "0px 0px 10px 10px";
		div.style.padding = "10px 10px 10px 20px";
		//alert(errors);
		return (false);
	}
}