function addSearchInv() {

  var invType = "aoluk-hsBlog-main_en_GB_aol";

  if (typeof AOL != "undefined") {
    var client = AOL.client;
    var cobrand = AOL.cobrand;
    if (client == 1) {
      var invType = "aoluk-hsBlog-main_en_GB_aol";
    } else if (cobrand == "talktalk") {
      var invType = "hf_talktalk_po_hsBlog-main";
    } else {
      var invType = "aoluk-hsBlog-main_en_GB_aolcom";
    }
  }

  var aObj = document.getElementsByTagName("A");

  for (var i = 0; i< aObj.length; i++) {
      var aObjHref = aObj.item(i).href;
      if ((aObjHref.indexOf("search.aol.co.uk")>=0) && (aObjHref.indexOf("hotsearch.aol.co.uk")==-1)) {
        if (aObjHref.indexOf("invocationType")>=0) {
          var p0 = aObjHref.indexOf("invocationType=");
          var p1 = aObjHref.indexOf("&", p0);
          var newUrl = aObj.item(i).href.substring(0, p0) + "invocationType=" + invType;
          if (p1 >= 0) {
            newUrl += aObj.item(i).href.substring(p1);
          }
          aObj.item(i).href = newUrl;
        } else {
          if (aObjHref.indexOf("?")>=0) {
            var invString = "&invocationType=" + invType;
            aObj.item(i).href = aObj.item(i).href + invString;
          } else {
            var invString = "?invocationType=" + invType;
            aObj.item(i).href = aObj.item(i).href + invString;
          }
      } 
    } 
  } 
}