<!--  PARMS  -->

<!--  STAMPA PARTE CENTRALE  -->
function stampa(ident) {
var testo = "<html><head><title>"+document.title+"</title><link rel=\"stylesheet\" href=\"../_css/style.css\" type=\"text/css\"></head>";
testo += "<body leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">";
testo += "<table width=\"100%\" border=\"0\"><tr><td>";
testo += document.getElementById('stampa').innerHTML+"</td></tr></table>";
testo += "</body></html>";
var ident_finestra = window.open("","finestra_stampa","height=500,width=500,left=5000");
ident_finestra.document.open();
ident_finestra.document.write(testo);
ident_finestra.document.close();
if(ident) {
ident_finestra.print();
ident_finestra.close();  

}
}


<!--  AGGIUNGI A PREFERITI  -->
var bookmarkurl="http://www.e-ars.it" 
var bookmarktitle=": : e-ars : : IL PORTALE INTERNET DELL'ARTE" 

function addbookmark(){ 
if (document.all) 
window.external.AddFavorite(bookmarkurl,bookmarktitle) 
} 




<!--  APRI POPUP  -->
function popup(Width,Height,Url,Features) {  // v4.01

x=(screen.availWidth-Width)/2
y=(screen.availHeight-Height)/2

window.open(Url,"","width="+Width+",height="+Height+","+Features+",left="+x+",top="+y);
}


<!--  APRI POPUP  per pagina immagine.htm -->
function PopupPic(sPicURL) { 
	window.open( "immagine.htm?"+sPicURL,"aaa","scrollbars=1,resizable=1,HEIGHT=200,WIDTH=200"); 
}




<!-- tutto minuscolo -->
function Check_LowerCase_Username()
{
document.registrazione.user.value = document.registrazione.user.value.toLowerCase();
}

<!-- toglie i bordi dalle img link dopo onclick -->
function noBorder(obj){
 if(!document.layers){
   obj.blur();
 }
}

<!-- FUNZIONE PER IL MENU AD ALBERO -->

<!--function mmenu(mID) {-->
<!--	var menu = document.getElementById(mID);-->
<!--	var display = menu.style.display;-->
<!--	menu.style.display = (display == "block") ? "none" : "block";-->
<!--}-->

<!--window.onload = function() {-->
<!--var uls = document.getElementsByTagName("ul");-->
<!--for (i=0;i<uls.length;i++) {-->
<!--if(uls[i].className=="submenu")uls[i].style.display = "none";}}-->
<!-- FINE FUNZIONE PER IL MENU AD ALBERO -->



<!-- FUNZIONE PER LA DATA -->
				function isnArray() {
				 argnr=isnArray.arguments.length
				 for (var i=0;i<argnr;i++) {
				 this[i+1] = isnArray.arguments[i];
				 }
				 }
				function getFullYear(d) {
				 var y = d.getYear();
				 if (y < 1000) y += 1900;
				 return y;
				}
				function getStdHour(S) {
				 var sh = S.getHours();
				 if (sh <= 24)
				 return sh;
				 else { return sh - 24;
				 }
				}
				function getStdMinutes(M) {
				 var min = M.getMinutes();
				 var x = "";
				 if (min <= 9){
				 x = '0' + min;
				 return x;
				 }
				 else { return min;
				 }
				}
				function getMeridiem(H) {
				 var th = H.getHours();
				 var m = "";
				 if (th >= 24)
					m = "&nbsp;&nbsp;";
				 else {
					m = "&nbsp;&nbsp;";
				 }
				 return m;
				}
				var isnMonths=new isnArray("Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic");
				today=new Date();
<!-- ------------------------ -->




<!-- --------------------- --> 
<!-- --------------------- --> 
<!-- ------Check Form inserimento oggetto--------- -->
<!-- --------------------- --> 
<!-- --------------------- --> 

