function HideDialog() { if( dialogWindow != null ) { if (typeof(dialogWindow.document) == "object") dialogWindow.close() } } //kontrola odeslání function Kontrola () { if (document.formular.n_prijmeni.value == "") { document.formular.n_prijmeni.focus(); alert ("Nezadal(a) jste kontaktní osobu"); return false; } if (document.formular.n_telefon.value == "") { document.formular.n_telefon.focus(); alert ("Nezadal(a) jste telefon"); return false; } if (document.formular.n_telefon.value.length != 9) { document.formular.n_telefon.focus(); alert("Telefon nemá správný formát - 9 číslic bez mezer"); return false; } inp=document.formular.n_mail.value; mail=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; if (mail.test(inp)==false) { document.formular.n_mail.focus(); alert("Chybně zadaný e-mail"); return false; } if (document.formular.n_firma.value == "") { document.formular.n_firma.focus(); alert ("Nezadal(a) jste vaše jméno a příjmení, nebo název firmy"); return false; } if (document.formular.n_ulice.value == "") { document.formular.n_ulice.focus(); alert ("Nezadal(a) jste ulici"); return false; } if (document.formular.n_psc.value == "") { document.formular.n_psc.focus(); alert ("Nezadal(a) jste PSČ"); return false; } if (document.formular.n_psc.value.length != 5) { document.formular.n_psc.focus(); alert("PSČ nemá správný formát - 5 číslic bez mezer"); return false; } if (document.formular.n_psc.value < 10000 || document.formular.n_dpsc.value > 79999) { document.formular.n_psc.focus(); alert("Zadané PSČ není platným číslem pro ČR."); return false; } if (document.formular.n_mesto.value == "") { document.formular.n_mesto.focus(); alert ("Nezadal(a) jste město"); return false; } } //kontrola registrace function kontrReg () { inp=document.formular.n_mail.value; mail=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; if (mail.test(inp)==false) { document.formular.n_mail.focus(); alert("Chybně zadaný e-mail"); return false; } if (document.formular.n_heslo.value.length < 6) { document.formular.n_heslo.focus(); alert("Heslo musí mít alespoň 6 znaků"); return false; } if (document.formular.n_heslo.value != document.formular.n_heslo2.value) { document.formular.n_heslo2.focus(); alert("Hesla se musí shodovat"); return false; } if (document.formular.n_prijmeni.value == "") { document.formular.n_prijmeni.focus(); alert ("Nezadal(a) jste kontaktní osobu"); return false; } if (document.formular.n_telefon.value == "") { document.formular.n_telefon.focus(); alert ("Nezadal(a) jste telefon"); return false; } if (document.formular.n_telefon.value.length != 9) { document.formular.n_telefon.focus(); alert("Telefon musí obsahovat 9 číslic bez mezer"); return false; } if (document.formular.n_firma.value == "") { document.formular.n_firma.focus(); alert ("Nezadal(a) jste vaše jméno a příjmení nebo firmu"); return false; } if (document.formular.n_ulice.value == "") { document.formular.n_ulice.focus(); alert ("Nezadal(a) jste ulici"); return false; } if (document.formular.n_psc.value == "") { document.formular.n_psc.focus(); alert ("Nezadal(a) jste PSČ"); return false; } if (document.formular.n_psc.value.length != 5) { document.formular.n_psc.focus(); alert("PSČ musí obsahovat 5 číslic bez mezer"); return false; } if (document.formular.n_psc.value < 10000 || document.formular.n_dpsc.value > 79999) { document.formular.n_psc.focus(); alert("Zadané PSČ není platným číslem pro ČR."); return false; } if (document.formular.n_mesto.value == "") { document.formular.n_mesto.focus(); alert ("Nezadal(a) jste město"); return false; } } //oprava registrace function oprReg () { if (document.oprform.n_prijmeni.value == "") { document.oprform.n_prijmeni.focus(); alert ("Nezadal(a) jste kontaktní osobu"); return false; } if (document.oprform.n_telefon.value == "") { document.oprform.n_telefon.focus(); alert ("Nezadal(a) jste telefon"); return false; } if (document.oprform.n_telefon.value.length != 9) { document.oprform.n_telefon.focus(); alert("Telefon musí obsahovat 9 číslic bez mezer"); return false; } if (document.oprform.n_firma.value == "") { document.oprform.n_firma.focus(); alert ("Nezadal(a) jste vaše jméno a příjmení nebo firmu"); return false; } if (document.oprform.n_ulice.value == "") { document.oprform.n_ulice.focus(); alert ("Nezadal(a) jste ulici"); return false; } if (document.oprform.n_psc.value == "") { document.oprform.n_psc.focus(); alert ("Nezadal(a) jste PSČ"); return false; } if (document.oprform.n_psc.value.length != 5) { document.oprform.n_psc.focus(); alert("PSČ musí obsahovat 5 číslic bez mezer"); return false; } if (document.oprform.n_psc.value < 10000 || document.oprform.n_dpsc.value > 79999) { document.oprform.n_psc.focus(); alert("Zadané PSČ není platným číslem pro ČR."); return false; } if (document.oprform.n_mesto.value == "") { document.oprform.n_mesto.focus(); alert ("Nezadal(a) jste město"); return false; } } //kontrola dotaz function kontrDot () { if (document.dotaz.Jmeno.value.length < 4) { document.dotaz.Jmeno.focus(); alert("Jméno musí mít alespoň 4 znaky"); return false; } if (document.dotaz.otazka.value.length < 5) { document.dotaz.otazka.focus(); alert("Nezadal(a) jste dotaz"); return false; } } //kontrola přihlášení function kontrPrihl () { if (document.FORM.login.value.length < 4) { document.FORM.login.focus(); alert("Login musí mít alespoň 4 znaky"); return false; } if (document.FORM.heslo.value.length < 6) { document.FORM.heslo.focus(); alert("Heslo musí mít alespoň 6 znaků"); return false; } } //kontrola dotaz function kontrDotazy() { if (document.formular.hltex.value == "") { document.formular.hltex.focus(); alert("Hledaný výraz musí mít alespoň 4 znaky"); return false; } } //kontrola odeslání function kontrHled () { if (document.formular.hltex.value.length < 4) { document.formular.hltex.focus(); alert("Hledaný výraz musí mít aspoň 4 znaky"); return false; } } //kontrola odeslání function kontrHledani () { if (document.form.hltex.value.length < 4) { document.form.hltex.focus(); alert("Hledaný výraz musí mít aspoň 4 znaky"); return false; } } function over2(){ inp=document.formular.n_mail.value; mail=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; if (mail.test(inp)==false) { document.formular.n_mail.focus(); alert("Chybně zadaný e-mail"); return false; } } // košík function kontrolaPlatby() { var userinput=-1; for (var i=0;i=3990) { d=0; } if(document.kosikform.doprava[x].id=='zas') { d=cenaOdeslani - 35; } if(document.kosikform.doprava[x].id=='zas' && cenaOdeslani==0) { d=0; } // if(document.kosikform.doprava[x].id=='zas' && cenacelkem>=1000) { d=0; } // pošt zas zdarma document.getElementById('info'+document.getElementById('kosikform').doprava[x].id).className='info visible'; } else {document.getElementById('info'+document.getElementById('kosikform').doprava[x].id).className='info hidden';} } } for (x = 0; x < document.kosikform.platba.length; x++) { if (document.kosikform.platba[x] != null) { if (document.kosikform.platba[x].checked==true) { if(document.kosikform.platba[x].id=='dobirka' && d!=65 && d!=45) { d+=placeni; } if(document.kosikform.platba[x].id=='dobirka' && d==65) { d=104; } if(document.kosikform.platba[x].id=='dobirka' && d==45) { d=84; } // if(document.kosikform.platba[x].id=='dobirka' && d==30) { d=14; } // if(document.kosikform.platba[x].id=='dobirka' && d==30) { d=0; } // pošt zas zdarma document.getElementById('info'+document.getElementById('kosikform').platba[x].id).className='info visible'; } else {document.getElementById('info'+document.getElementById('kosikform').platba[x].id).className='info hidden';} } } if (d==0 || d==10) { document.getElementById('cenadopravy').innerHTML = '0 Kč'; document.getElementById('cena_celkem').innerHTML= cenacelkem + ' Kč'; } else { document.getElementById('cenadopravy').innerHTML= d + ' Kč'; document.getElementById('cena_celkem').innerHTML= cenacelkem + d + ' Kč'; } } // if(document.kosikform.doprava[x].id=='zas' && cenacelkem>=1000) { d=0; } // if(document.kosikform.platba[x].id=='dobirka' && d==30) { d=0; } // skrývání textu function zobrazSkryj(idecko){ el=document.getElementById(idecko).style; el.display=(el.display == 'block')?'none':'block'; } function KontrolaPrihl (vstup) { inp=vstup.email.value; mail=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; if (mail.test(inp)==false) { vstup.email.focus(); alert("Chybně zadaný e-mail"); return false; } if (vstup.heslo.value == "") { vstup.heslo.focus(); alert ("Nezadal(a) jste heslo"); return false; } if (vstup.heslo.value.length < 6) { vstup.heslo.focus(); alert("Heslo musí mít alespoň 6 znaků"); return false; } } // změna hesla function oprPas () { if (document.oprheslo.n_heslo.value.length < 6) { document.oprheslo.n_heslo.focus(); alert("Heslo musí mít alespoň 6 znaků"); return false; } if (document.oprheslo.n_heslo.value != document.oprheslo.n_heslo2.value) { document.oprheslo.n_heslo2.focus(); alert("Hesla se musí shodovat"); return false; } } function kontrolaSouhlas() { if(document.odeslat.podminky.checked==false) { window.alert("Podmínkou je souhlas se všeobecnými obchodními podmínkami a zpracováním osobních údajů!"); return false; } else { return true; } }