<!-- 
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function controlla(form) {
if (!document.form.consenso_newsletter.checked){
alert("E' necessario dare il consenso per la ricezione della newsletter");
return false;
  }

if(document.form.nome.value==""){
alert("Il campo NOME è obbligatorio!");
document.form.nome.focus();
return false;
}
if(document.form.cognome.value==""){
 alert("Il campo COGNOME è obbligatorio!");
 document.form.cognome.focus();
 return false;
 } 
 
/*if (document.form.sesso.value=="seleziona"){
alert("Il campo SESSO è obbligatorio!");
document.form.sesso.focus();
return false;
  }

if(document.form.anno.value==""){
alert("il campo ANNO DI NASCITA è obbligatorio!");
document.form.anno.focus();
return false;
}*/

p=form.email.value.indexOf('@');
	if (form.email.value == "")
  {
    alert("Il campo E-mail è obbligatorio.");
    form.email.focus();
    return false;
  }
	else if (p<1 || p==(form.email.value.length-1))
	{
	alert("Inserire un indirizzo E-mail valido.");
    form.email.focus();
    return false;
	}
	
if (document.form.categoria.value=="seleziona"){
alert("Il campo CATEGORIA è obbligatorio!");
document.form.categoria.focus();
return false;
}
else if ((document.form.categoria.value=="azienda")||(document.form.categoria.value=="enti_pa")){
		if(document.form.nome_azienda.value==""){
		alert("Il campo NOME AZIENDA/PUBBLICA AMMINISTRAZIONE è obbligatorio!");
		document.form.nome_azienda.focus();
		return false;
		}
		}
		else if (document.form.categoria.value=="professionista"){
		if(document.form.nome_studio.value==""){
		alert("Il campo NOME STUDIO è obbligatorio!");
		document.form.nome_studio.focus();
		return false;
		}
		}
	if(document.form.consenso_materiale.checked){
		 if(document.form.indirizzo.value==""){
			alert("Il campo INDIRIZZO è obbligatorio!");
			document.form.indirizzo.focus();
			return false;
			}
			if(document.form.numero_civico.value==""){
			alert("Il campo NUMERO è obbligatorio!");
			document.form.numero_civico.focus();
			return false;
			}
			if(document.form.citta.value==""){
			alert("Il campo CITTA' è obbligatorio!");
			document.form.citta.focus();
			return false;
			}
			if(document.form.cap_post.value==""){
			alert("Il campo CAP è obbligatorio!");
			document.form.cap_post.focus();
			return false;
			}
			if(document.form.provincia.value==""){
			alert("Il campo PROVINCIA è obbligatorio!");
			document.form.provincia.focus();
			return false;
			}
			
			if(document.form.telefono.value==""){
			alert("Il campo TELEFONO è obbligatorio!");
			document.form.telefono.focus();
			return false;
			}
		 
		}
if (!document.form.consenso_informativa.checked){
alert("E' necessario leggere e accettare l'informativa.");
return false;
}
return true;
}

function controlla_categoria(){
if(document.form.categoria.value=="privato"){
document.form.nome_azienda.disabled=true;
document.form.nome_studio.disabled=true;
}
else if(document.form.categoria.value=="azienda"){
	document.form.nome_azienda.disabled=false;
	document.form.nome_studio.disabled=true;
	}
else if(document.form.categoria.value=="enti_pa"){
	document.form.nome_azienda.disabled=false;
	document.form.nome_studio.disabled=true;
	}
else if(document.form.categoria.value=="professionista"){
	document.form.nome_azienda.disabled=true;
	document.form.nome_studio.disabled=false;
	}
else if(document.form.categoria.value=="seleziona"){
	document.form.nome_azienda.disabled=true;
	document.form.nome_studio.disabled=true;
	}
}

function attiva_altri_dati(){
if(document.form.consenso_materiale.checked){
document.form.indirizzo.disabled=false;
document.form.numero_civico.disabled=false;
document.form.citta.disabled=false;
document.form.cap_post.disabled=false;
document.form.provincia.disabled=false;
document.form.telefono.disabled=false;
document.form.fax.disabled=false;
document.form.cellulare.disabled=false;
}
else {
document.form.indirizzo.disabled=true;
document.form.numero_civico.disabled=true;
document.form.citta.disabled=true;
document.form.cap_post.disabled=true;
document.form.provincia.disabled=true;
document.form.telefono.disabled=true;
document.form.fax.disabled=true;
document.form.cellulare.disabled=true;
}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
-->

