// JavaScript disabilita taasto destro

function right(e) {
if (navigator.appName == 'Netscape' && 
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' && 
(event.button == 2 || event.button == 3)) {
alert("© Copyright 2006 - ® Emmecia S.r.l.");
return false;
}
return true;
}
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;

function MM_reloadPage(init) { //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

MM_reloadPage(true);
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 MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

// funzione controlla campi vuoti
function controllaUK()
	{
	var StrNome, StrCognome, StrTel, StrRichieste, StrAccetto, avviso;
	
	StrNome=document.form1.nome.value;
	StrCognome=document.form1.cognome.value;
	StrTel=document.form1.tel.value;
	StrRichieste=document.form1.richieste.value;
	StrAccetto=document.form1.accetto.value;
	avviso="";
	
		if (StrNome=="")
			{
			avviso="You must to compile the field Name\n";
			document.getElementById("cellanome").style.background="#EAEAEA";
			}
		else
			{
			document.getElementById("cellanome").style.background="#FFFFFF";
			}
			
		if (StrCognome=="")
			{
			avviso=avviso + "You must to compile the field Last name\n";
			document.getElementById("cellacognome").style.background="#EAEAEA";
			}
		else
			{
			document.getElementById("cellacognome").style.background="#FFFFFF";
			}
		
		if (StrTel=="")
			{
			avviso=avviso + "You must compile the field Phone\n";
			document.getElementById("cellatel").style.background="#EAEAEA";
			}
		else
			{
			document.getElementById("cellatel").style.background="#FFFFFF";
			}
			
		if (StrRichieste=="")
			{
			avviso=avviso + "You must to compile the field Demands\n";
			document.getElementById("cellarichieste").style.background="#EAEAEA";
			}
		else
			{
			document.getElementById("cellarichieste").style.background="#FFFFFF";
			}
			
		if  (document.form1.accetto.checked==false)
			{
	   		avviso=avviso + "You must to consent the treatman of your personal data\n";
			}

if (avviso=="")
			{document.form1.submit();}
		else
			{alert(avviso);}
	}
function controlla()
	{
	var StrNome, StrCognome, StrTel, StrRichieste, StrAccetto, avviso;
	
	StrNome=document.form1.nome.value;
	StrCognome=document.form1.cognome.value;
	StrTel=document.form1.tel.value;
	StrRichieste=document.form1.richieste.value;
	StrAccetto=document.form1.accetto.value;
	avviso="";
	
		if (StrNome=="")
			{
			avviso="Devi compilare il campo Nome\n";
			document.getElementById("cellanome").style.background="#EAEAEA";
			}
		else
			{
			document.getElementById("cellanome").style.background="#FFFFFF";
			}
			
		if (StrCognome=="")
			{
			avviso=avviso + "Devi compilare il campo Cognome\n";
			document.getElementById("cellacognome").style.background="#EAEAEA";
			}
		else
			{
			document.getElementById("cellacognome").style.background="#FFFFFF";
			}
		
		if (StrTel=="")
			{
			avviso=avviso + "Devi compilare il campo Telefono\n";
			document.getElementById("cellatel").style.background="#EAEAEA";
			}
		else
			{
			document.getElementById("cellatel").style.background="#FFFFFF";
			}
			
		if (StrRichieste=="")
			{
			avviso=avviso + "Devi compilare il campo Richieste\n";
			document.getElementById("cellarichieste").style.background="#EAEAEA";
			}
		else
			{
			document.getElementById("cellarichieste").style.background="#FFFFFF";
			}
			
		if  (document.form1.accetto.checked==false)
			{
	   		avviso=avviso + "Devi acconsentire al trattamento dei dati personali\n";
			}

if (avviso=="")
			{document.form1.submit();}
		else
			{alert(avviso);}
	}


function MM_openBrWindow(theURL,winName,features) { 
  window.open(theURL,winName,features);
}


