
var clic=0;

function verifForm(formulaire) {	

	var checkfirstname=document.contactform.firstname.value;
	var checklastname=document.contactform.lastname.value;
	var checkphone=document.contactform.phone.value;
	var checkemail=document.contactform.email.value;
	var place=checkemail.indexOf("@",1);
	var point=checkemail.indexOf(".",place+1);
	var pass=true;

	if (checkfirstname=='' && pass) {
		alert("Your entry for \"First Name\" has not been recognised.\n\nPlease try again.");
		pass=false;
		document.contactform.firstname.focus();
	}
	
	if (checklastname=='' && pass) {
		alert("Your entry for \"Last Name/Surname\" has not been recognised.\n\nPlease try again.");
		pass=false;
		document.contactform.lastname.focus();			
	}	
	
	if (((place < 0) || (checkemail.length < 3) || (point < 0)) && pass) {
		alert("Your entry for \"E-mail\" has not been recognised.\n\nPlease try again.");
		pass=false;
		document.contactform.email.focus();			
	}

	if (checkphone=='' && pass) {
		alert("Your entry for \"Phone\" has not been recognised.\n\nPlease try again.");
		pass=false;
		document.contactform.phone.focus();			
	}
	
	if (pass) {
		if (clic == 0) {
			clic++;
			document.getElementById("submit").disabled = true;
			return true;
		}
		else {
			return false;
		}
	}
	
	else {
		return false;
	}
}
