function judgePopUp(id,type)
{
    var popwin;
    leftval=(screen.width)?(screen.width-650)/2:100;
    topval=(screen.height)?(screen.height-350)/2:100;
    popwin=window.open("http://mycroft.mozdev.org/judge.php?id=" + id + "&table=" + type, "Judge a plugin", "width=650,height=300,top=" + topval + ",left=" + leftval + ",toolbar=0,scrollbars=1,directories=no,location=0,statusbar=0,menubar=0,resizable=0");
    popwin.focus();
}

function addEngine(name,ext,cat,pid)
{
  if ((typeof window.sidebar == "object") && (typeof window.sidebar.addSearchEngine == "function")) {
    window.sidebar.addSearchEngine(
      "http://mycroft.mozdev.org/install.php/" + pid + "/" + name + ".src",
      "http://mycroft.mozdev.org/install.php/" + pid + "/" + name + "."+ ext, name, cat );
  } else {
    alert("You will need a browser which supports Sherlock to install this plugin.");
  }
}

function addOpenSearch(name,ext,cat,pid,meth)
{
  if ((typeof window.external == "object") && ((typeof window.external.AddSearchProvider == "unknown") || (typeof window.external.AddSearchProvider == "function"))) {
    if ((typeof window.external.AddSearchProvider == "unknown") && meth == "p") {
      alert("This plugin uses POST which is not currently supported by Internet Explorer's implementation of OpenSearch.");
    } else {
      window.external.AddSearchProvider(
        "http://mycroft.mozdev.org/installos.php/" + pid + "/" + name + ".xml");
    }
  } else {
    alert("You will need a browser which supports OpenSearch to install this plugin.");
  }
}

function bookmarkUs()
{

var txt = "Bookmark Us!";
document.txt = txt;
var url = "'http://dict.1nk.us/'";
var who = "'Online Dual English - Bulgarian Dictionary'";

var ver = navigator.appName;
var num = parseInt(navigator.appVersion);
if ((ver == "Microsoft Internet Explorer")&&(num >= 4)) {
document.write('<a href="javascript:window.external.AddFavorite(');
document.write(url);
document.write(',');
document.write(who);
document.write(');" ');
document.write('onMouseOver=" window.status=');
document.write("txt; return true ");
document.write('"onMouseOut=" window.status=');
document.write("' '; return true ");
document.write('">');
document.write(txt);
document.write('</a>');
}else{
txt += "  (Ctrl+D)";
document.write(txt);
} 
}
