function setPointer(theRow, thePointerColor)
{
  if (typeof(theRow.style) == 'undefined' || typeof(theRow.cells) == 'undefined') {
    return false;
  }

  var row_cells_cnt = theRow.cells.length;
  for (var c = 0; c < row_cells_cnt; c++) {
    theRow.cells[c].bgColor = thePointerColor;
  }
  return true;
}

function popup(URL, Width, Height) {
  day = new Date();
  id = 0;
  if (navigator.appName == 'Netscape') {
    s_top = window.screenX + 50;
    s_left = window.screenY + 50;
  } else {
    s_top = window.screenTop + 50;
    s_left = window.screenLeft + 50;
  }
  eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,top=" + s_top + ",left=" + s_left + ",width=" + Width + ",height=" + Height + "');");
}

function ClipBoard() {
  holdtext.innerText = copytext.innerText;
  Copied = holdtext.createTextRange();
  Copied.execCommand("Copy");
}

function doBlink() {
  var blink = document.all.tags("BLINK")
	for (var i=0; i<blink.length; i++)
	  blink[i].style.visibility = blink[i].style.visibility == "" ? "hidden" : ""
}

function startBlink() {
  if (document.all)
	  setInterval("doBlink()",1000)
}

window.onload = startBlink;

function errorMsg()
{
  alert("Netscape 6 or Mozilla is needed to install a sherlock plugin");
}

function addEngine(name,ext,cat,type)
{
  if ((typeof window.sidebar == "object") && (typeof
  window.sidebar.addSearchEngine == "function"))
  {
    //cat="Web";
    //cat=prompt("In what category should this engine be installed?","Web")
    if (type!="0") {      window.sidebar.addSearchEngine(
        "http://mycroft.mozdev.org/nowrapper/submit-install.php/v/" + type + "/" + name + ".src",
        "http://mycroft.mozdev.org/nowrapper/submit-install.php/i/" + type + "/" + name + "."+ ext,
        name,
        cat );
    } else {      window.sidebar.addSearchEngine(
        "http://mycroft.mozdev.org/plugins/"+name+".src",
        "http://mycroft.mozdev.org/plugins/"+name+"."+ext,
        name,
        cat );
    }  }
  else
  {
    errorMsg();
  }
}

function addEngine_ori(name,ext,cat,type)
{
  if ((typeof window.sidebar == "object") && (typeof
  window.sidebar.addSearchEngine == "function"))
  {
    //cat="Web";
    //cat=prompt('In what category should this engine be installed?','Web')
    window.sidebar.addSearchEngine(
      "http://localhost.localdomain/plugins directory/"+name+".src",
      "http://localhost.localdomain/plugins directory/"+name+"."+ext,
      name,
      cat );
  }
  else
  {
    errorMsg();
  }
}
