/* Funzione per cambiare colore alla cella */
function mOvr(src, color) { 
	if (!src.contains(event.fromElement)) { 
		src.style.cursor = 'hand'; 
		src.bgColor = color; 
		//src.fontcolor('#ff0000')
		//src.children.tags('A')[0]. = '#ff0000'
	}
}

function mOut(src, color) { 
	if (!src.contains(event.toElement)) { 
		src.style.cursor = 'default'; 
		src.bgColor = color; 
	}
}

function mClk(src) { 
	if(event.srcElement.tagName=='TD'){
		src.children.tags('A')[0].click();
	}
}

function validate(form, lang) {	
	if (form.Cognome.value=="") 
	{
		if (lang =="ita")
		{
			alert("Inserire il cognome!");
			return false; 
		}
		if (lang =="eng")
		{
			alert("Insert the surname!");
			return false; 
		}
		if (lang =="fra")
		{
			alert("Insert the surname!");
			return false; 
		}
	}
	
	
	if (form.Nome.value=="") 
	{
		if (lang =="ita")
		{
			alert("Inserire il nome!");
			return false; 
		}
		if (lang =="eng")
		{
			alert("Insert the name!");
			return false; 
		}
		if (lang =="fra")
		{
			alert("Insert the surname!");
			return false; 
		}
	}
		
	
	var s = form.Mail.value 
	
	if (s.search("@")== -1 || s.search(".")== -1)
	{
		if (lang =="ita")
		{
			alert("Inserire un indirizzo email corretto!");
			return false; 
		}
		if (lang =="eng")
		{
			alert("Insert a valid address email!");
			return false; 
		}
		if (lang =="fra")
		{
			alert("Inserire un indirizzo email corretto!");
			return false; 
		}
	}
		

	if (form.condizione.value == "nonaccetto") 
	{
		if (lang =="ita")
		{
			alert("Impossibile procedere se non si accettano\nle condizioni sulla tutela dei dati personali.");
			return false; 
		}
		if (lang =="eng")
		{
			alert("Impossible to proceed if the condition on the\nprotection of the personal data are not accept.");
			return false; 
		}
		if (lang =="fra")
		{
			alert("Impossibile procedere se non si accettano\nle condizioni sulla tutela dei dati personali.");
			return false; 
		}
	}
	
	else { return true; }
}