// JavaScript Document for show/hide subnav boxes
try {
  document.execCommand("BackgroundImageCache", false, true);
} catch(err) {}


function MM_changeProp(objId,x,theProp,theValue) { //v9.0
  var obj = null; with (document){ if (getElementById)
  obj = getElementById(objId); }
  if (obj){
    if (theValue == true || theValue == false)
      eval("obj.style."+theProp+"="+theValue);
    else eval("obj.style."+theProp+"='"+theValue+"'");
  }
}
var mytimer;
var nowopen=0;

function joelsnav(myelement, parentlink){				//this changes link background and hides subnav
	MM_changeProp(myelement,'','display','none','DIV');
	var obj = document.getElementById(parentlink);
	obj.style.backgroundImage="url('')";
}

function hidenav(myelement, parentlink){
	var mystring = "joelsnav('" + myelement +"','"+ parentlink+"')";
	mytimer=setTimeout(mystring, 500);
}

function shownav(myelement, parentlink){
	if (myelement == nowopen){		//if user quickly mouses to another menu item, still close the previous navbox
		clearTimeout(mytimer);
	}
	nowopen=myelement;
	MM_changeProp(myelement,'','display','inline','DIV');
	var obj = document.getElementById(parentlink);
	obj.style.backgroundImage="url('/images/popup/popuplinkback.gif')";
}