// JavaScript Document
//Function to check form is filled in correctly before submitting
function CheckForm() {

	var errorMsg = "";

	//Check for a Subject
	if (document.frmSendmail.subject.value == ""){
		errorMsg += "\n\tOGGETTO \t- Inserisci l'Oggetto nel modulo";	
	}
			
	//Check for the e-mail body
	if (document.frmSendmail.body.value==""){
		errorMsg += "\n\tMESSAGGIO \t- Inserisci il Messaggio nel modulo";		
	}	
		
	//If there is aproblem with the form then display an error
	if (errorMsg != ""){
		msg = "________________________________________________________________________________________\n\n";
		msg += "Non e' stato possibile inviare e-mail perche' ci sono stati dei problemi con il modulo.\n";
		msg += "Risolvi i problemi e rimanda e-mail.\n";
		msg += "_______________________________________________________________________________________\n\n";
		msg += "I seguenti campi hanno bisogno di correzioni: -\n";
		
		errorMsg += alert(msg + errorMsg + "\n\n");
		return false;
	}
	
	return true;
}
// -->
