
function alertUC(){
var content="Non ci sono altre news in Home Page"
alert(''+content)
}

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_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 showdiverr(idDiv,val){
if (val=="NO"){
	var d=document.getElementById(''+idDiv)
	d.style.visibility="visible"
	}
}
function showHidePic(idDiv,val){
var d=document.getElementById(''+idDiv)	
	if (val=="SHOW"){
	d.style.visibility="visible"
	}
	else{
	d.style.visibility="hidden"
	}
}

var popUpWin
var pop_new

function pop_point_museum(URL,ID,width,height,titolo){
var URLStr
URLStr=URL + "?ID=" +ID

var IdOR
if(popUpWin)
  	{

   	if(!popUpWin.closed) popUpWin.close();

  	}
    popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left=0, top=0,screenX=0,screenY=0');
	
}

function checkEmail(idTx){
 var campo=document.getElementById(''+idTx)
   var strng=campo.value
   var error = "";
   var emailFilter=/^.+@.+\..{2,3}$/;
   if (!(emailFilter.test(strng))) { 
       error = "Indirizzo E-Mail Non Valido.";
	}
  var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\]]/
  if (strng.match(illegalChars)) {
  error = "Indirizzo E-Mail Non Valido.";
  }	
  if (error!=""){
   	 	alert(error)
		campo.focus()
	}
   	
 }
 
 function checkGeneric(idField){
 var fld
 fld=document.getElementById(''+idField)
 	if (fld.value.length < 6){
    var error="Il campo non contiene sufficienti informazioni"
	alert(error)
	fld.focus()
	}
 }
 
 function checkallFormInfo(f0,f1,f2,f3,f4){
 var ml=document.getElementById(''+f0)
 var ifo=document.getElementById(''+f1)
 var cnt=document.getElementById(''+f2)
 var frm=document.getElementById(''+f3)
 var perc=document.getElementById(''+f3)
 var strng=ml.value
 var error = "";
 var numOfError=0
 var emailFilter=/^.+@.+\..{2,3}$/;
   if (!(emailFilter.test(strng))) { 
       error = "Indirizzo E-Mail Non Valido.";
	   numOfError=1
	}
  var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\]]/
  if (strng.match(illegalChars)) {
  error = "Indirizzo E-Mail Non Valido.";
  numOfError=1
  }	
  if (error!=""){
   	 	alert(error)
		campo.focus()
	    numOfError=1
  }
  if (numOfError==0){
     if (ifo.value.length < 6){
     var error="Il campo Informazioni non contiene sufficienti informazioni"
	 alert(error)
	 fld.focus()
	 numOferror=1
	 }
  }
 if (numOfError==0){
     if (cnt.value.length < 6){
     var error="Il campo Contatto non contiene sufficienti informazioni"
	 alert(error)
	 fld.focus()
	 numOferror=1
	 }
  }
 if (numOfError==0){
 	if (perc.value < 1){
 	var error="Il Percorso associato alla richiesta di informazioni non e\' stato scelto correttamente.\nTornare indietro e riprovare."
	alert(error)
	numOferror=1
	}
 } 
 if(numOfError==0){
 frm.submit()
 }
 }
 
function submitthisform(frm,opti,aret,mai,cont){
var op=document.getElementById(''+opti)
var f=document.getElementById(''+frm)
var ml=document.getElementById(''+mai)
var ar=document.getElementById(''+aret)
var cnt=document.getElementById(''+cont)
var errore=0
var strErrore=""	
if (op.value==0){
errore++
strErrore=strErrore+ "- Devi selezionare una opzione\n"
}
if (ml.value.length < 6){
errore++;
strErrore=strErrore + "- Indirizzo E-Mail Non Valido\n";
}
if (ar.value.length < 5){
errore++;
strErrore=strErrore + "- Il campo richiesta informazioni non contiene sufficienti caratteri\n";
}
if (cnt.value.length < 5){
errore++;
strErrore=strErrore + "- Il campo contatto non contiene sufficienti caratteri\n";
}

var strng=ml.value
var emailFilter=/^.+@.+\..{2,3}$/;
if (!(emailFilter.test(strng))) { 
errore++;
strErrore=strErrore + "- Indirizzo E-Mail Non Valido\n";
}
var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\]]/
if (strng.match(illegalChars)) {
errore++
strErrore=strErrore + "- Indirizzo Mail Contiene caretteri non validi.\n";
}


    
if (errore > 0) {
alert("IMPOSSIBILE INVIARE IL FORM, SI SONO VERIFICATI I SEGUENTI ERRORI:\n"+ strErrore) 
} 	
else{
f.submit()
}		
}

function openandrefresh(inx){
var URL="schedanews.asp"
var width="550"
var height="710"
URLStr=URL + "?ID=" +inx

var IdOR
if(pop_new)
  	{

   	if(!pop_new.closed) pop_new.close();

  	}
    pop_new = open(URLStr, 'pop_new', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left=0, top=0,screenX=0,screenY=0');
		


}
function reloadopener(){
window.opener.location.href="newsArcheosistemi.asp"
}