<!--
$('#box-login').corner("10px");

checkDataProfile = function(formName)	{
	var img = eval("document."+formName+".pFILE");

	img.style.background=inputNormalColor;
	
	if (img.value=="")	{
		alert ("Attenzione! Selezionare un'immagine.");
			img.focus();
			img.style.background=inputAlertColor;	
				return false;
	}
	if (img.value!="")	{
		imgExt = img.value.substr(img.value.lastIndexOf("."), img.value.length).toLowerCase();
		if ((imgExt!=".gif")&&(imgExt!=".jpg")&&(imgExt!=".jpeg")&&(imgExt!=".png"))	{
			alert ("Attenzione! Il formato " + imgExt + " non e' supportato. Usare solo immagini .gif, .jpg, .jpeg. e .png");
				img.focus();
				img.style.background=inputAlertColor;	
					return false;	
		}
	}
	return true;
}

checkDataUser = function(formName)	{
	var birthD = eval("document."+formName+".pDAY");
	var birthM = eval("document."+formName+".pMONTH");
	var birthY = eval("document."+formName+".pYEAR");
	var name = eval("document."+formName+".pNAME");
	var surname = eval("document."+formName+".pSURNAME");
	var address = eval("document."+formName+".pADDRESS");
	var zip = eval("document."+formName+".pZIP");
	var city = eval("document."+formName+".pCITY");
	var id_province = eval("document."+formName+".pID_PROVINCE");
	var phone1 = eval("document."+formName+".pPHONE1");
	var mail = eval("document."+formName+".pMAIL");
	var id_profession = eval("document."+formName+".pID_PROFESSION");
	var test = eval("document."+formName+".pTEST");
	
	birthD.style.background=inputNormalColor;
	birthM.style.background=inputNormalColor;
	birthY.style.background=inputNormalColor;
	name.style.background=inputNormalColor;
	surname.style.background=inputNormalColor;
	address.style.background=inputNormalColor;
	zip.style.background=inputNormalColor;
	city.style.background=inputNormalColor;
	id_province.style.background=inputNormalColor;
	phone1.style.background=inputNormalColor;
	mail.style.background=inputNormalColor;
	id_profession.style.background=inputNormalColor;

	if ((birthD.value==0) || (birthM.value==0) || (birthY.value==0)) {
		alert ("Attenzione! Selezionare una data di nascita.");
			birthD.focus();
			birthD.style.background=inputAlertColor;
			birthM.style.background=inputAlertColor;
			birthY.style.background=inputAlertColor;
				return false;
	}
	if (name.value=="")	{
		alert ("Attenzione! Inserire il nome.");
			name.focus();
			name.style.background=inputAlertColor;
				return false;
	}
	if (surname.value=="")	{
		alert ("Attenzione! Inserire il cognome.");
			surname.focus();
			surname.style.background=inputAlertColor;	
				return false;
	}
	if (address.value=="")	{
		alert ("Attenzione! Inserire l'indirizzo.");
			address.focus();
			address.style.background=inputAlertColor;	
				return false;
	}
	if (isNaN(zip.value))	{	
		alert ("Attenzione! Verificare il cap es: 20100.");
			zip.focus();
			zip.style.background=inputAlertColor;	
				return false;	
	}	
	if (zip.value=="")	{
		alert ("Attenzione! Inserire il cap es: 20100.");
			zip.focus();
			zip.style.background=inputAlertColor;	
				return false;
	}
	if (city.value=="")	{
		alert ("Attenzione! Inserire la citta\'.");
			city.focus();
			city.style.background=inputAlertColor;	
				return false;
	}
	if (id_province.value=="0")	{
		alert ("Attenzione! Selezionare la provincia e la regione.");
			id_province.focus();
			id_province.style.background=inputAlertColor;	
				return false;
	}
	if (isNaN(phone1.value))	{	
		alert ("Attenzione! Verificare il numero di telefono es: 0276767676.");
			phone1.focus();
			phone1.style.background=inputAlertColor;	
				return false;	
	}	
	if (phone1.value=="")	{	
		alert ("Attenzione! Inserire il numero di telefono es: 0276767676.");
			phone1.focus();
			phone1.style.background=inputAlertColor;	
				return false;	
	}
	if (mail.value=="")	{	
		alert ("Attenzione! Inserire l'e-mail.");
			mail.focus();
			mail.style.background=inputAlertColor;	
				return false;	
	}	
	if (mail.value!="")	{
		var x = mail.value;
		var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (!(filter.test(x)))	{
			alert ("Attenzione! Verificare l'e-mail.");
				mail.focus();
				mail.style.background=inputAlertColor;	
					return false;
		}
	}
	if (id_profession.value=="0")	{
		alert ("Attenzione! Selezionare la professione.");
			id_profession.focus();
			id_profession.style.background=inputAlertColor;	
				return false;
	}	
	if (test.value=="")	{
		vai = eval("document."+formName+".submit()");
	} else {
		document.write("Error");	
	}
	return true;
}
// -->
