!= null) && (insertNode.tagName != null) && (insertNode.tagName == "SPAN")) { insertNode= insertNode.nextSibling; } // see if we already have an image anchor if ((insertNode != null) && (insertNode.id != null) && (insertNode.id == "avg_ls_anch")) { return null; } var html = ''; var image = this.inline.clockImage; if (aRisk != null && nSeverity != null) { var riskCategory = aRisk[1]; var riskName = aRisk[2]; var bgColor = this.inline.color.background[nSeverity]; var borderColor = this.inline.color.border[nSeverity]; image = this.inline.image[nSeverity]; var blUrl; if (blShortUrl) { var aRiskName = riskName.split(':'); var sUrl = searchshield.checkUrl(aRiskName[1]); blUrl = {}; blUrl.riskNameLabel = aRiskName[0] + ': '; blUrl.riskCategory = riskCategory; blUrl.bgColor = bgColor; blUrl.borderColor = borderColor; blUrl.sUrl = sUrl; } else { html = avglsinlineflyover.build(riskCategory, riskName, bgColor, borderColor); } } doc = anchor.ownerDocument; var img = doc.createElement("img"); img.src = image; img.setAttribute("id","avg_ls_image"); img.style.width = "12px"; img.style.border = "none"; img.style.padding = "0 3px"; img.style.margin = "0"; img.style.display = "inline"; if ((html && html.length > 0) || (blUrl != undefined)) { img.setAttribute("title", ""); img.attachEvent("onmouseover", function(e){avglsinlineflyover.popup(e, html, blUrl)}); img.attachEvent("onmouseout", function(e){avglsinlineflyover.hide(e)}); } // create the link element var newAnchor = doc.createElement("A"); newAnchor.setAttribute("id", "avg_ls_anch"); newAnchor.appendChild(img); img = null; // insert the node as either a sibling or a child if (insertNode != null) anchor.parentNode.insertBefore(newAnchor, insertNode); else anchor.parentNode.appendChild(newAnchor); return newAnchor; };//////////////// SEARCH ENGINE /////////////////////////////// GOOGLE SEARCH ENGINE ///////////////searchshield.GoogleSearchEngine = function(search){ searchshield.SearchEngine.call(this, search); this.onlyPrimaries = false;};searchshield.GoogleSearchEngine.prototype = new searchshield.SearchEngine();searchshield.GoogleSearchEngine.prototype.constructor = searchshield.GoogleSearchEngine;searchshield.GoogleSearchEngine.prototype.name = "google"; // the name by which the search engine is known (always lowercase)searchshield.GoogleSearchEngine.prototype.validSearch = function(href) { var uri; if (typeof(this.search) === 'undefined' || null === this.search) uri = searchshield.parseLink(href); else uri = this.search.uri; if(!uri || !uri.host) return false; var hostMatch = false; var domain = uri.host; // re stitch the uri path and query elements to // use existing logic var path = uri.path + uri.delimiter + uri.query; // Domains valid for google searches, must start with '.' var valid_domains = new Array(".google.co", ".mozilla.co"); // For Google the host must match: // .google.com OR // .google.co.XX where XX is a country code // .google.XX where XX is a country code // Where any subdomain can come before the top level domain var domLen = valid_domains.length; for (var i = 0; i < domLen; i++) { var domainLen = domain.length; var valid_domain_len = valid_domains[i].length; var tldPos = domain.indexOf(valid_domains[i]); if (tldPos > -1) { if (domain.charAt(tldPos + valid_domain_len) == 'm') hostMatch = true; else if ((domain.charAt(tldPos + valid_domain_len) == '.') && ((domainLen - tldPos) == valid_domain_len+3)) hostMatch = true; } else { // get the form .google. to check the length of var dot_pos = valid_domains[i].indexOf(".",1); var valid_short_name = valid_domains[i].substring(0, dot_pos+1); tldPos = domain.indexOf(valid_short_name); if ((tldPos > -1) && ((domainLen - tldPos) == valid_domain_len)) hostMatch = true; } if (hostMatch) { // replace beginning of domain with www.google since links will refer back to it if ((i > 0) && (tldPos > -1)) { var last_dot = domain.indexOf(".",tldPos+1) if (last_dot > -1) domain = "www.google" + domain.substring(last_dot); } break; } } if (hostMatch) { // using ajax engine if ((path.indexOf("search?") == 0) || (path.indexOf("sponsoredlinks?") == 0) || (path.indexOf("webhp?") == 0) || (path.indexOf("webhp#") == 0) || (path.indexOf("#q=") == 0) || (path.indexOf("#hl=")