function DivShow(e, articles_id) { if(!e) e = window.event; var myBrowser = { IE: !!(window.attachEvent && !window.opera), Opera: !!window.opera, WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1, Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1, MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/) }; if(myBrowser.IE) { document.all.picture_overlay_div.style.left = (e.clientX + document.body.scrollLeft + 20); document.all.picture_overlay_div.style.top = (e.clientY + document.body.scrollTop + 20); document.all.picture_overlay_div.style.visibility = "visible"; document.all.picture_overlay_image.src = "../images/image_" + articles_id + "_1.jpg"; } else { document.getElementById("picture_overlay_div").style.visibility = "visible"; document.getElementById("picture_overlay_image").src = "../images/image_" + articles_id + "_1.jpg"; document.getElementById("picture_overlay_div").style.left = e.pageX + 20; document.getElementById("picture_overlay_div").style.top = e.pageY + 20; } } function DivHide() { var myBrowser = { IE: !!(window.attachEvent && !window.opera), Opera: !!window.opera, WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1, Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1, MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/) }; if(myBrowser.IE) { document.all.picture_overlay_div.style.visibility = "hidden"; } else { document.getElementById("picture_overlay_div").style.visibility = "hidden"; } } function changePicture(picture_id, articles_id) { document.getElementById("mainpicture").src = "../images/image_" + articles_id + "_" + picture_id + ".jpg"; } function openWindow(url) { window_1 = window.open(url, "_blank", "width=400,height=500,left=100,top=100"); window_1.focus(); } function openWindowOrder(url) { window_1 = window.open(url, "_blank", "width=780,height=600,left=100,top=100,scrollbars=yes"); window_1.focus(); } function openWindowChat(url) { window_1 = window.open(url, "_blank", "width=405,height=700,left=100,top=100,scrollbars=no"); window_1.focus(); } function addToBag(articles_id) { var stk = parseInt(document.getElementById("new_stk_" + articles_id).value); if(document.getElementById("bag_stk_" + articles_id + "_1").style.visibility == 'visible') { var bag_stk = parseInt(document.getElementById("bag_stk_" + articles_id + "_1").firstChild.nodeValue); } else { var bag_stk = 0; } if(stk > 0) { var ajax = new Ajax.Request('index.php', {method: 'get', parameters: {action: 'articles', function_2: 'bag_add', new_articles_id: '' + articles_id + '', new_stk: '' + stk + ''}}); if(document.all){ document.getElementById("bag_stk_" + articles_id + "_1").innerText = bag_stk + stk; } else{ document.getElementById("bag_stk_" + articles_id + "_1").innerHTML = bag_stk + stk; } document.getElementById("bag_stk_" + articles_id + "_1").style.visibility = 'visible'; document.getElementById("bag_stk_" + articles_id + "_2").style.visibility = 'visible'; document.getElementById("new_stk_" + articles_id).value = 1; } else { document.getElementById("new_stk_" + articles_id).value = 1; } } function checkEnter(e, articles_id) { var myBrowser = { IE: !!(window.attachEvent && !window.opera), Opera: !!window.opera, WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1, Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1, MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/) }; if(myBrowser.IE) { if(!e) e = window.event; if(e.keyCode == 13) { setTimeout(addToBag(articles_id),100); } } }