function forgotten(lang) {
  nomefile="/forgotten/"+lang;
  w = 600;
  h = 200;
  dimensioni="width="+w+",height="+h+",scrollbars=no,resizable=no";
  var win=window.open(nomefile,"forgotten",dimensioni);
  win.focus();
}
function add_event(id_event,id_comp) {
  nomefile="/add_event/"+id_event+"/"+id_comp+"/";
  w = 500;
  h = 150;
  dimensioni="width="+w+",height="+h+",scrollbars=no,resizable=no";
  var win=window.open(nomefile,"addevent",dimensioni);
  win.focus();
}
function del_event(id) {
  nomefile="/del_event/"+id+"/";
  w = 500;
  h = 150;
  dimensioni="width="+w+",height="+h+",scrollbars=no,resizable=no";
  var win=window.open(nomefile,"delevent",dimensioni);
  win.focus();
}
function email_account(id) {
  nomefile="/email_account";
  w = 500;
  h = 150;
  dimensioni="width="+w+",height="+h+",scrollbars=no,resizable=no";
  var win=window.open(nomefile,"emailaccount",dimensioni);
  win.focus();
}
function control_login(fields) {
  if (document.f1.login_cl.value == "")  { 
    alert("Login mancante"); 
    return false; 
  } 
  if (document.f1.pwd_cl.value == "")  { 
    alert("Password mancante"); 
    return false; 
  } 
}
function control_save_it(fields) {
  if (document.f2.nome_cl.value == "")  { 
    alert("Inserisci il suo nome e cognome"); 
    return false; 
  } 
  if (document.f2.email_cl.value == "")  { 
    alert("Inserisci la sua e-mail"); 
    return false; 
  } 
  if (document.f2.birthday_day.value == 0)  { 
    alert("Compleanno: inserire il giorno"); 
    return false; 
  } 
  if (document.f2.birthday_month.value == 0)  { 
    alert("Compleanno: inserire il mese"); 
    return false; 
  } 
  if (document.f2.birthday_year.value == 0)  { 
    alert("Compleanno: inserire l'anno"); 
    return false; 
  } 
  if (document.f2.passwd_cl.value == "")  { 
    alert("Inserisci la password"); 
    return false; 
  } 
  /*
  if (document.f2.passwd_ctrl_cl.value == "")  { 
    alert("Inserisci nuovamente la password"); 
    return false; 
  } 
  if (document.f2.passwd_ctrl_cl.value != document.f2.passwd_cl.value)  { 
    alert("La password non coincide. Inserirla nuovamente"); 
    return false; 
  } 
  */
  if (document.f2.sec_code_cl.value == "")  { 
    alert("Inserisci il codice di controllo"); 
    return false; 
  } 
  if (document.f2.dati_personali_cl[0].checked == false)  { 
    alert("Per registrarsi &egrave; necessario che ci fornisci il consenso al trattamento dei dati personali"); 
    return false; 
  } 
  
}
function control_save_en(fields) {
  if (document.f2.nome_cl.value == "")  { 
    alert("Name and Surname are mandatory"); 
    return false; 
  } 
  if (document.f2.email_cl.value == "")  { 
    alert("E-mail is mandatory"); 
    return false; 
  } 
  if (document.f2.birthday_day.value == 0)  { 
    alert("Bithday: day is mandatory"); 
    return false; 
  } 
  if (document.f2.birthday_month.value == 0)  { 
    alert("Bithday: month is mandatory"); 
    return false; 
  } 
  if (document.f2.birthday_year.value == 0)  { 
    alert("Bithday: year is mandatory"); 
    return false; 
  } 
  if (document.f2.passwd_cl.value == "")  { 
    alert("Password is mandatory"); 
    return false; 
  } 
  /*
  if (document.f2.passwd_ctrl_cl.value == "")  { 
    alert("Inserisci nuovamente la password"); 
    return false; 
  } 
  if (document.f2.passwd_ctrl_cl.value != document.f2.passwd_cl.value)  { 
    alert("La password non coincide. Inserirla nuovamente"); 
    return false; 
  } 
  */
  if (document.f2.sec_code_cl.value == "")  { 
    alert("Security code is mandatory"); 
    return false; 
  } 
  if (document.f2.dati_personali_cl[0].checked == false)  { 
    alert("To send the request it is necessary for you to give us permission to handle your personal data"); 
    return false; 
  } 
  
}

function go() {
  if (document.fall_city.all_city.value != "")
    location.href = document.fall_city.all_city.value;
}