function Form_Validator_Opere(theForm)
{

  if (theForm.ragionesociale.value == "")
  {
    alert("Il campo Ragione sociale è obbligatorio.");
    theForm.ragionesociale.focus();
    return (false);
  }

  if (theForm.descrizione.value == "")
  {
    alert("Il campo Descrizione dell'opera è obbligatorio.");
    theForm.descrizione.focus();
    return (false);
  }

  var checkOK = "0123456789-";
  var checkStr = theForm.prezzo.value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
  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;
    }
    allNum += ch;
  }
  if (!allValid)
  {
    alert("Inserire solo numeri nel campo Prezzo.");
    theForm.prezzo.focus();
    return (false);
  }

<!--    if (theForm.fascia.value == "-") -->
<!--  { -->
<!--    alert("Il campo Fascia di prezzo è obbligatorio."); -->
<!--    theForm.fascia.focus(); -->
<!--    return (false); -->
<!--  } -->

    if (theForm.cat.value == "-")
  {
    alert("Il campo Categoria dell'opera è obbligatorio.");
    theForm.cat.focus();
    return (false);
  }

    if (theForm.tecnica.value == "-")
  {
    alert("Il campo Tecnica dell'opera è obbligatorio.");
    theForm.tecnica.focus();
    return (false);
  }



  if (theForm.file.value == "")
  {
    alert("Il campo Foto è obbligatorio.");
    theForm.file.focus();
    return (false);
  }  
 
  return (true);
}
<!-- ------------------------ -->




<!-- --------------------- --> 
<!-- --------------------- --> 
<!-- ------Check Form registrazione Newsletter ------- -->
<!-- --------------------- --> 
<!-- --------------------- --> 

function Form_Validator_Newsletter(theForm)
{


  if (theForm.nome.value == "")
  {
    alert("Il campo Nome è obbligatorio.");
    theForm.nome.focus();
    return (false);
  }
<!-- --------------------- --> 
  if (theForm.cognome.value == "")
  {
    alert("Il campo Cognome è obbligatorio.");
    theForm.cognome.focus();
    return (false);
  }


    if (theForm.citta.value == "")
  {
    alert("Il campo Città è obbligatorio.");
    theForm.citta.focus();
    return (false);
  }


<!-- -----------email---------- -->  
  var EmailAddr = theForm.email.value;
   var Filtro = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;
   if   (Filtro.test(EmailAddr));
   else
   {
   alert("Inserire una e-mail corretta!");
	  theForm.email.focus();
    return (false);
   }
<!-- --------------------- --> 

<!-- ---------conferma email-------- --> 
  if (theForm.email.value != theForm.conferma_email.value)
  {
    alert("Il campo Conferma Email è obbligatorio.\n In questo campo bisogna inserire lo stesso \n indirizzo email del campo Email per confermare la \n correttezza dell'indirizzo Email");
    theForm.conferma_email.focus();
    return (false);
  }
<!-- --------------------- --> 


<!-- -------controllo user e lunghezza stringa--------- --> 
    if (theForm.user.value == "")
  {
    alert("Il campo Username è obbligatorio.");
    theForm.user.focus();
    return (false);
  }
 
  if ((theForm.user.value.length < 6 ) || (theForm.user.value.length >10 )) 
  {
    alert("L'Username deve essere di almeno 6 caratteri e massimo 10");
    theForm.user.focus();
    return (false);
  }
<!-- -------controllo password e lunghezza stringa--------- --> 
    if (theForm.password.value == "")
  {
    alert("Il campo Password è obbligatorio.");
    theForm.password.focus();
    return (false);
  }

  if ((theForm.password.value.length < 6 ) || (theForm.password.value.length >10 )) 
  {
    alert("La Password deve essere di almeno 6 caratteri e massimo 10");
    theForm.password.focus();
    return (false);
  }
<!-- --------------------- --> 
    if (theForm.privacy.checked);
	else
  {
    alert("Il campo Informativa sulla privacy è obbligatorio.");
    theForm.privacy.focus();
    return (false);
  }

 
  return (true);
}
<!-- ------------------------ -->







<!-- --------------------- --> 
<!-- --------------------- --> 
<!-- ------Check Form registrazione cliente------- -->
<!-- --------------------- --> 
<!-- --------------------- --> 

