// right trans.style.left = trans_left + "px"; trans.style.top = offsetY + "px"; trans.style.width = flyoverX + "px"; trans.style.height = flyoverY + "px"; } avglsflyover.display(); }, display: function () { avglsflyover.count++; if (avglsflyover.count == 1) { var flyover = document.getElementById("XPLSS_Flyover"); if (flyover == null) return; // show the flyover, must use a little count to tell, crazy stuff flyover.style.visibility = "visible"; // show the transparent layer var trans_div = document.getElementById("XPLSS_Trans"); if (trans_div == null) return; trans_div.style.visibility = "visible"; avglsflyover.poppedUp = false; } }, show: function () { var div = document.getElementById("XPLSS_Flyover"); if (div == null) return; div.style.visibility = "visible"; var trans_div = document.getElementById("XPLSS_Trans"); if (trans_div == null) return; trans_div.style.visible = "visible"; }};var avglsinlineflyover = { build: function (riskCategory, riskName, bgColor, borderColor) { var html = ''; html += ""; html += ""; html += riskCategory + ""; html += riskName + ""; return html; }, popup: function (event, flyover, blUrl) { //set verdict 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