search, flyover)}); element.attachEvent("onmouseout", function(e){avglsflyover.hide(e)}); // check for attribute updates (elementAttribute is an associative array (i.e., object) if (this.elementAttribute) { for (a in this.elementAttribute) { if(this.elementAttribute[a]) element.setAttribute(a, this.elementAttribute[a]); } } // To dynamically reduce verdict image size if it causes its container to scroll // when not showing alt images determine if the element containing // the verdict image is scrolling and decrease the image size by // the scroll amount (min size is 80% or original) var reduceBy = 0.8; var scrl = 0; if (!alt_image || this.omitAltImage || this.VeriSignSplit == searchshield.VERISIGN_SPLIT_TESTB) { try{ var maxLoop = 5; var cN = element.parentNode.parentNode; //image->anchor->containerNodes... while (cN && maxLoop--) { if (cN.tagName == "DIV" || cN.tagName == "SPAN") { // get object height depending on ie document mode var clientHeight = (cN.clientHeight == 0 || (this.search.doc.documentMode && this.search.doc.documentMode < 8)) ? cN.offsetHeight : cN.clientHeight; scrl = cN.scrollHeight - clientHeight; break; } cN = cN.parentNode; } if (0 < scrl) { var eH = (element.height - scrl)/element.height; if (reduceBy > eH) eH = reduceBy; var newDim = Math.ceil(eH*element.height); element.height = newDim; element.width = newDim; element.style.height = newDim + "px"; element.style.width = newDim + "px"; } } catch(e){} } // set default style attributes element.style.display = ""; // if verisign icon showing move our icon up for better centering of the 2 // except for IE7 browser - it does not like this style try { var ieVersion = parseFloat(navigator.appVersion.split("MSIE")[1]); if (alt_image && (alt_image.length > 0) && ieVersion != 7) element.style.verticalAlign = "10%"; } catch(err){}; // apply custom element styles this.updateElementStyle(element, this.updateImageStyle) // update the click thru var link = this.search.doc.getElementById("L" + hash); if (link) { link.href = click_thru; link.id = link.id + "U" + score; } updated = true; // add the alternate image if supplied BUT not on avg yahoo if ((alt_image) && (alt_image.length > 0) && (!this.omitAltImage) && (this.VeriSignSplit != searchshield.VERISIGN_SPLIT_TESTB)) { var vhash = hash.substring(hash.indexOf("_")+1); // create a temporary link node var tmp_node = { element: element.parentNode, href: altClick_thru, hash: vhash + "VU" + score, search: this.searchHash, score: score }; var altAnchor = this.addImage(tmp_node, alt_image, false); if (altAnchor && altAnchor.firstChild) { altAnchor.firstChild.setAttribute("onmouseover", ""); altAnchor.href = altClick_thru; } } } if (updated != false) { this.resizeFrame(frameElem); return true; } return false;};searchshield.SearchEngine.prototype.updateElementStyle = function (element, elementStyle){ if (elementStyle) { // a NULL attribte value will unset it for(attr in elementStyle) { try { if (element.style.setAttribute) element.style.setAttribute(attr, elementStyle[attr]); else element.style[attr] = elementStyle[attr]; } catch(err){} } }};searchshield.SearchEngine.prototype.resizeFrame = function (frameElem){ // resize frame to prevent unwanted scrolling after inserting verdicts // ignore inline and non-frame engines if ((this.type == 'inline') || (!this.processFrames)) return; // ensure all required elements are available if ((frameElem == null) || (frameElem.style == null) || (frameElem.contentWindow == null)) return; // if frame is scrolling vertically then resize var frameHeight = parseInt(frameElem.style.height, 10); if (!isNaN(frameHeight) && (frameHeight < frameElem.contentWindow.document.body.scrollHeight)) frameElem.style.height = frameElem.contentWindow.document.body.scrollHeight + 'px'; return;};searchshield.SearchEngine.prototype.getImgElement = function (element){ // return an xpl img element associated with a given element if (element == null) return null; // go up the parent tree looking for a header or div while ( (element.parentNode != null) &&