a block severity if foundUrl is given var severity = !!foundUrl ? avgreport.BLOCK_SEVERITY : parseInt(parts[0], 10); var category = ""; var threat = ""; // fill in the category and threat if something was found if (severity > 0) { category = parts[2]; threat = parts[4]; }// else// return; var scan_result = searchshield.avgCallFunc(doc, 'ReportScanResult', url, url, threat, category, ip, severity); var scan_end = avgreport.scanEnd(doc, url); return (scan_result && scan_end); }, scanEnd: function (doc, url) { return searchshield.avgCallFunc(doc, 'ReportScanEnd', url); }, GetInterstitialIP: function (interstitial) { // simple regex to pull the IP address var regex = /(([1-9][0-9]{0,2})|0)\.(([1-9][0-9]{0,2})|0)\.(([1-9][0-9]{0,2})|0)\.(([1-9][0-9]{0,2})|0)/; var match = regex.exec(interstitial); if (!match) return ''; return match[0]; }}/////////////// AVG TOOLBAR REPORTING ////////////////////////////// FLYOVERS ///////////////var avglsflyover = { count: 0, poppedUp: false, poppedElement: null, orig_onmousemove: null, reset: function () { avglsflyover.count = 0; avglsflyover.poppedUp = false; avglsflyover.poppedElement = null; avglsflyover.orig_onmousemove = null; }, popup: function (event, hash, search, flyover) { if (!event) event = window.event; var div = document.getElementById("XPLSS_Flyover"); if (div == null) return; // 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; // if the element is the clock, don't pop over it if ((eventTarget.src != null) && (eventTarget.src.indexOf("clock.gif") != -1)) return; // save the 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 =