/* ---------------------------------------------- rolloverEvent ------------------------------------------------- */ var rolloverEvent = { add: function(obj, etype, fp, cap) { cap = cap || false; if (obj.addEventListener) obj.addEventListener(etype, fp, cap); else if (obj.attachEvent) obj.attachEvent("on" + etype, fp); }, remove: function(obj, etype, fp, cap) { cap = cap || false; if (obj.removeEventListener) obj.removeEventListener(etype, fp, cap); else if (obj.detachEvent) obj.detachEvent("on" + etype, fp); }, DOMit: function(e) { e = e? e: window.event; e.tgt = e.srcElement? e.srcElement: e.target; if (!e.preventDefault) e.preventDefault = function () { return false; } if (!e.stopPropagation) e.stopPropagation = function () { if (window.event) window.event.cancelBubble = true; } return e; } } /* ---------------------------------------------- Rollover ------------------------------------------------- */ var Rollover = { tipID: "tipDiv", showDelay: "gridPgProds", hideDelay: 200, ready:false,timer:null,tip:null,init:function(){ if(document.createElement && document.body && typeof document.body.appendChild != "undefined"){ if(!document.getElementById(this.tipID)){ var el=document.createElement("DIV"); el.id=this.tipID; document.body.appendChild(el); } this.ready=true; } }, show:function(e,msg,prodId,popType){ if(this.timer){ clearTimeout(this.timer); this.timer=0; } if(!this.ttready)return; this.tip=document.getElementById(this.tipID); this.writeTip(""); this.writeTip(msg); if(!this.tip.style.visibility)this.tip.style.visibility="hidden"; var thisImg=document.getElementById(prodId); var xLoc=getXloc(thisImg,popType); var yLoc=getYloc(thisImg,popType); this.positionTip(e,xLoc,yLoc); this.timer=setTimeout("Rollover.toggleVis('"+this.tipID+"', 'visible')",this.showDelay); }, writeTip:function(msg){ if(this.tip&&typeof this.tip.innerHTML!="undefined")this.tip.innerHTML=msg; }, positionTip:function(e,xLoc,yLoc){ var this_xLoc=parseInt(xLoc); var this_yLoc=parseInt(yLoc); this.tip.style.left=this_xLoc+"px"; this.tip.style.top=this_yLoc+"px"; }, hide:function(){ if(this.timer){ clearTimeout(this.timer); this.timer=0; } this.timer=setTimeout("Rollover.toggleVis('"+this.tipID+"', 'hidden')",this.hideDelay); if(this.followMouse)rolloverEvent.remove(document,"mousemove",this.trackMouse,true); this.tip=null; }, toggleVis:function(id,vis){ var el=document.getElementById(id); if(el)el.style.visibility=vis; }, trackMouse:function(e){ e=rolloverEvent.DOMit(e); Rollover.positionTip(e); } }; function getXloc(thisImg,popType) { var xLoc = thisImg.offsetLeft; thisImg = thisImg.offsetParent; if(popType == "65thumbs") {xLoc=xLoc+parseInt(-1)} else if (popType == "90thumbs") {xLoc=xLoc+parseInt(-4)} else if (popType == "PODthumbs") {xLoc=xLoc+parseInt(-2)} while (thisImg) { xLoc += thisImg.offsetLeft; thisImg = thisImg.offsetParent; } return xLoc; } function getYloc(thisImg,popType) { var yLoc = thisImg.offsetTop; thisImg = thisImg.offsetParent; if(popType == "65thumbs") { yLoc=yLoc+parseInt(-3)} else if(popType == "90thumbs") { yLoc=yLoc+parseInt(-4) } else if(popType == "PODthumbs") { yLoc=yLoc+parseInt(-3) } while (thisImg) { yLoc += thisImg.offsetTop; thisImg = thisImg.offsetParent; } return yLoc; } Rollover.ttready=true; // --------------------- getThumbInfo function -------------------------------- function getThumbInfo(product) { var rolloverContent; var prodId = product[0]; var imgUrl = product[1]; var popType = product[2]; var destinationUrl = product[3]; var prodCat = product[4]; var manName = product[5]; var prodName = product[6]; var catName = product[7]; var priceValue = product[8]; if(popType == "65thumbs") { rolloverContent = '