function switchLanguage(lang){ $.cookie("lang", lang2,{path: '/', secure: SSL_COOKIE}); document.location = document.location; } function switchLang(lang1, lang2, unid1, unid2, webdbname){ //switchLanguage(lang2); //YAHOO.util.Cookie.set("lang", lang2,{path: "/"}); $.cookie("lang", lang2,{path: '/', secure: SSL_COOKIE}); //document.location = document.location; var whref = document.location.href; if (lang1==lang2){ return document.location.href } else { if (whref.toLowerCase().replace('/'+lang1+'/','/'+lang2+'/')==whref.toLowerCase()){ //alert('WebDbName'); return '/'+ webdbname.replace('/'+lang1+'/','/'+lang2+'/').replace(unid1,unid2) } else { //alert(whref); //alert(unid1 + " - "+ unid2); //alert(whref.replace('/'+lang1+'/','/'+lang2+'/').replace(unid1,unid2)); //alert(whref.replace(unid1,unid2)); whref =whref.replace('/'+lang1+'/','/'+lang2+'/').replace(unid1.toUpperCase(),unid2.toUpperCase()) whref =whref.replace(unid1.toLowerCase(),unid2.toLowerCase()) return whref } } } function getDebugTime(res,comment) { var d=new Date(); rozdil = (d.getTime() - debugLastTime); //alert (rozdil); debugLastTime = d.getTime(); return( res + String.fromCharCode(10) + d.getTime() + " = " + (rozdil)+ " - " +comment); } function toNum(obj,e) { //alert(obj.value);; //kontrola vstupu do pole na celé číslo //příklad: var nums = new RegExp('^[0-9]+$'); var x1 = obj.value; if (x1!='' && x1.match(nums)==null) { //alert('Pouze číslice (0-9).'); obj.value = (isNaN(parseInt(x1))) ? '': parseInt(x1); } //alert(obj.value); $("#"+obj.id).val(obj.value) } function mnozstviToNum(obj,reference,e) { //toNum(obj); var key = 0; if (event.keyCode) key = window.event.keyCode; if (event.which) key = window.event.which; //alert("Keypress was "+key); //alert($('#mnozstvi_'+reference).val()); //alert(obj.value); //alert(obj.value.length); maxCount = 1000; //alert(maxCount ); //if (obj.value.length>maxCount ){} $('#mnozstvi_'+reference).val(obj.value); //pro podokna akční zboží a doprodej je duplicitní pole množství a při vkládání do košíku to pak dává množství=1 if (key==13){ //alert("ENTER"); if (reference==''){ shopDetailAddToCart() }else{ shopAddToCart(reference,'') } } } function VlozitHlavicku() { document.write(" "); document.write(" dodávky a sluĹľby | "); document.write(" obchodnĂ­ podmĂ­nky "); document.write(" "); } function VlozitFlash(videosoubor, sirka, vyska, pozadi) { document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); } function VlozitHlavniMenu() { document.write(" DomĹŻ "); document.write(" Novinky "); document.write(" Sortiment "); document.write(" CenĂ­ky "); document.write(" Ĺ kolenĂ­ "); document.write(" Servis "); document.write(" Kontakty "); document.write(" O nás "); } function WebZeme(kod) { switch(kod) { case "de-DE": return("http://www.adi-gardiner.com/de-DE/"); case "es-es": return("http://es-eshop.adiglobal.com"); case "ex-CZ": return("http://www.adiglobal.cz"); case "ex-EN": return("http://www.adiglobal.cz/iiWWW/en/produkty110.nsf/wp/domu"); case "ex-IT": return("http://it-eshop.adiglobal.com"); case "ex-NL": return("https://www.dk-eshop.adiglobal.com/"); case "ex-PL": return("http://pl-eshop.adiglobal.com/"); case "ex-SL": return("http://www.adiglobal.sk"); case "fr-FR": return("http://www.adi-gardiner.com/fr-FR/"); case "ie-ie": return("http://www.adi-gardiner.com/ie-ie/"); case "it-IT": return("http://it-eshop.adiglobal.com"); case "nl-NL": return("http://nl-eshop.adiglobal.com"); case "pt-PT": return("http://www.adi-gardiner.com/pt-PT/"); case "ru-RU": return("http://www.adi-gardiner.com/ru-RU/"); case "uk-uk": return("http://uk-eshop.adiglobal.com"); case "za-ZA": return("http://www.adi-gardiner.com/za-ZA/"); break; }; } function WebZeme_old(kod) { switch(kod) { case "de-DE": return("http://www.adi-gardiner.com/de-DE/"); case "es-es": return("http://www.adi-gardiner.com/es-es/"); case "ex-CZ": return("http://www.adi-olympo.cz"); case "ex-EN": return("http://www.adi-olympo.com"); case "ex-IT": return("http://www.adi-gardiner.com/it-IT/"); case "ex-NL": return("http://www.alarmsystem.dk"); case "ex-PL": return("http://www.adi-intl.pl"); case "ex-SL": return("http://www.olympo.sk"); case "fr-FR": return("http://www.adi-gardiner.com/fr-FR/"); case "ie-ie": return("http://www.adi-gardiner.com/ie-ie/"); case "it-IT": return("http://www.adi-gardiner.com/it-IT/"); case "nl-NL": return("http://www.adi-gardiner.com/nl-NL/"); case "pt-PT": return("http://www.adi-gardiner.com/pt-PT/"); case "ru-RU": return("http://www.adi-gardiner.com/ru-RU/"); //case "uk-uk": return("http://www.adi-gardiner.com/uk-uk/"); case "uk-uk": return("http://www.adi-gardiner.co.uk/"); case "za-ZA": return("http://www.adi-gardiner.com/za-ZA/"); break; }; } function VlozitVolbuZeme() { //document.write("
"); document.write(" "); //document.write("
"); } function VlozitKategorieProduktu() { document.write("

Produkty

"); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write("
 EZS
 Perimetr
 EPS
 CCTV
 Access
 Interkom/Fermax
 Integrace a projekty
 EZS a EKV MB Series
 Komunikace
 Strukturovaná kabeláž
"); } function VlozitNovinkyTop3() { NactiZpravy(); // načtení zprávy ze souboru novinky-zpravy.js document.write(" "); document.write(" "); for(i=zprava_nadpis.length-1; i>=zprava_nadpis.length-3; i--) { document.write(" "); } document.write("
Novinky
" + zprava_datum[i] + "
" + zprava_nadpis[i] + "
"); } function VlozitSkoleniTop3() { document.write(''); document.write(''); } function VlozitObrazekStranky(nazev, pocet) { do {obrazek = Math.ceil(Math.random()*pocet)} while (obrazek == GetCookie("adi-olympo_obrazek-stranky")); document.cookie="adi-olympo_obrazek-stranky=" + obrazek; document.write(" "); } function VlozitZapati() { document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write("
ADI-OLYMPO je obchodnĂ­ znaÄŤkou Honeywell, spol. s r.o. - Security Products o.z.Ochrana soukromĂ­
"); } function AktivujNovyProdukt(prvek) { for(i=max; i>max-pocet; i--) { document.getElementById("novy_produkt_zahlavi"+i).style.background = "#9A8F90"; }; prvek.style.background = "#E42E2F"; document.getElementById("novy_produkt_nazev").innerHTML = produkt_nazev[aktivni]; document.getElementById("novy_produkt_popis").innerHTML = produkt_popis[aktivni]; document.getElementById("novy_produkt_obrazek").src = "./img/produkty/" + produkt_nazev[aktivni] + ".jpg"; var pole = produkt_param[aktivni].split(';'); var parametry = ""; for(z = 0; z < pole.length; z++) {parametry+="
  • " + pole[z] + "
  • ";}; document.getElementById("novy_produkt_parametry").innerHTML = parametry; } function NoveProduktyCyklus() { AktivujNovyProdukt(document.getElementById("novy_produkt_zahlavi"+aktivni)); aktivni--; if (aktivni==max-pocet) aktivni=max; } function getCookieVal(offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function GetCookie(name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; }