function checkform() {
	if (document.form0.nome.value == "")						{alert("Il campo NOME è obbligatorio!");						document.form0.nome.focus();return false;};
	if (document.form0.cognome.value == "")         		 	{alert("Il campo COGNOME è obbligatorio!");       				document.form0.cognome.focus();return false;};
	
	var controllo = false;

	if (document.form0.professione.value == "")				{alert("Il campo PROFESSIONE è obbligatorio!");					document.form0.professione.focus();return false;};
	if (document.form0.indirizzo.value == "")          		{alert("Il campo INDIRIZZO è obbligatorio!");       			document.form0.indirizzo.focus();return false;};
	if (document.form0.citta.value == "")          			{alert("Il campo CITTA' è obbligatorio!");       				document.form0.citta.focus();return false;};
	if (document.form0.provincia.selectedIndex==0)          {alert("Il campo PROVINCIA è obbligatorio!");       			document.form0.provincia.focus();return false;};
	if (document.form0.cap.value == "")						{alert("Il campo CAP è obbligatorio!");       					document.form0.cap.focus();return false;};
	if (isNaN(document.form0.cap.value))					{alert("Il campo CAP è numerico!");       						document.form0.cap.focus();return false;};
	if ((document.form0.email.value.indexOf('@') == -1) || 	(document.form0.email.value.indexOf('.') == -1)) 	{alert("Il campo E-Mail non contiene un indirizzo valido!"); 				document.form0.email.focus();  return false;};
	if (document.form0.telefono.value == "") 				{alert("Il campo RECAPITO TELEFONICO è obbligatorio!");		document.form0.telefono.focus();   return false;};
	if (isNaN(document.form0.telefono.value)) 				{alert("Il campo RECAPITO TELEFONICO è numerico!"); 		document.form0.telefono.focus();   return false;};
	
	
	
	if(!document.form0.lunch[0].checked && !document.form0.lunch[1].checked) {
		alert("E' necessiare esprimere una preferenza in merito al TICKET LUNCH!");
		document.form0.lunch[0].focus();
		return false;
	}

	if (!document.getElementsByName('normativaprivacy')[0].checked) {
		alert("E' necessario autorizzare il TRATTAMENTO DEI DATI PERSONALI!");
		document.getElementsByName('normativaprivacy')[0].focus();
		return false;
	}
	
	if (!document.getElementsByName('liberatorialegale')[0].checked) {
		alert("E' necessario autorizzare la LIBERATORIA LEGALE!");
		document.getElementsByName('liberatorialegale')[0].focus();		
		return false;
	}
	
	return true;
}

function showdiv(div){	
	if (document.getElementById(div).style.display == 'none')	{
		document.getElementById(div).style.display='block';
	} else {
		document.getElementById(div).style.display='none';
	}
}

function portasu() {document.body.scrollTop; scrollTo(0,0);
}

function apri_foto(album)
{
	var altezza = (window.screen.height/2)-350;
	var larghezza = (window.screen.width/2)-350;
	window.open('gallery/foto.php?album='+album,'Foto','width=700,height=700,left='+ larghezza +',top='+ altezza +'');
}