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 MM_goToURL() { 
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}



function MM_findObj(n, d) { 
  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) {
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)) eval("obj."+theProp+"='"+theValue+"'");
}


function spedisci()
{
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 segnala()
{
if (document.form1.FROM_NAME.value == "") {alert("Campo 'Il tuo nome' vuoto."); return;} 
if (document.form1.FROM_EMAIL.value == "") {alert("Campo 'Il tuo indirizzo e-mail' vuoto."); return;} 
if (! check_email(document.form1.FROM_EMAIL.value)) {alert("Non è stato inserito l'indirizzo di Email in maniera corretta."); return;} 
if (document.form1.TO_EMAIL.value == "") {alert("Campo 'L'indirizzo del tuo amico' vuoto."); return;} 
if (! check_email(document.form1.TO_EMAIL.value)) {alert("Non è stato inserito l'indirizzo di Email in maniera corretta."); return;} 
// if (document.form1.COMMENTO.value == "") {alert("Campo 'Un commento all' articolo' vuoto."); return;} 

document.form1.action = "spedisci_articolo_email.asp";
document.form1.submit();
}


function check_email (stringa) {
    if((stringa.indexOf("@")==-1) || (stringa.indexOf(".")==-1)){        
        return false;
    }
    else{
	return true;
    }

}

function spediscila()
{
if (document.FORM_CANCELLAZIONE.EMAIL_CANCELLAZIONE.value == "") {alert("Campo 'Indirizzo e-mail' vuoto."); return;} 
if (! check_email(document.FORM_CANCELLAZIONE.EMAIL_CANCELLAZIONE.value)) {alert("Non è stato inserito l'indirizzo di Email in maniera corretta."); return;} 

document.FORM_CANCELLAZIONE.action = "rimuovi_mailinglist.asp";
document.FORM_CANCELLAZIONE.submit();
}


function MM_reloadPage(init) {  
  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_openBrWindow(theURL,winName,features) { 
  window.open(theURL,winName,features);
}