
function provamoci(){
var visitordata = new Object();
visitordata.visits = top.visitordata.visits;
document.lgform.visite.value=visitordata.visits;
}


function impostafileallegato() {

  if (((document.form1.fileallegato.value == "")||(document.form1.fileallegato.value ==null))){
  alert("Attenzione!\n\nNon é stata allegata la fotografia.\nPrima di d'inviare il modulo\ndeve essere effettuato l'UPLOAD del FILE!\nGRAZIE!");
  }else{
  var visitordata = new Object();
  visitordata.visits = top.visitordata.visits;
  visitordata.name = top.visitordata.name;
  document.form1.pseudonimo.value=visitordata.name;
  document.form1.visite.value=visitordata.visits;
  document.form1.mex.value +=document.form1.ex.value
  document.form1.mex.value +="       file allegato: "+ document.form1.fileallegato.value +" n° " + visitordata.visits +" cat_foto  " + document.form1.categoria_foto.value;
  }
}


function impostafileallegato1() {
if((document.form3.blob.value=="")||(document.form3.blob.value== null)){
alert("Attenzione il modulo non é stato inviato!\nIl campo relativo al file da esportare risulta vuoto!");
return false;
}else{
document.form1.fileallegato.value =document.form3.blob.value;
return true;
}
}
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){
   var msg;
   var empty_fields ="";
   var errors = "";

   for (var i =0;i< f.length; i++){
       var e =f.elements[i];
       if (((e.type=="select-one") || (e.type =="hidden") || (e.type =="file")|| (e.type == "text")) && !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;
}
function control(){
			if (parent.window.frames.length == 0 ){
			location="http://www.setteringlese.com";
			}
			}

