reset display count avglsflyover.count = 0; avglsflyover.position(); }, hide: function (event) { var frameDoc = document || top.document; var div = frameDoc.getElementById("XPLSS_Flyover"); if ((div == null) || (div.style == null) || (div.style.visibility == "hidden")) return; var trans_div = frameDoc.getElementById("XPLSS_Trans"); if ((trans_div == null) || (trans_div.style == null) || (trans_div.style.visibility == "hidden")) return; // scroll and keydown events will pass a null event by design // toElement will be null when mousing out of frameelement containing a verdict if (event == null || event.toElement == null) { return; } if (trans_div.contains(event.toElement) || div.contains(event.toElement)) return; // if the toElement is a cooresponding alt image then don't hide // use try/catch because toElement will be null when mousing out of frame try { if (!!event.toElement.id && !!event.srcElement.id) { if (event.toElement.id.indexOf(event.srcElement.id.substring(0,event.srcElement.id.length-2)) == 0) return; if (event.srcElement.id == 'XPLSS_Trans' && /XPLSS_\d+VU\d/.test(event.toElement.id)) return; } } catch(err){} // hide and move somewhere off screen (negative offsets) 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 = -1 * halfX; else transXOffset = ((imgRect.right + imgRect.left) / 2) - imgRect.mid; // normalize pos to 0 -- get amount of scrolling in browser window var scroll = searchshield.scrollSize(); var pageOffsetX = scroll[0]; var pageOffsetY = scroll[1]; posX -= pageOffsetX; posY -= pageOffsetY; // setup the offsets var offsetX = posX; var offsetY = posY; // calc where to display on page if ((windowX - posX) > posX) { // right offsetX += halfX; locateX = 1; } else { //left offsetX -= (flyoverX + halfX); } if ((windowY - posY) > posY) { // below if (posY < (windowY/4)) { offsetY -= halfY; locateY = 1; } else { offsetY -= (flyoverY / 2); locateY = 2; } } else { // above if ((windowY - posY) < (windowY/4)) { offsetY -=