// Enter Javascript here
function openPrint(path)
{
	window.print();
}

function openPagemailer(path)
{
	pagemailer = window.open(path,"mail","width=500,height=400,resizable=no");
	pagemailer.focus();
}

function errorMsg(name,ext,cat)
{
  // alert("Netscape 6 or Mozilla is needed to install a sherlock plugin");
  f=document.createElement("form");
  f.setAttribute("name","installform");
  f.setAttribute("method","post");
  f.setAttribute("action","http://mycroft.mozdev.org/error.html");
  fe=document.createElement("input");
  fe.setAttribute("type","hidden");
  fe.setAttribute("name","name");
  fe.setAttribute("value",name);
  f.appendChild(fe);
  fe=document.createElement("input");
  fe.setAttribute("type","hidden");
  fe.setAttribute("name","ext");
  fe.setAttribute("value",ext);
  f.appendChild(fe);
  fe=document.createElement("input");
  fe.setAttribute("type","hidden");
  fe.setAttribute("name","cat");
  fe.setAttribute("value",cat);
  f.appendChild(fe);
  document.getElementsByTagName("body")[0].appendChild(f);
  if (document.installform) { 
    document.installform.submit();
  } else {
    location.href="http://mycroft.mozdev.org/error.html"; //hack for DOM-incompatible browsers
  }
}
function addEngine(name,ext,cat)
{
  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://mycroft.mozdev.org/plugins/"+name+".src",
      "http://mycroft.mozdev.org/plugins/"+name+"."+ext,
      name,
      cat );
  }
  else
  {
    errorMsg(name,ext,cat);
  }
}

// Primary Navigation START
var prim_array_navi = new Array();

function prim_navi(lo, hi)
{
    this.lo = new Image();
    this.hi = new Image();
    this.lo.src = lo;
    this.hi.src = hi;
}
function prim_navi_onLoad()
{
   	prim_array_navi['intro'] = new prim_navi('img/blind.gif', 'img/intro_text.gif');
}
function prim_navi_onMouseOver(key)
{
    document.images[key].src = prim_array_navi[key].hi.src;
}
function prim_navi_onMouseOut(key)
{
    document.images[key].src = prim_array_navi[key].lo.src;
}

prim_navi_onLoad();
// Primary Navigation END

// Homepage Navitext START

var ie= ((document.all)&&(!document.layers)) ? true : false; 
var ns= ((document.layers)&&(!document.getElementById)) ? true : false; 
var moz= ((document.getElementById)&&(!document.all)) ? true : false; 

function show(div){ 
if(ie) {document.all[div].style.visibility="visible";} 
if(ns) {document.layers[div].visibility="show";} 
if(moz) {document.getElementById(div).style.visibility="visible";} 
} 

function hide(div){ 
if(ie) (document.all[div].style.visibility="hidden") 
if(ns) (document.layers[div].visibility="hide") 
if(moz) (document.getElementById(div).style.visibility="hidden") 
} 

// Homepage Navitext END