//rollover function
//set up layer call
var isIE, isNS, isNS6, isDOM, lR, sR, vis, invis, myTimeOut, goName;
	if (document.all) {isIE= true;lR="document.all.";sR="style.";vis="visible";invis="hidden";}
	if (document.layers){isNS = true;lR="document.layers.";sR="";vis="show";invis="hide";}
	if (document.getElementById &&!isIE) {isDOM=true;lR = "document.getElementById('";sR = "').style";invis ="hidden";vis = "visible"}
	if (isDOM == true && navigator.appName =="Netscape") isNS6 = true;
	
var oldwhich = 0;
var oldwhich2 = 0;
var x=0;
var layerTimer;

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_changeProp(objName,x,theProp,theValue) { //v3.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)) eval("obj."+theProp+"='"+theValue+"'");
}
	
//turn on layer and rollover

	function layOver(which)
	{
	x=0;
	if (oldwhich != which)
	{
		MM_showHideLayers("l"+oldwhich,'','hide');
		MM_showHideLayers("l"+oldwhich2,'','hide');
		MM_changeProp("td"+oldwhich,'','background',"../../images/menu_left/tab_"+2*oldwhich+".gif",'TD');
//		MM_changeProp("m"+oldwhich,'','style.color','#FFFFFF','FONT');
		MM_changeProp("sub1_td"+oldwhich2,'','style.background','#C7F0F3','TD');
//		MM_changeProp("sub1_m"+oldwhich2,'','style.color','#FFFFFF','SPAN');
	}
	MM_showHideLayers("l"+which,'','show');
	MM_showHideLayers('musthide','','hide');
	MM_changeProp("td"+which,'','background',"../../images/menu_left/rolltab_"+2*which+".gif",'TD');
//	MM_changeProp("m"+which,'','style.color','#FFFFFF','FONT');
	oldwhich = which;
  	clearTimeout(layerTimer);
	return;
	}


//turn off layer and rollover if user is completely off nav 
	function stopOver()
	{
		if (x<5) x++;
		else
		{
		MM_showHideLayers("l"+oldwhich,'','hide');
		MM_showHideLayers("l"+oldwhich2,'','hide');
		MM_showHideLayers('musthide','','show');
		MM_changeProp("td"+oldwhich,'','background',"../../images/menu_left/tab_"+2*oldwhich+".gif",'TD');
//		MM_changeProp("m"+oldwhich,'','style.color','#FFFFFF','FONT');
		MM_changeProp("sub1_td"+oldwhich2,'','style.background','#C7F0F3','TD');
//		MM_changeProp("sub1_m"+oldwhich2,'','style.color','#FFFFFF','FONT');
		x=0;
		}
	layerTimer = setTimeout("stopOver()",0)
	}
function startOver()
	{
	x=0
	clearTimeout(layerTimer);
	}

//change subnav background color (ie5+ ns6+)
	function changebg(item, color)
{

	if (document.getElementById)		
	{
	theone = eval("document.getElementById('"+item+"')")
	theone.style.background = color
	}	

}
