function kwbold(el,keyword) {
  for (var i = 0; i < el.length; i++) {
    if (window.RegExp && el[i].type == 'text') {
      var rawq = keyword.replace("'","&#39;");
      var rawarr = rawq.split(/\s+/);
      for (x = 0; x < rawarr.length; x++) {
        var regline = new RegExp("\\b" + rawarr[x] + "\\b", "i");
        for (y = 1; y < 4; y++) {
          if (y == 1) {
            strline = el[i].line1;
          }
          else if (y == 2) {
            strline = el[i].line2;
          }
          else {
            strline = el[i].line3;
          }
          if (matchfound = regline.exec(strline)) {
            for (var j = 0; j < matchfound.length; j++) {
              if (y == 1) {
                google_ads[i].line1 = strline.replace(matchfound[j], "<strong>" + matchfound[j] + "</strong>");
              }
              else if (y == 2) {
                google_ads[i].line2 = strline.replace(matchfound[j], "<strong>" + matchfound[j] + "</strong>");
              }
              else {
                google_ads[i].line3 = strline.replace(matchfound[j], "<strong>" + matchfound[j] + "</strong>");
              }
            }
          }
        }
      }
    }
  }
}

function hlToArray(object) {
  if (typeof(object.length) == "number") {
    return object;
  }
  var array = new Array();
  array.push(object);
  return array;
}

String.prototype.trim = StringTrim;
function StringTrim(){
  var TestString = this;
  TestString = TestString.replace( /^\s+/g,"");
  TestString = TestString.replace( /\s+$/g,"");
  return TestString;
}

function is_all_ws(nod){
  return !(/[^\t\n\r ]/.test(nod.data));
}

function is_ignorable(nod){
  return ( nod.nodeType == 8) || ( (nod.nodeType == 3) && is_all_ws(nod) );
}

function node_parent(child){
 var parent = (child.parentElement!=undefined) ? child.parentElement : child.parentNode;
  return parent;
}
function node_before(sib){
  while ((sib = sib.previousSibling)){
    if (!is_ignorable(sib))
      return sib;
  }
  return null;
}
function node_after(sib){
  while ((sib = sib.nextSibling)){
    if (!is_ignorable(sib))
      return sib;
  }
  return null;
}
function last_child(par){
  var res=par.lastChild;
  while (res) {
    if (!is_ignorable(res)) return res;
    res = res.previousSibling;
  }
  return null;
}
function first_child(par){
  var res=par.firstChild;
  while(res){
    if (!is_ignorable(res))
      return res;
    res = res.nextSibling;
  }
  return null;
}
function popUp(strURL,strType,strWidth,strHeight){
  var strOptions="";
  if (strType=="news") strOptions="toolbar,menubar,scrollbars,resizable,location,status,titlebar,height="+strHeight+",width="+strWidth+",top=100,left=100";
  else if (strType=="symptomsearchresult") strOptions="toolbar,menubar,scrollbars,resizable,location,status,titlebar,height="+strHeight+",width="+strWidth+",top=100,left=100";
  window.open(strURL, 'newWin', strOptions);
}
