function esempio(str){
searchWin = window.open(str,'esempio','scrollbars=yes,resizable=yes,width=450,height=400,status=no,location=no,toolbar=no');
}

function popup_due(str){
searchWin = window.open(str,'pop','scrollbars=yes,resizable=yes,width=700,height=400,status=no,location=no,toolbar=no');
}


function MM_jumpMenu(targ,selObj,restore){
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}

function popup(str){
searchWin = window.open(str,'esempio','scrollbars=yes,resizable=yes,width=400,height=400,status=no,location=no,toolbar=no');
}

function printit(){
window.print();
}


        function logga() {
                f=document.forms["theform"];
                if (f.no.value.length == 0) {
                        alert('Inserire nome');
                }
                if (f.co.value.length == 0) {
                        alert('Inserire cognome');
                }
                if (f.ind.value.length == 0) {
                        alert('inserire indirizzo');
                }
                if (f.ca.value.length == 0) {
                        alert('Inserire cap');
                }
       if (f.ci.value.length == 0) {
                        alert('Inserire citta');
                }
       //if (f.pr.value.length == 0) {
                //        alert('Insert provincia');
                //}
       if (f.data_di_nascita.value.length == 0) {
                        alert('Inserire data di nascita');
                }
       //if (f.fiscale.value.length == 0) {
       //                 alert('Insert codice fiscale');
       //         }
                if (f.ust.value == "" || f.ust.value.indexOf('@', 0) == -1){
           alert("Indirizzo di e-mail non valido!");
       }
                else        {
                        f.submit();
                }
        }

  function verifica_login() {
        f=document.forms["theform"];
		msg="Errore:\n";
        if (f.login_utente.value.length == 0) {
           msg+="Inserire utente\n";
        }
        if (f.login_password.value.length == 0) {
           msg+="Inserire password\n";
        }
		if (msg=="Errore:\n") { f.submit();}
		else 
			alert(msg);
 }

