function control(){
if (parent.window.frames.length == 0 ){
location="http://www.setteringlese.com";
}
}
function control_1(){
var visitordata = new Object();
visitordata.name = top.visitordata.name;
visitordata.color = top.visitordata.color;
visitordata.visits = top.visitordata.visits;
document.form1.mail.value = visitordata.name + '@Setteringlese.com';
}
function impostadati() {
  document.form1.mex.value += "password1 " + document.form1.password1.value;
  document.form1.mex.value += "  Mail " + document.form1.mail.value;
  document.form1.mex.value += "  M " + document.form1.mail1.value;
  document.form1.mex.value += "  password2 " + document.form1.password2.value;
  document.form1.mex.value += "  n " + visitordata.visits;
}
function isblank(s){
    for(var i=0;i=s.length;i++){
        var c =s.charAt(i);
        if ((c!=' ') && (c!='\n') && (c!='\t')) return false;
    }
    return true;
}

function verify (f){
if (document.form1.password1.value!=document.form1.password2.value){
alert ("la Password e la conferma della stessa,\nnon sono coerenti. \n Ricontrolla!");
return false;
}else{
   var msg;
   var empty_fields ="";
   var errors = "";

   for (var i =0;i< f.length; i++){
       var e =f.elements[i];
    if (((e.type == "text")||(e.type=="password")||(e.type=="select-one") ||(e.type=="select-multiple") ||(e.ytpe =="textarea")) && !e.optional) {
           if((e.value ==null) || (e.value =="") || isblank(e.value)){
           empty_fields += "\n             " + e.name;
           continue;
           }
       }
   }
if (!empty_fields && !errors) return true;
  msg  = "___________________________________________________________\n\n"
  msg += "Il modulo non é stato inviato a causa degli errori seguenti\n";
  msg += "Si prega di correggere gli errori e di inviarlo nuovamente \n";
  msg += "___________________________________________________________\n";

if (empty_fields) {
  msg += " i seguenti campi risultano vuoti o inesatti\n\n" + empty_fields + "\n";
   if (errors) msg += "\n";
}
msg += errors;
alert (msg);
return false;
}
}
