

function hilite(x){

	if (x.id.substr(0,1) == "A"){
	 var backcolor = document.styleSheets[0].rules[1].style.backgroundColor;
	 var bordercolor  = document.styleSheets[0].rules[1].style.borderColor;
	}else{
	 var backcolor = document.styleSheets[0].rules[4].style.backgroundColor;
	 var bordercolor  = document.styleSheets[0].rules[4].style.borderColor;
	}

	 x.style.borderColor = bordercolor;
	 x.style.backgroundColor = backcolor;
		

	if (x.id.substr(0,1) == "A"){
	  var tbl = eval("sub" + x.id) ; 
	  tbl.style.top = (parseInt(x.style.top) - 2);
	  tbl.style.left = (parseInt(x.width)-3);
	  tbl.style.zIndex = 100;
	  tbl.style.visibility = "";
	}
}

function lolite(x){

	if (x.id.substr(0,1) == "A"){
	  var backcolor = document.styleSheets[0].rules[0].style.backgroundColor;
	}else{
	  var backcolor = document.styleSheets[0].rules[3].style.backgroundColor;
	}

	x.style.borderColor = backcolor;
	x.style.backgroundColor = backcolor;

	if (x.id.substr(0,1) == "A"){
	  var tbl = eval("sub" + x.id) ; 
	  tbl.style.visibility = "hidden";
	  
	}
}

function loadMenu(){

	l = location + "";
	var a = l.split("/");
	var xpath = "/";
	var items = "item"
	var val = a.length - 2;

	if (val > 2 && a[3] != "menu"){	
 	  for (var i = 3; i < (a.length - 1); i++){
		xpath = xpath + a[i] + "/";
		items = items + "/item";
	  }

	  var s = "//xsl:template[@match='MenuItems']/table/xsl:for-each/@select";
	  var x = MenuStyle.selectSingleNode(s);
	  //x.nodeValue = items + "[../@path='" + a[val] + "']";
	}

	xslMenu.innerHTML = MenuSource.transformNode(MenuStyle.XMLDocument);


}




