// JavaScript Document function kontrola_kontrola() { vysl=''; if ((document.form_shop_main.pripominka.value.search(/.*[<>].*/) == 0) && (document.form_shop_main.pripominka.value!='')) vysl += ' - The text contains unallowed characters (<,>)'; return shop_result(vysl); } function kontrola_zapomenute_heslo() { vysl=''; if (document.form_shop_main.zapomenute_heslo.value=='') vysl += ' - Enter your email address or user name'; if ((document.form_shop_main.zapomenute_heslo.value.search(/.*[<>].*/) == 0) && (document.form_shop_main.zapomenute_heslo.value!='')) vysl += ' - The word contains unallowed characters (<,>)'; return shop_result(vysl); } function kontrola_zakladni_vyhledavani() { vysl=''; if (document.form_shop_main.shop_fulltext_klic.value=='') vysl += ' - The keyword must be entered'; if ((document.form_shop_main.shop_fulltext_klic.value.search(/.*[<>].*/) == 0) && (document.form_shop_main.shop_fulltext_klic.value!='')) vysl += ' - The keyword contains unallowed characters (<,>)'; return shop_result(vysl); } function kontrola_pokrocile_vyhledavani() { vysl=''; if ((document.form_shop_main.shop_fulltext_klic.value.search(/.*[<>].*/) == 0) && (document.form_shop_main.shop_fulltext_klic.value!='')) vysl += ' - The keyword contains unallowed characters (<,>)\n'; if ((document.form_shop_main.search_cena_od.value.search(/^[0-9]+([\.\,]{1}[0-9]{2}){0,1}$/) != 0) && (document.form_shop_main.search_cena_od.value!='')) vysl += ' - Invalid format of price from\n'; if ((document.form_shop_main.search_cena_do.value.search(/^[0-9]+([\.\,]{1}[0-9]{2}){0,1}$/) != 0) && (document.form_shop_main.search_cena_do.value!='')) vysl += ' - Invalid formay of price to\n'; return shop_result(vysl); } function kontrola_vlozit_do_kosiku(hodnota) { vysl=''; if (parseInt(hodnota)==0) vysl += ' - Number of lines must be entered\n'; if ((hodnota.search(/^[0-9]+$/) != 0) && (hodnota!='')) vysl += ' - Number of lines is in an invalid format\n'; return shop_result(vysl); } function kontrola_aktualizovat_kosik(hodnoty) { vysl=''; for(var i=0; i].*/) == 0) && (document.form_shop_main.kod_slevy.value!='')) vysl += ' - The discount coupon code contains improper characters (<,>)'; return shop_result(vysl); } function kontrola_adresa_dodani() { vysl=''; if ((document.form_shop_main.jmeno_prihlaseni.value=='') && (document.form_shop_main.heslo.value=='')) { if ((document.form_shop_main.titul.value.search(/.*[@#$%^&*|\<>+§{}].*/) == 0) && (document.form_shop_main.titul.value!='')) vysl += " - The title coupon code contains improper characters\n"; if ((document.form_shop_main.jmeno.value=='') && (document.form_shop_main.prijmeni.value=='') && (document.form_shop_main.firma.value=='')) vysl += " - Name or company name must be entered\n"; if ((document.form_shop_main.firma.value=='') && (((document.form_shop_main.jmeno.value!='') && (document.form_shop_main.prijmeni.value=='')) || ((document.form_shop_main.jmeno.value=='') && (document.form_shop_main.prijmeni.value!='')))) vysl += " - Enter your full name\n" if ((document.form_shop_main.jmeno.value.search(/.*[@#$%^&*|\<>+§{}].*/) == 0) && (document.form_shop_main.jmeno.value!='')) vysl += " - The name contains invalid characters\n"; if ((document.form_shop_main.prijmeni.value.search(/.*[@#$%^&*|\<>+§{}].*/) == 0) && (document.form_shop_main.prijmeni.value!='')) vysl += " - The last name contains invalid characters\n"; if ((document.form_shop_main.firma.value.search(/.*[@#$%^*|\<>+§{}].*/) == 0) && (document.form_shop_main.firma.value!='')) vysl += " - The company name contains invalid characters\n"; if (document.form_shop_main.adresa.value=='') vysl += " - The address must be filled out\n"; if ((document.form_shop_main.adresa.value.search(/.*[@#$%^&*|\<>+§{}].*/) == 0) && (document.form_shop_main.adresa.value!='')) vysl += " - The address contains invalid characters\n"; if (document.form_shop_main.mesto.value=='') vysl += " - The city name must be entered\n"; if ((document.form_shop_main.mesto.value.search(/.*[@#$&%^*|\<>+§{}].*/) == 0) && (document.form_shop_main.mesto.value!='')) vysl += " - The city name contains invalid characters\n"; if (document.form_shop_main.psc.value=='') vysl += " - The postal/zip code must be entered\n"; if ((document.form_shop_main.psc.value.search(/.*[@#$&%^*|\<>+§{}].*/) == 0) && (document.form_shop_main.psc.value!='')) vysl += " - The postal/zip code contains invalid characters\n"; if (document.form_shop_main.telefon.value=='') vysl+= " - Phone number must be entered\n"; if ((document.form_shop_main.telefon.value.search(/.*[@#$&%^*|\<>+§{}].*/) == 0) && (document.form_shop_main.telefon.value!='')) vysl += " - The phone number contains invalid characters\n"; if (document.form_shop_main.mail.value=='') vysl+= " - Email address must be entered\n"; if ((document.form_shop_main.mail.value.search(/^([^(@#$*()!\?)]+)@([^(@#$*()!\?)]+)[.][a-zA-Z]{2,3}$/) != 0) && (document.form_shop_main.mail.value!='')) vysl += " - Invalid email address\n"; } else { if ((document.form_shop_main.jmeno_prihlaseni.value=='') || (document.form_shop_main.heslo.value=='')) vysl += " - Enter complete login information\n"; if ((document.form_shop_main.jmeno_prihlaseni.value.search(/.*[@#$&%^*|\<>+§{}].*/) == 0) && (document.form_shop_main.jmeno_prihlaseni.value!='')) vysl += " - The login name contains invalid characters\n"; if ((document.form_shop_main.heslo.value.search(/.*[@#$&%^*|\<>+§{}].*/) == 0) && (document.form_shop_main.heslo.value!='')) vysl += " - The password contains invalid characters\n"; } return shop_result(vysl); } function kontrola_registrace() { vysl=''; if ((document.form_shop_main.titul.value.search(/.*[@#$%^&*|\<>+§{}].*/) == 0) && (document.form_shop_main.titul.value!='')) vysl += " - The title coupon code contains improper characters\n"; if ((document.form_shop_main.jmeno.value=='') && (document.form_shop_main.prijmeni.value=='') && (document.form_shop_main.firma.value=='')) vysl += " - Name or company name must be entered\n"; if ((document.form_shop_main.firma.value=='') && (((document.form_shop_main.jmeno.value!='') && (document.form_shop_main.prijmeni.value=='')) || ((document.form_shop_main.jmeno.value=='') && (document.form_shop_main.prijmeni.value!='')))) vysl += " - Enter your full name\n" if ((document.form_shop_main.jmeno.value.search(/.*[@#$%^&*|\<>+§{}].*/) == 0) && (document.form_shop_main.jmeno.value!='')) vysl += " - The name contains invalid characters\n"; if ((document.form_shop_main.prijmeni.value.search(/.*[@#$%^&*|\<>+§{}].*/) == 0) && (document.form_shop_main.prijmeni.value!='')) vysl += " - The last name contains invalid characters\n"; if ((document.form_shop_main.firma.value.search(/.*[@#$%^*|\<>+§{}].*/) == 0) && (document.form_shop_main.firma.value!='')) vysl += " - The company name contains invalid characters\n"; if (document.form_shop_main.adresa.value=='') vysl += " - The address must be filled out\n"; if ((document.form_shop_main.adresa.value.search(/.*[@#$%^&*|\<>+§{}].*/) == 0) && (document.form_shop_main.adresa.value!='')) vysl += " - The address contains invalid characters\n"; if (document.form_shop_main.mesto.value=='') vysl += " - The city name must be entered\n"; if ((document.form_shop_main.mesto.value.search(/.*[@#$&%^*|\<>+§{}].*/) == 0) && (document.form_shop_main.mesto.value!='')) vysl += " - The city name contains invalid characters\n"; if (document.form_shop_main.psc.value=='') vysl += " - The postal/zip code must be entered\n"; if ((document.form_shop_main.psc.value.search(/.*[@#$&%^*|\<>+§{}].*/) == 0) && (document.form_shop_main.psc.value!='')) vysl += " - The postal/zip code contains invalid characters\n"; if (document.form_shop_main.mail.value=='') vysl += " - Email address must be entered\n"; if ((document.form_shop_main.mail.value.search(/^([^(@#$*()!\?)]+)@([^(@#$*()!\?)]+)[.][a-zA-Z]{2,3}$/) != 0) && (document.form_shop_main.mail.value!='')) vysl += " - Invalid email address\n"; if ((document.form_shop_main.telefon.value.search(/.*[@#$&%^*|\<>+§{}].*/) == 0) && (document.form_shop_main.telefon.value!='')) vysl += " - The phone number contains invalid characters\n"; if (document.form_shop_main.prihlaseni.value=='') vysl += " - Usermane must be entered\n"; if ((document.form_shop_main.prihlaseni.value.search(/.*[@#$&%^*|\<>+§{}].*/) == 0) && (document.form_shop_main.prihlaseni.value!='')) vysl += " - The login name contains invalid characters\n"; if (document.form_shop_main.heslo.value=='') vysl += " - Password must be entered\n"; if ((document.form_shop_main.heslo.value.search(/.*[@#$&%^*|\<>+§{}].*/) == 0) && (document.form_shop_main.heslo.value!='')) vysl += " - The password contains invalid characters\n"; if (((document.form_shop_main.adresa_z.value!='') || (document.form_shop_main.mesto_z.value!='') || (document.form_shop_main.psc_z.value!='')) && (!((document.form_shop_main.adresa_z.value!='') && (document.form_shop_main.mesto_z.value!='') && (document.form_shop_main.psc_z.value!='')))) vysl += " - Enter the complete shipping address\n"; if ((document.form_shop_main.adresa_z.value.search(/.*[@#$%^&*|\<>+§{}].*/) == 0) && (document.form_shop_main.adresa_z.value!='')) vysl += " - The shipping address contains invalid characters\n"; if ((document.form_shop_main.mesto_z.value.search(/.*[@#$&%^*|\<>+§{}].*/) == 0) && (document.form_shop_main.mesto_z.value!='')) vysl += " - The city name contains invalid characters\n"; if ((document.form_shop_main.psc_z.value.search(/.*[@#$&%^*|\<>+§{}].*/) == 0) && (document.form_shop_main.psc_z.value!='')) vysl += " - The postal/zip code contains invalid characters\n"; return shop_result(vysl); } function kontrola_prihlaseni() { vysl=''; if ((document.form_shop_main.prihlaseni_jmeno.value=='') || (document.form_shop_main.prihlaseni_heslo.value=='')) vysl += " - Enter complete login information\n"; if ((document.form_shop_main.prihlaseni_jmeno.value.search(/.*[@#$&%^*|\<>+§{}].*/) == 0) && (document.form_shop_main.prihlaseni_jmeno.value!='')) vysl += " - The login name contains invalid characters\n"; if ((document.form_shop_main.prihlaseni_heslo.value.search(/.*[@#$&%^*|\<>+§{}].*/) == 0) && (document.form_shop_main.prihlaseni_heslo.value!='')) vysl += " - The password contains invalid characters\n"; return shop_result(vysl); } function kontrola_poslat_dotaz() { vysl=''; if (document.form_odeslat_dotaz.jmeno.value==' ') vysl += " - Name must be entered\n"; if ((document.form_odeslat_dotaz.jmeno.value.search(/.*[@#$&%^*|\<>+§{}].*/) == 0) && (document.form_odeslat_dotaz.jmeno.value!='')) vysl += " - The name contains invalid characters\n"; if (document.form_odeslat_dotaz.mail.value=='') vysl += " - Email address must be entered\n"; if ((document.form_odeslat_dotaz.mail.value.search(/^([^(@#$*()!\?)]+)@([^(@#$*()!\?)]+)[.][a-zA-Z]{2,3}$/) != 0) && (document.form_odeslat_dotaz.mail.value!='')) vysl += " - Invalid email address\n"; if (document.form_odeslat_dotaz.zprava.value=='') vysl += " - No question was entered\n"; if ((document.form_odeslat_dotaz.zprava.value.search(/.*[$%^*|\<>§{}].*/) == 0) && (document.form_odeslat_dotaz.zprava.value!='')) vysl += " - The question contains invalid characters\n"; return shop_result(vysl); } function kontrola_diskuse() { vysl=''; if (document.form_shop_main.diskuse_jmeno.value=='') vysl += " - Name must be entered\n"; if ((document.form_shop_main.diskuse_jmeno.value.search(/.*[@#$&%^*|\<>+§{}].*/) == 0) && (document.form_shop_main.diskuse_jmeno.value!='')) vysl += " - The name contains invalid characters\n"; if (document.form_shop_main.diskuse_zprava.value=='') vysl += " - No message was entered\n"; if ((document.form_shop_main.diskuse_zprava.value.search(/.*[@#$&%^*|\<>+§{}].*/) == 0) && (document.form_shop_main.diskuse_zprava.value!='')) vysl += " - The text contains unallowed characters\n"; return shop_result(vysl); } function shop_result(vysl) { if (vysl!='') { alert("The form contains the following errors:\n\n"+vysl); return false; } else { return true; } }