function Form_Validator_Cliente(theForm)
{

  if (theForm.ragionesociale.value == "")
  {
    alert("Il campo Ragione Sociale è obbligatorio.");
    theForm.ragionesociale.focus();
    return (false);
  }
<!-- --------------------- --> 

  if (theForm.nome.value == "")
  {
    alert("Il campo Nome è obbligatorio.");
    theForm.nome.focus();
    return (false);
  }
<!-- --------------------- --> 
  if (theForm.cognome.value == "")
  {
    alert("Il campo Cognome è obbligatorio.");
    theForm.cognome.focus();
    return (false);
  }
<!-- --------------------- -->   
    if (theForm.indirizzo.value == "")
  {
    alert("Il campo Indirizzo è obbligatorio.");
    theForm.indirizzo.focus();
    return (false);
  }
  
<!-- ----------- numero civico controllo esistenza e che sia un numero ---------- --> 
  if (theForm.numerocivico.value == "")
  {
    alert("Il campo Numero Civico è obbligatorio.");
    theForm.numerocivico.focus();
    return (false);
  }


<!-- --------------------- --> 


    if (theForm.citta.value == "")
  {
    alert("Il campo Città è obbligatorio.");
    theForm.citta.focus();
    return (false);
  }
<!-- --------------------- --> 
  if (theForm.provincia.value == "")
  {
    alert("Il campo Provincia è obbligatorio.\n if you are alien choose Non Italiana");
    theForm.provincia.focus();
    return (false);
  }
  
  <!-- --------------------- --> 
  if (theForm.regione.value == "")
  {
    alert("Il campo Regione è obbligatorio.\n if you are alien choose Non Italiana");
    theForm.regione.focus();
    return (false);
  }
  
<!-- --------------------- --> 


    if (theForm.cap.value == "")
  {
    alert("Il campo CAP è obbligatorio.");
    theForm.cap.focus();
    return (false);
  }

<!-- --------------------- --> 


    if (theForm.telefono.value == "")
  {
    alert("Il campo Telefono è obbligatorio.");
    theForm.telefono.focus();
    return (false);
  }

<!-- --------------------- --> 


    if (theForm.cellulare.value == "")
  {
    alert("Il campo Cellulare è obbligatorio. Se non si possiede un numero ripetere quello del telefono");
    theForm.cellulare.focus();
    return (false);
  }


<!-- -----------email---------- -->  
  var EmailAddr = theForm.email.value;
   var Filtro = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;
   if   (Filtro.test(EmailAddr));
   else
   {
   alert("Inserire una e-mail corretta!");
	  theForm.email.focus();
    return (false);
   }
<!-- --------------------- --> 

<!-- ---------conferma email-------- --> 
  if (theForm.email.value != theForm.conferma_email.value)
  {
    alert("Il campo Conferma Email è obbligatorio.\n In questo campo bisogna inserire lo stesso \n indirizzo email del campo Email per confermare la \n correttezza dell'indirizzo Email");
    theForm.conferma_email.focus();
    return (false);
  }
<!-- --------------------- --> 


<!-- -------controllo user e lunghezza stringa--------- --> 
    if (theForm.user.value == "")
  {
    alert("Il campo Username è obbligatorio.");
    theForm.user.focus();
    return (false);
  }
 
  if ((theForm.user.value.length < 6 ) || (theForm.user.value.length >10 )) 
  {
    alert("L'Username deve essere di almeno 6 caratteri e massimo 10");
    theForm.user.focus();
    return (false);
  }
<!-- -------controllo password e lunghezza stringa--------- --> 
    if (theForm.password.value == "")
  {
    alert("Il campo Password è obbligatorio.");
    theForm.password.focus();
    return (false);
  }

  if ((theForm.password.value.length < 6 ) || (theForm.password.value.length >10 )) 
  {
    alert("La Password deve essere di almeno 6 caratteri e massimo 10");
    theForm.password.focus();
    return (false);
  }
<!-- --------------------- --> 
    if (theForm.privacy.checked);
	else
  {
    alert("Il campo Informativa sulla privacy è obbligatorio.");
    theForm.privacy.focus();
    return (false);
  }

 
  return (true);
}
<!-- ------------------------ -->


