// JavaScript Document

<!-- Hide from older browsers


function valButton(btn) {
    var cnt = -1;
    for (var i=btn.length-1; i > -1; i--) {
        if (btn[i].checked) {cnt = i; i = -1;}
    }
    if (cnt > -1) return btn[cnt].value;
    else return null;
}
//Check the enquiry form is filled in correctly
function CheckForm (contactForm) { 

	//Initialise variables
	var errorMsg = "";

	//Check for a name
	if (document.contactForm.name.value == ""){
		errorMsg += "\n\tPlease let us know your name. \t\t ";
	}


	
	//Check for an e-mail address and that it is valid
	if ((document.contactForm.email.value == "") || (document.contactForm.email.value.length > 0 && (document.contactForm.email.value.indexOf("@",0) == - 1 || document.contactForm.email.value.indexOf(".",0) == - 1))) { 
		errorMsg += "\n\tPlease provide us with an email address. \t ";
	}

	//Check for a comment
	if (document.contactForm.comment.value == "") { 
 		errorMsg += "\n\tPlease type in your question or comment. \t\t ";
	}


                 
			
	//If there is aproblem with the form then display an error
	if (errorMsg != ""){
		msg = "\n\n";
		msg += "Your comment / question has not been sent.\n";
		msg += "Please answer the question(s) and re-submit the form.\n";
		msg += "\n\n";
		msg += "The following question(s) need answers: \n";
		
		errorMsg += alert(msg + errorMsg + "\n\n");
		return false;
	}
	
	return true;
}
// --><!-- 
 -->
