info var div = document.getElementById('XPLSS_InlineFlyover'); if (div == null) return; // blUrl is an object for a blacklisted short url // when it is passed get the final url if (blUrl != undefined) { var finalUrl = searchshield.avgCallFunc(document, 'GetFinalUrl', blUrl.sUrl); var uri = searchshield.parseLink(unescape(finalUrl)); if (uri.source != null) { // regexp failed so used split to parse url var qsUrl = uri.source.indexOf("?url="); if (qsUrl != -1) riskName = blUrl.riskNameLabel + uri.source.substring(qsUrl + 5); else riskName = blUrl.riskNameLabel + uri.source; } else if ((uri.qsArray.url != null) && (uri.qsArray.url.length > 0)) { riskName = blUrl.riskNameLabel + uri.qsArray.url; } else riskName = blUrl.riskNameLabel + blUrl.sUrl flyover = avglsinlineflyover.build(blUrl.riskCategory, riskName, blUrl.bgColor, blUrl.borderColor); } div.innerHTML = flyover; div.style.width = "auto"; //reset width div.style.position = "absolute"; if (!event) event = window.event; var eventTarget = event.srcElement; avglsinlineflyover.position(eventTarget); }, hide: function (event) { if (!event) event = window.event; var div = document.getElementById("XPLSS_InlineFlyover"); if (div == null) return; div.visibility = "hidden"; //invisible div.style.left = "-5000px"; }, position: function (imageElem) { var flyover = document.getElementById('XPLSS_InlineFlyover'); 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]; // Must know if there is a horizontal scroll bar for Firefox // for proper flyover positioning near bottom edge var scrollYWidth = winSize[2]; var scrollBarX = winSize[2] > 0 ? true : false; // get the exact size of the flyover var flyoverSize = searchshield.elementSize(flyover); var flyoverX = flyoverSize[0]; var flyoverY = flyoverSize[1]; flyover.style.width = flyoverX + "px"; // get the bounding rect for image(s) var imgRect = imageElem.getBoundingClientRect(); // half width/height (center) 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(imageElem) + halfX; var posY = searchshield.offsetTop(imageElem) + halfY; var pageOffsetX = 0; var pageOffsetY = 0; // normalize pos to 0 -- get amount of scrolling in browser window var scroll = searchshield.scrollSize(imageElem); var pageOffsetX = scroll[0]; var pageOffsetY = scroll[1]; var hasParentFrame = scroll[2]; posX -= pageOffsetX; posY -= pageOffsetY; //compensate for Firefox 3 if (posX < imgRect.left) posX = imgRect.left+halfX; // 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) - halfY; locateY = 2; } } else { // above if ((windowY - posY) < (windowY/4)) { offsetY -= (flyoverY - halfY); } else { offsetY -= (flyoverY / 2) + halfY; locateY = 2; } } // make sure we aren't off the screen if (offsetY < 0) offsetY = 0; if ((offsetY + flyoverY) > windowY) {