function windowOpener(html_file, display_frame) {
        html_file = "" + html_file;                          
        open(html_file,display_frame,"toolbar=no,scrollbars=NO,resizable=no,width=450, height=400")
}
function stampa_articolo(html_file, display_frame) {               
        html_file = "" + html_file;                          
        open(html_file,display_frame,"toolbar=no,scrollbars=yes,resizable=yes,width=580, height=450")
}

function fotografie(html_file, display_frame) {               
        html_file = "" + html_file;                          
        open(html_file,display_frame,"toolbar=no,scrollbars=yes,resizable=yes,width=640, height=500")
}

function spedisci_registrazione()
{
if (document.FORM_REGISTRAZIONE.EMAIL_REGISTRAZIONE.value == "") {alert("Campo 'Indirizzo e-mail' vuoto."); return;} 
if (! check_email(document.FORM_REGISTRAZIONE.EMAIL_REGISTRAZIONE.value)) {alert("Non è stato inserito l'indirizzo di Email in maniera corretta."); return;} 

document.FORM_REGISTRAZIONE.action = "registrazione_mailinglist_salva.asp";
document.FORM_REGISTRAZIONE.submit();
}

function ricerca_sito()
{
if (document.FORM_RICERCA.KEYWORD.value == "") {alert("Inserire una parola per la ricerca."); return;} 

document.FORM_RICERCA.action = "risultati_ricerca.asp";
document.FORM_RICERCA.submit();
}



function MM_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}

function MM_changeProp(objName,x,theProp,theValue) { //v3.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)) eval("obj."+theProp+"='"+theValue+"'");
}




function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}



function check_email (stringa) {
    if((stringa.indexOf("@")==-1) || (stringa.indexOf(".")==-1)){        
        return false;
    }
    else{
	return true;
    }

}

function check_campi (stringa) {
    if( ( stringa.search(/[^a-z,0-9,.,_]/) ) != -1 ){
	return false;
    }
    else{
	return true;
    }
}



function check_numeri (stringa) {
    if( ( stringa.search(/[^0-9]/) ) != -1 ) {
	return false;
    }
    else{
	return true;
    }
}



function is_netscape(){
    if (navigator.appName == "Netscape"){
	return true;
    }
    else {
	return false;
    }
}

function is_explorer(){
    if ((navigator.appName == "Microsoft Internet Explorer") && ((navigator.appVersion.indexOf("5.") != -1) || (navigator.appVersion.indexOf("6.") != -1))) {
	return true;
    }
    else {
	return false;
    }
}

function cattura()
{
  popup = window.open('/reg_pop.html','pop','width=400,height=300,scrollbars=no');
  popup.creator=self;
  popup.focus();
}


