function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i'+ttl+''); writeln(''); writeln('function resizePopup() {'); writeln('width = document.images[0].width + 10; '); writeln('height = document.images[0].height + 50; '); writeln('window.resizeTo(width,height); '); writeln('if (window.innerWidth) { window.innerWidth = width - 10; window.innerHeight = height - 30; }'); writeln('}'); writeln(''); writeln('') writeln('Закрыть'); close(); } } function add2basket(requestUrl){ var a = new Ajax.Request(requestUrl, { method:'post', onSuccess: function(transport){ var response = transport.responseText; //alert(response); //$("debug").innerHTML=response; if(response>0){ if (typeof(korzina_setCount) == "function") { korzina_setCount(response); alert("Товар добавлен в корзину!"); } }else{ if (typeof(korzina_setCount) == "function") { //alert("Ошибка добавления товара в корзину!"); korzina_setCount(response); } } }, onFailure: function(){ alert('Ошибка доступа!'); } }); } window.onload=function() { sb= { okno:document.getElementById('telo'), //############################################ obl:document.getElementById('obl'), //############################################ pause:10, //############################################ stop:true, //############################################ doVerScroll:function (napr) { sb.vec=napr; //alert(napr); var newTopVal=sb.obl.style.pixelTop-napr; var newBotVal=newTopVal+sb.obl.offsetHeight; if(napr>0)//UP { //alert('UP') if(newBotVal>=sb.okno.offsetHeight )//newBotValsb.okno.offsetWidth )//newBotVal