function wopen(wfile) {
 window.open(wfile,'','scrollbars=yes,resizable=yes,width=565,height=355,status=no,location=no,toolbar=no');
}

function wimgopen(wfile, vwidth, vheight) {
 window.open(wfile,'','scrollbars=yes,resizable=yes,width=' + vwidth + ',height=' + vheight + ',status=no,location=no,toolbar=no');
}

function delarea(cod) {
 if(confirm("Vuoi eliminare l'area ?")) {
  location.href = "delarea.php?cod=" + cod;
 }
}

function delprov(cod) {
 if(confirm("Vuoi eliminare la provincia ?")) {
  location.href = "delprov.php?cod=" + cod;
 }
}

function delposiz(cod) {
 if(confirm("Vuoi eliminare la posizione ?")) {
  location.href = "delposiz.php?cod=" + cod;
 }
}

function deldistmare(cod) {
 if(confirm("Vuoi eliminare questa distanza ?")) {
  location.href = "deldistmare.php?cod=" + cod;
 }
}

function deldistcitta(cod) {
 if(confirm("Vuoi eliminare questa distanza ?")) {
  location.href = "deldistcitta.php?cod=" + cod;
 }
}

function delstrada(cod) {
 if(confirm("Vuoi eliminare questa distanza ?")) {
  location.href = "delstrada.php?cod=" + cod;
 }
}

function deldistabitaz(cod) {
 if(confirm("Vuoi eliminare questa distanza ?")) {
  location.href = "deldistabitaz.php?cod=" + cod;
 }
}

function delproprieta(cod) {
 if(confirm("Vuoi eliminare questo tipo di proprietą ?")) {
  location.href = "delproprieta.php?cod=" + cod;
 }
}

function delcondgen(cod) {
 if(confirm("Vuoi eliminare questo tipo di condizione generale ?")) {
  location.href = "delcondgen.php?cod=" + cod;
 }
}

function deltipoterreno(cod) {
 if(confirm("Vuoi eliminare questo tipo di terreno ?")) {
  location.href = "deltipoterreno.php?cod=" + cod;
 }
}

function delsport(cod) {
 if(confirm("Vuoi eliminare questo sport ?")) {
  location.href = "delsport.php?cod=" + cod;
 }
}

function deldimterreno(cod) {
 if(confirm("Vuoi eliminare questa dimensione di terreno ?")) {
  location.href = "deldimterreno.php?cod=" + cod;
 }
}

function delelemq(cod) {
 if(confirm("Vuoi eliminare questa superficie ?")) {
  location.href = "delelemq.php?cod=" + cod;
 }
}

function delelestanze(cod) {
 if(confirm("Vuoi eliminare questa stanza ?")) {
  location.href = "delelestanze.php?cod=" + cod;
 }
}

function deleleprezzi(cod) {
 if(confirm("Vuoi eliminare questo prezzo ?")) {
  location.href = "deleleprezzi.php?cod=" + cod;
 }
}

function delcitta(cod) {
 if(confirm("Vuoi eliminare questa cittą ?")) {
  location.href = "delcitta.php?cod=" + cod;
 }
}

function mailseipropchk() {
 if(document.seiprop.nome.value == "") {
  alert("The name field is mandatory");
  exit;
 }
 if(document.seiprop.email.value == "") {
  alert("The email field is mandatory");
  exit;
 }
 if(!document.seiprop.privacy.checked) {
  alert("You have to accept our privacy policy");
  exit;
 }
 document.seiprop.submit();
}

function mailchk() {
 if(document.mail.nome.value == "") {
  alert("The name field is mandatory");
  exit;
 }
 if(document.mail.email.value == "") {
  alert("The email field is mandatory");
  exit;
 }
 if(!document.mail.privacy.checked) {
  alert("You have to accept our privacy policy");
  exit;
 }
 document.mail.submit();
}

function mailregchk() {
 if(document.registrati.nome.value == "") {
  alert("The name field is mandatory");
  exit;
 }
 if(document.registrati.email.value == "") {
  alert("The email field is mandatory");
  exit;
 }
 if(document.registrati.user.value == "") {
  alert("The username field is mandatory");
  exit;
 }
 if(document.registrati.passwd.value == "") {
  alert("The password field is mandatory");
  exit;
 }
 if(!document.registrati.privacy.checked) {
  alert("You have to accept our privacy policy");
  exit;
 }
 document.registrati.submit();
}

function mailutchk() {
 if(document.registrati.nome.value == "") {
  alert("The name field is mandatory");
  exit;
 }
 if(document.registrati.email.value == "") {
  alert("The email field is mandatory");
  exit;
 }
 if(document.registrati.user.value == "") {
  alert("The username field is mandatory");
  exit;
 }
 if(!document.registrati.privacy.checked) {
  alert("You have to accept our privacy policy");
  exit;
 }
 document.registrati.submit();
}