NS4 = (document.layers) ; IE4 = (document.all) ; mac=((IE4)&&(navigator.appVersion.indexOf ("Mac")!=-1)); DOM=document.documentElement&&!NS4&&!IE4; mswnd=(navigator.appVersion.indexOf("Windows")!=-1||navigator.appVersion.indexOf("WinNT")!=-1); if(IE4) { av=navigator.appVersion; avi=av.indexOf("MSIE"); if (avi==-1) version = parseInt(av); else { var version = av.substring(avi+4, avi+8); version = parseInt(version); } } var menuLibDef = false; var JS_detect_flash=0; //if(navigator.plugins["Shockwave Flash"]) JS_detect_flash = 1; function load(key, name, value, target) { document.epus.elements.key.value = key; if(name) document.epus.elements[name].value = value; document.epus.target = target; document.epus.submit(); } function printer(url) { var x = parseInt(window.screen.availWidth/10); var y = parseInt(window.screen.availHeight/10); w = parseInt(window.screen.availWidth/1.3); h = parseInt(window.screen.availHeight/1.4); win = window.open(url, 'print', 'toolbar=yes,scrollbars=yes,status=no,resizable=yes,height='+h+',width='+w+",left="+x+",top="+y+",screenX="+x+",screenY="+y); win.focus(); if(win.print) win.print(); } function view(url, w, h) { var x = parseInt(window.screen.availWidth/5); var y = parseInt(window.screen.availHeight/5); w = w + 34; h = h + 33; win = window.open(url, 'win', 'scrollbars=yes,status=yes,resizable=yes,height='+h+',width='+w+",left="+x+",top="+y+",screenX="+x+",screenY="+y); win.resizeTo(w, h); win.focus(); } function showGalleryImg(url, width, height, alt) { var x = parseInt(window.screen.availWidth/5); var y = parseInt(window.screen.availHeight/5); var w = width + 25; var h = height + 15; if(w > 800) w = 800; if(h > 600) h = 600; win = window.open('', 'gallery', 'scrollbars=yes,status=yes,resizable=yes,height='+h+',width='+w+",left="+x+",top="+y+",screenX="+x+",screenY="+y); win.document.open("text/html"); win.document.writeln('Galerie
'+alt+'
'); win.document.close(); win.resizeTo(w+15, h+46); win.focus(); } function getObject(object) { var dom = window.document; var result = null; if(dom) { if(dom.getElementById && dom.getElementById(object) != null) { result = dom.getElementById(object); } else if(dom.layers) { result = dom.layers[object]; } else if (dom.all) { if(dom.all[object]) result = dom.all[object]; } } return result; } function setHTML(object, html) { var source = getObject(object); if(source == null) return false; source.innerHTML = html; return true; } function setVisible(object) { var source = getObject(object); if(source == null) return false; if(source.style) source.style.visibility = 'visible'; if(source.visibility) source.visibility = 'show'; return true; } function setHidden(object) { var source = getObject(object); if(source == null) return false; if(source.style) source.style.visibility = 'hidden'; if(source.visibility) source.visibility = 'hide'; return true; } function setDisplay(object, value) { var source = getObject(object); if(source == null) return false; if(source.style) source.style.display = value; return true; } function setBackgroundImage(object, value) { var source = getObject(object); if(source == null) return false; if(source.style) { source.style.backgroundImage = value; } //alert(source.style.backgroundImage); return true; } function sendLogin(form) { form.user_password.value = calcMD5(form.input_password.value); form.input_password.value = ""; return true; } function showCatalogueSearch(id) { id = parseInt(id); setDisplay('form'+id, 'block'); setDisplay('hide'+id, 'inline'); setDisplay('show'+id, 'none'); return true; } function hideCatalogueSearch(id) { id = parseInt(id); setDisplay('form'+id, 'none'); setDisplay('hide'+id, 'none'); setDisplay('show'+id, 'inline'); return true; } function popMenu(url) { url = unescape(url); w = 800 + 34; h = 600 + 33; win = window.open(url, 'popMenu', 'scrollbars=yes,status=yes,resizable=yes,height='+h+',width='+w); win.focus(); } function sklad() { win = window.open('/static/vyprodej/sklad.html', 'sklad', 'width=570,height=560,top=0,left=0,status=no,menubar=no,scrollbars=yes'); win.focus(); } function servis() { win = window.open('/static/servis-objednavka/index.php', 'servis', 'width=612,height=560,top=0,left=0,status=no,menubar=no,scrollbars=yes'); win.focus(); } function actionPopUp() { var width = 720; var height = 400; with (Math) { winpos_left = (screen.availWidth - width)/2; winpos_top = (screen.availHeight - height)/2; } window.open("http://www.alfaromeo.cz/action_popup.php", "", "left="+winpos_left+",top="+winpos_top+",width="+width+",height="+height+","+ "toolbar=no,location=no,directories=no,status=no,menubar=no"+ ",scrollbars=yes,resizable=yes,copyhistory=no"); } function incred() { win = window.open('http://web.opel.cz/kampane/uzasnakovi/uzasnakove-modely.html', 'ic', 'width=640,height=640,top=0,left=0,status=no,menubar=no,scrollbars=no,resizeable=no'); win.focus(); } function meriva() { win = window.open('/static/meriva/index.html', 'meriva', 'width=648,height=496,top=0,left=0,status=no,menubar=no,scrollbars=yes,resizeable=no'); win.focus(); } function getCookie(name) { var j = name + "="; var i = document.cookie.indexOf(j); if(i == -1) { return ""; } i += j.length; if(i >= document.cookie.length) return ""; var l = document.cookie.indexOf(";", i); if(l == -1) l = document.cookie.length; return document.cookie.substring(i, l); } function Set_Cookie( name, value, expires, path, domain, secure ) { // set time, it's in milliseconds var today = new Date(); today.setTime( today.getTime() ); if ( expires ) { expires = expires * 1000 * 60 * 60 * 24; } var expires_date = new Date( today.getTime() + (expires) ); document.cookie = name + "=" +escape( value ) + ( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + ( ( path ) ? ";path=" + path : "" ) + ( ( domain ) ? ";domain=" + domain : "" ) + ( ( secure ) ? ";secure" : "" ); }