<!--
/*
'°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
' Copyright (C) 2008 Mariano Di Maria.
' Tutti i diritti riservati.
' http://www.elabografica.com  -  Email: info@elabografica.com
'°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
	
'-------------------------------------------------------
' NOME:			supporto_it.js
'
' DESCRIZIONE:	Client side scripts
' DATA:			12/05/2009
'-------------------------------------------------------
*/

// function riempi() { 
//	if (window.screen) { 
//		var w = screen.availWidth; 
//		var h = screen.availHeight; 
//		window.moveTo(0, 0); 
//		window.resizeTo(w, h); 
//	} 
//} 

<!--
// FUNZIONE SALTA
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

//-->




// FUNZIONI ROLLOVER
<!--
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_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_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];}
}
//-->


//-->

// Gestore focus su textbox
function FocusTextBox(OBJ,BACKGROUND,TESTO){
	//Se IE5+ o NS6+
	if (document.documentElement){
		OBJ.style.backgroundColor=BACKGROUND;
		OBJ.style.color=TESTO;
	}
}
//-->

// CHIUDE LA FINESTRA

<!--

function winclose(URL){
	var wind;
	wind = window.close(URL);
					}	

// -->


// Pop-Up

<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->


// CONTROLLA LA COMPILAZIONE DEI CAMPI DEL FORM DI CONTATTACI
function risultatof(contattaci)
{


// Crea le variabili
var campo1 = document.contattaci.Nome
var campo2 = document.contattaci.Cognome
// var campo3 = document.contattaci.Indirizzo
// var campo4 = document.contattaci.Citta
// var campo5 = document.contattaci.Provincia
// var campo6 = document.contattaci.CAP
var campo3 = document.contattaci.Telefono
var campo4 = document.contattaci.Email



//// campo1 = document.contattaci.Nome -----------------------------------------------

  //if (document.contattaci.Nome.value == "")
  
  if (campo1.value == "")
  {
    alert("Inserire il Nome\.");
    campo1.focus();
    return (false);
  }

  if (campo1.value.length < 4)
  {
    alert("Compilare correttamente il campo Nome\.");
    campo1.focus();
    return (false);
  }

  if (campo1.value.length > 20)
  {
    alert("E' stato superato il massimo dei caratteri consentiti nel campo Nome\.");
    campo1.focus();
    return (false);
  }

  
//// campo2 = document.contattaci.Cognome -----------------------------------------------

  //if (document.contattaci.Nome.value == "")
  
  if (campo2.value == "")
  {
    alert("Inserire il Cognome\.");
    campo2.focus();
    return (false);
  }

  if (campo1.value.length < 4)
  {
    alert("Compilare correttamente il campo Cognome\.");
    campo2.focus();
    return (false);
  }

  if (campo2.value.length > 20)
  {
    alert("E' stato superato il massimo dei caratteri consentiti nel campo Cognome\.");
    campo2.focus();
    return (false);
  }


//// campo3 = document.contattaci.Telefono -------------------------------------
  
  if (campo3.value == "")
  {
    alert("Inserire il numero di telefono\.");
   campo3.focus();
    return (false);
  }

  if (campo3.value.length < 6)
  {
    alert("Compilare correttamente il numero telefonico\.");
    campo3.focus();
    return (false);
  }

  if (campo3.value.length > 20)
  {
    alert("E' stato superato il massimo dei numeri consentiti per il numero telefonico\.");
    campo3.focus();
    return (false);
  }

  var checkOK = "0123456789-";
  var checkStr = campo3.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Inserire prefisso e numero di telefono senza spazi\.");
    campo3.focus();
    return (false);
  }

//// campo4 = document.contattaci.Mail -------------------------------------
  
    if (campo4.value == "")
  {
    alert("Inserire la tua E-mail\.");
    campo4.focus();
    return (false);
  }

  if (campo4.value.length < 5)
  {
    alert("Compilare correttamente il campo E-mail\.");
    campo4.focus();
    return (false);
  }

  if (campo4.value.length > 40)
  {
    alert("E' stato superato il massimo dei caratteri consentiti per il campo E-mail\.");
    campo4.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-@_-?!&.";
  var checkStr = campo4.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Compilare correttamente i dati nel campo\.");
    campo4.focus();
    return (false);
  }

  return (true);
}  





