// Example: // alert( readCookie("myCookie") ); var promo; function readCookie(name) { var cookieValue = ""; var search = name + "="; if(document.cookie.length > 0) { offset = document.cookie.indexOf(search); if (offset != -1) { offset += search.length; end = document.cookie.indexOf(";", offset); if (end == -1) end = document.cookie.length; cookieValue = unescape(document.cookie.substring(offset, end)) } } //alert(cookieValue); return cookieValue; } // Example: // writeCookie("myCookie", "my name", 24); // Stores the string "my name" in the cookie "myCookie" which expires after 24 hours. function writeCookie(name, value, hours) { var expire = ""; //if(hours != null) //{ expire = new Date((new Date()).getTime() + 10 * 3600000); expire = "; expires=" + expire.toGMTString(); //} document.cookie = name + "=" + escape(value) + expire + "; path=/;"; } lastScrollY = 0; function heartBeat() { diffY = document.body.scrollTop; //alert(diffY); percent =.1*(diffY-lastScrollY); if(percent>0) percent = Math.ceil(percent); else percent = Math.floor(percent); document.all.float.style.pixelTop+= percent; lastScrollY = lastScrollY+percent; } window.setInterval("heartBeat()",1); function hide(){ obj=document.getElementById("float"); obj.style.display='none'; } function show(){ obj=document.getElementById("float"); //position:absolute;right:1px;top:100;filter:alpha(opacity=50);z-index:99;width:140; obj.style.position='absolute'; obj.style.right='1px'; obj.style.top='100'; obj.style.filter='alpha(opacity=50)'; //obj.style.z-index='99'; obj.style.width='140'; obj.style.display=''; } function redraw(promo) { heartBeat(); //show(); tmp=readCookie("pro_str"); //alert(tmp); item_arr=tmp.split("###"); floatstr = "