//Controllo CF //function controllaCF(objform) //{ // var cf, i, s, set1, set2, setpari, setdisp; // var Giorno; // var fcf=/^[A-Z0-9]{16}$/; // cf=trim(objform.cf.value.toUpperCase()); // if( cf == "" ){return false;} // if( !fcf.test(cf) ) {return false;} // // set1 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; // set2 = "ABCDEFGHIJABCDEFGHIJKLMNOPQRSTUVWXYZ"; // setpari = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; // setdisp = "BAKPLCQDREVOSFTGUHMINJWZYX"; // s = 0; // for( i = 1; i <= 13; i += 2 ){s += setpari.indexOf( set2.charAt( set1.indexOf( cf.charAt(i) )));} // for( i = 0; i <= 14; i += 2 ){s += setdisp.indexOf( set2.charAt( set1.indexOf( cf.charAt(i) )));} // if( s%26 != cf.charCodeAt(15)-'A'.charCodeAt(0) ){return false;} // // if (cf.substr(6,2) != objform.Anno.value.substr(2,2)){return false;} // // switch(objform.Mese.value) { // // case "01": Mese = "A";break; // case "02": Mese = "B";break; // case "03": Mese = "C";break; // case "04": Mese = "D";break; // case "05": Mese = "E";break; // case "06": Mese = "H";break; // case "07": Mese = "L";break; // case "08": Mese = "M";break; // case "09": Mese = "P";break; // case "10": Mese = "R";break; // case "11": Mese = "S";break; // case "12": Mese = "T";break;} // // if (cf.substr(8,1) != Mese ){return false;} // if (objform.sesso.value == "M") {Giorno = objform.Giorno.value;} // // else if (objform.sesso.value == "F") // { // //controllo perchè non funziona il parseInt su un numero che inizia con 0. // if (parseInt(objform.Giorno.value) == 0) // {Giorno = parseInt(objform.Giorno.value.substr(1,1)) + 40;} // else {Giorno = parseInt(objform.Giorno.value) + 40;} // } // if (cf.substr(9,2) != Giorno ) {return false;} // // return true; //} function validateForm() { if (document.registrazione.nome.value == "") { alert("Inserire il nome, è un campo obbligatorio"); document.registrazione.nome.focus(); return false; } if (document.registrazione.cognome.value == "") { alert("Inserire il cognome, è un campo obbligatorio"); document.registrazione.cognome.focus(); return false; } if (document.registrazione.pi_cf.value == ""){ // Definisco un pattern per il confronto var pattern = /^[a-zA-Z]{6}[0-9]{2}[a-zA-Z][0-9]{2}[a-zA-Z][0-9]{3}[a-zA-Z]$/; // creo una variabile per richiamare con facilità il nostro campo di input var CodiceFiscale = document.getElementById("cf"); // utilizzo il metodo search per verificare che il valore inserito nel campo // di input rispetti la stringa di verifica (pattern) if (CodiceFiscale.value.search(pattern) == -1) { // In caso di errore stampo un avviso e pulisco il campo... alert("Inserire il codice fiscale, è un campo obbligatorio"); CodiceFiscale.focus(); return false; } } else { if (document.registrazione.cf.value == "") { alert("Inserire il codice fiscale, è un campo obbligatorio"); document.registrazione.cf.focus(); return false; } } if (document.registrazione.nazione.value == "") { alert("Inserire la nazione, è un campo obbligatorio"); document.registrazione.nazione.focus(); return false; } if (document.registrazione.zonaPaese){ if (document.registrazione.zonaPaese.value == "" || document.registrazione.zonaPaese.value == "-1") { alert("Inserire la zona geografica"); document.registrazione.zonaPaese.focus(); return false; } } if (document.getElementById('nazione').value == '105'){ if (document.getElementById('citta').value == "" || document.getElementById('citta').value == "Città/Provincia") { alert("Inserire la città, è un campo obbligatorio"); document.registrazione.citta2.value = ""; document.getElementById('citta').focus(); return false; } } else { if (document.registrazione.citta2.value == "" || document.registrazione.citta2.value == "Città/Provincia") { alert("Inserire la città, è un campo obbligatorio"); document.getElementById('citta').value = ""; document.registrazione.citta2.focus(); return false; } } if (document.getElementById('nazione').value == '105'){ if (document.getElementById('provincia')){ if (document.getElementById('provincia').value == "") { alert("inserire la provincia"); document.getElementById('provincia').focus(); return false; } } } if (document.registrazione.cap.value == "") { alert("Inserire il CAP, è un campo obbligatorio"); document.registrazione.cap.focus(); return false; } if (document.registrazione.indirizzo.value == "") { alert("Inserire indirizzo, è un campo obbligatorio"); document.registrazione.indirizzo.focus(); return false; } if (document.registrazione.telefono1.value == "") { alert("Inserire un recapito telefonico, è un campo obbligatorio"); document.registrazione.telefono1.focus(); return false; } if (document.registrazione.email.value.indexOf(".")==-1 | document.registrazione.email.value.indexOf("@")==-1 | document.registrazione.email.value.length <= 6) { alert("Inserire un indirizzo e-mail valido, è un campo obbligatorio"); document.registrazione.email.focus(); return false; } if (document.registrazione.login.value == "") { alert("Inserire la tua username, è un campo obbligatorio"); document.registrazione.login.focus(); return false; } if (document.registrazione.passwordUser.value == "") { alert("Inserire la password, è un campo obbligatorio"); document.registrazione.passwordUser.focus(); return false; } if (document.registrazione.password2.value == "") { alert("Confermare la password, è un campo obbligatorio"); document.registrazione.password2.focus(); return false; } if(document.registrazione.password2.value!=document.registrazione.passwordUser.value) { alert ("Confermare la password, è un campo obbligatorio"); document.registrazione.password2.focus(); return false; } if (document.registrazione.consenso.checked == false) { alert ("Devi dare il condenso al trattamento dei dati personali"); document.registrazione.consenso.focus(); return false; } else { return true; } }

www.systemserviceshop.it - Qualità e convenienza sono di casa!

Area clienti

Skype

Registrazione utente

Per poter acquistare su questo sito è necessario compilare il form sottostante.

Campi in rosso obbligatori

Informazioni generali

Convenzione

Dati di accesso

Privacy e Newsletter

Leggi l'informativa sulla Privacy


Invio dei dati

Codice di sicurezza