function add_carrello(formid,act) { var campo = eval("document."+formid+".quantita.value"); var modulo = eval("document."+formid); if ((campo == "") || (campo == 0) || (campo == "undefined")) { alert("Hai dimenticato di definire la quantità!"); modulo.quantita.focus(); return false; } else if (isNaN(campo)) { alert("Il campo quantità deve essere numerico!"); modulo.quantita.value=""; modulo.quantita.focus(); return false; } else { modulo.action=act; modulo.submit(); } } function once(){ document.registrazione.Submit.disabled=true; document.registrazione.chekka.checked=false; } var checkobj function accetta(el){ checkobj=el if (document.all||document.getElementById){ for (i=0;i 31) { alert("Impossibile utilizzare un valore superiore a 31 per i giorni!"); document.registrazione.nascita.select(); return false; } else if (nascita.substring(3,5) > 12) { alert("Impossibile utilizzare un valore superiore a 12 per i mesi!"); document.registrazione.nascita.value = ""; document.registrazione.nascita.focus(); return false; } else if (nascita.substring(6,10) < 1930) { alert("Impossibile utilizzare un valore inferiore a 1930 per l'anno!"); document.registrazione.nascita.value = ""; document.registrazione.nascita.focus(); return false; } else if ((luogo == "") || (luogo == "undefined")) { alert("Il campo Luogo di nascita è obbligatorio!"); document.registrazione.luogo.focus(); return false; } else if((provnasc == "") || (provnasc == "undefined")) { alert("La provincia del luogo di nascita è obbligatoria!"); document.registrazione.provnasc.focus(); return false; } }else{ if ((rag == "") || (rag == "undefined")) { alert("La Ragione sociale è obbligatoria!"); document.registrazione.rag.focus(); return false; } } if ((indirizzo == "") || (indirizzo == "undefined")) { alert("Il campo Indirizzo è obbligatorio!"); document.registrazione.indirizzo.focus(); return false; } else if ((numero == "") || (numero == "undefined")) { alert("Il numero civico dell'indirizzo è obbligatorio!"); document.registrazione.numero.focus(); return false; } else if ((citta == "") || (citta == "undefined")) { alert("Il campo Città è obbligatorio!"); document.registrazione.citta.focus(); return false; } else if ((cap == "") || (cap == "undefined")) { alert("Il campo Cap è obbligatorio!"); document.registrazione.cap.focus(); return false; } else if ((provincia == "") || (provincia == "undefined")) { alert("Il campo Provincia è obbligatorio!"); document.registrazione.provincia.focus(); return false; } else if ((stato == "") || (stato == "undefined")) { alert("Il campo Stato è obbligatorio!"); document.registrazione.stato.focus(); return false; } else if ((tel == "") || (tel == "undefined")) { alert("Il Numero di telefono è obbligatorio!"); document.registrazione.tel.focus(); return false; } if((iva == "") || (iva == 0)){ if ((cf == "") || (cf == "undefined")) { alert("Il codice fiscale è obbligatorio!"); document.registrazione.cf.focus(); return false; } else if (cf.length < 16) { alert("Il codice fiscale deve essere formato da 16 caratteri!"); document.registrazione.cf.select(); return false; } }else{ if ((piva == "") || (piva == "undefined")) { alert("La partita IVA è obbligatoria!"); document.registrazione.piva.focus(); return false; } else if (piva.length < 11) { alert("La partita IVA deve essere formata da 11 cifre!"); document.registrazione.piva.select(); return false; } else if (isNaN(piva)) { alert("La partita IVA deve essere numerica!"); document.registrazione.piva.value=""; document.registrazione.piva.focus(); return false; } } document.registrazione.action = act; document.registrazione.target = 'codici'; document.registrazione.submit(); } function checksubmit(){ document.registrazione.submit(); document.codici.location.href = 'checkpass.js.php?a=1'; } function logincheck(act) { var nome = document.login.nome.value; var password = document.login.password.value; if ((nome == "") || (nome == "undefined")) { alert("Hai dimenticato di inserire il Nome Utente!"); document.login.nome.focus(); return false; } else if ((password == "") || (password == "undefined")) { alert("Hai dimenticato di inserire la Password!"); document.login.password.focus(); return false; } else { document.login.action = act; document.login.submit(); } }