function fireControls(){
 	
	for (var i in formToValidate) {
    		var functioname = formToValidate[i];
      		if(!eval(functioname)){ return false; }
	}
  
  	try {
  	   if (document.getElementById("nationReg_formId").value=="" || document.getElementById("nationReg_formId").value=="empty" || document.getElementById("nationReg_formId").value=="undefined" || document.getElementById("nationReg_formId").value=="Nessuna" || document.getElementById("nationReg_formId").value=="Nessuno" || document.getElementById("nationReg_formId").value=="not found") {
		document.getElementById("nationReg_formId").value=="150";
  	   }  	   
  	} catch(e) { }  
  
  	return true;
  	//document.getElementById(nameform).submit();
}
 
/* verifica l'esistenza di almeno un carattere nella form */

function verifyText(element){
 	
	if ((element.value == "") || (element.value == "empty") || (element.value == "undefined") || (element.value == "Nessuna") || (element.value == "Nessuno")  || document.getElementById("nationReg_formId").value=="not found") {
    		alert("The field must be filled in!");
		element.style.backgroundColor = "lightYellow";
    		element.focus();

    		return false;
	}

 	element.style.backgroundColor = "white";

	return true;
}

function verifyEmail(element){

	var email_reg_exp = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+/;

	if (!email_reg_exp.test(element.value) || (element.value== "") || (element.value== "undefined")) {
		alert("The email address is not valid!");
		element.style.backgroundColor = "lightYellow";
    		element.focus();
    		return false;
  	}

 	element.style.backgroundColor = "white";
        
	return true;
}
