function emptyvalidation(entered, alertbox)
{
	with (entered)
	{
		if (value==null || value=="") {
			if (alertbox!="") {
				alert(alertbox);
			} 
			return false;
		}
		else {
			return true;
		}
	}
}


function is_valid(thisform)
{
	with (thisform)
	{
		if (emptyvalidation(nom,"Vous devez remplir la ligne -- Nom -- ")==false) {
			nom.focus(); 
			return false;
		};

		if (emptyvalidation(prenom, "Vous devez remplir la ligne -- Prénom -- ")==false) {
			prenom.focus(); 
			return false;
		};

		if (emptyvalidation(email,"Vous devez remplir votre email")==false) {
			email.focus(); 
			return false;
		};

		if ((email.value.indexOf("@")>=0)&&(email.value.indexOf(".")>=0)) { 
		}else{
	    alert('email invalide');
		return false;
		}
	}
}

function printthis() {
	window.print();
	document.location='index.php?alert=1';
}
