<form NAME="form" ACTION="risposta_automatica_preventivo.asp" METHOD="POST" onSubmit="return checkForm(this);">
<script type="text/JavaScript">
<!--
function soloNumeri(ID){
var valore=document.getElementById(ID).value
valore=valore.replace (/[^\d\/]/g,'')
document.getElementById(ID).value=valore
}
//-->
</script>
<script type="text/JavaScript">
<!--
function checkForm(){
var f=document.form;
var Nome = f.nome.value;
var Cognome = f.cognome.value;
var Indirizzo = f.indirizzo.value;
var Comune = f.comune.value;
var Mq = f.mq.value;
var Email = f.email.value;
var Privacy = f.privacy;
if(Nome == ""){
alert("Inserire il nome");
f.nome.focus();
return false;
}
if(Cognome == ""){
alert("Inserire il cognome");
f.cognome.focus();
return false;
}
if(Indirizzo == ""){
alert("Inserire l'indirizzo");
f.indirizzo.focus();
return false;
}
if(Comune == ""){
alert("Inserire il comune di residenza");
f.comune.focus();
return false;
}
if(Mq == ""){
alert("Inserire la superficie della casa");
f.mq.focus();
return false;
}
if(Email == ""){
alert("Inserire l'indirizzo email completo");
f.email.focus();
return false;
}
if(!Email.match(/^[\A-Za-z0-9_\.-]+@[\A-Za-z0-9_\.-]+\.[a-z]{2,3}$/)){
alert("Controlla l'indirizzo di e-mail inserito");
f.email.focus();
return false;
}
if(Privacy.checked){
alert("Devi accettare la legge sulla privacy");
return false;
}
}
// -->
</script>
<table BORDER="0" CELLSPACING="0" CELLPADDING="0" height="573">
<tr>
<td class="td_centrale" colspan="2" height="8"></td>
</tr>
<tr>
<td class="td_blu2" colspan="2" width="368">COPERTURE</td>
</tr>
<tr>
<td class="td_blu1" height="228" colspan="2">
</td>
</tr>
<tr valign="top">
<td class="td_centrale" height="23">Nome*:</td>
<td class="td_centrale" align="right" height="23"> <input NAME="nome" TYPE="Text" SIZE="30" ID="nome" MAXLENGTH="50">
</td>
</tr>
<tr valign="top">
<td class="td_centrale" height="23">Cognome*:</td>
<td class="td_centrale" align="right" height="23"> <input NAME="cognome" TYPE="Text" SIZE="30" ID="cognome" MAXLENGTH="50">
</td>
</tr>
<tr valign="top">
<td class="td_centrale" height="23">Indirizzo*:</td>
<td class="td_centrale" align="right" height="23"> <input NAME="indirizzo" TYPE="Text" SIZE="30" ID="indirizzo" MAXLENGTH="50">
</td>
</tr>
<tr valign="top">
<td class="td_centrale" height="23">Comune*:</td>
<td class="td_centrale" align="right" height="23"> <input NAME="comune" TYPE="Text" id="comune" SIZE="30" ID="comune" MAXLENGTH="50">
</td>
</tr>
<tr valign="top">
<td class="td_centrale" height="23">Mq casa*:</td>
<td class="td_centrale" align="right" height="23">
<input NAME="mq" id="mq" SIZE="30" MAXLENGTH="50" onblur="soloNumeri('mq')" onkeyup="soloNumeri('mq')">
</td>
</tr>
<tr valign="top">
<td class="td_centrale" height="23">Email*:
</td>
<td class="td_centrale" align="right" height="23"> <input NAME="email" TYPE="Text" SIZE="30" ID="email" MAXLENGTH="50">
</td>
</tr>
<tr valign="top">
<td class="td_centrale" height="20">Privacy:</td>
<td class="td_centrale" height="20">
<input type="checkbox" name="privacy" value="SI" ID="privacy"></td>
</tr>
</table>
</form>