element we popped over avglsflyover.poppedElement = eventTarget; // if no flyover get it if ((flyover == null) || (flyover == "")) { flyover = searchshield.avgCallFunc(frameDoc, 'BuildFlyover', hash); if (!flyover) return; // cleanup flyover, replace any new lines flyover = flyover.replace(/\r/g, ""); flyover = flyover.replace(/\n/g, ""); // escape any single quotes flyover = flyover.replace(/'/g, "'"); } // set the html in the layer div.innerHTML = flyover; // there is an unwanted text node that causes vertical misalignment of flyover if (div.firstChild.nodeType == 3) div.removeChild(div.firstChild); avglsflyover.poppedUp = true; // reset display count avglsflyover.count = 0; div.onmouseout = avglsflyover.hide; // if an onmousemove is already set and it isn't us, save it and restore later if ((frameDoc.onmousemove != null) && (frameDoc.onmousemove != avglsflyover.position)) avglsflyover.orig_onmousemove = frameDoc.onmousemove; frameDoc.onmousemove = avglsflyover.position; }, hide: function (event, force) { var div = document.getElementById("XPLSS_Flyover"); if ((div == null) || (div.style == null) || (div.style.visibility == "hidden")) return; var trans_div = document.getElementById("XPLSS_Trans"); if ((trans_div == null) || (trans_div.style == null) || (trans_div.style.visibility == "hidden")) return; if (!!force) return setFlyoverStyle(div, trans_div); if (!event) event = window.event; // establish target element and get its containing document object // in case verdict is inside a frame var eventTarget = event.srcElement || event.currentTarget; var frameDoc = eventTarget.ownerDocument; // restore onmousemove if (avglsflyover.orig_onmousemove != null) frameDoc.onmousemove = avglsflyover.orig_onmousemove; if (avglsflyover.poppedElement) avglsflyover.poppedElement.style.border = ""; var relatedElement = event.toElement; if (!relatedElement) { //this happens on mouseout when verdict and flyover are on different frames/docs window.top.document.detachEvent('onmouseout', avglsflyover.hide); window.top.document.attachEvent('onmouseout', avglsflyover.hide); return; } // make sure we aren't still over the popped image or our layer if (searchshield.containedIn(avglsflyover.poppedElement, relatedElement) || searchshield.containedIn(div, relatedElement) || searchshield.containedIn(trans_div, relatedElement)) { return; } setFlyoverStyle(); // hide and move somewhere off screen (negative offsets) function setFlyoverStyle() { div.style.visibility = "hidden"; div.style.left = "-2100px"; div.style.top = "-2100px"; trans_div.style.visibility = "hidden"; trans_div.style.left = "-2100px"; trans_div.style.top = "-2100px"; return true; } }, position: function () { if (!avglsflyover.poppedUp || (avglsflyover.poppedElement == null)) return; var flyover = document.getElementById("XPLSS_Flyover"); if (flyover == null) return; // relative position of flyover in relation to icon var locateX = 0; // 0=left, 1=right var locateY = 0; // 0=above, 1=below, 2=beside icon // get window sizes var winSize = searchshield.viewPortSize(); var windowX = winSize[0]; var windowY = winSize[1]; // get the exact size of the flyover var flyoverSize = searchshield.elementSize(flyover); var flyoverX = flyoverSize[0]; var flyoverY = flyoverSize[1]; var verdictWidth = 0; if (avglsflyover.poppedElement && avglsflyover.poppedElement.width) verdictWidth = avglsflyover.poppedElement.width; // get the bounding rect for image(s) var imgRect = searchshield.GetFullBoundingRect(avglsflyover.poppedElement); // half width/height of element bounding rect var halfX = (imgRect.right - imgRect.left) / 2; var halfY = (imgRect.bottom- imgRect.top) / 2; // element the mouse is over, get the center position var posX = searchshield.offsetLeft(avglsflyover.poppedElement) + halfX; var posY = searchshield.offsetTop(avglsflyover.poppedElement) + halfY; // if a verdict is inside a frame must get offsets for the frame element var docFrames = document.frames; if (docFrames) { for (var i=0; i < docFrames.length; i++) { try { var frameElem = docFrames[i].frameElement; if (frameElem.contentWindow.document.getElementById(avglsflyover.poppedElement.id)) { posX += searchshield.offsetLeft(frameElem); posY += searchshield.offsetTop(frameElem); break; } } catch(frmErr){} } } var transXOffset = 0; if (imgRect.mid == undefined) transXOffset =