//<script type="text/javascript">

// CSS Top Menu- By JavaScriptKit.com (http://www.javascriptkit.com)
// Adopted from SuckerFish menu
// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
// Please keep this credit intact

startMenu = function()
{
	if (document.all && document.getElementById)
	{
		cssmenu = document.getElementById("nav_menu");
		for (i=0; i<cssmenu.childNodes.length; i++)
		{
			node = cssmenu.childNodes[i];
			if (node.nodeName=="LI")
			{
				node.onmouseover=function()
				{
//					ieUL = this.getElementsByTagName('ul')[0];
//					if (ieUL)
//					{
//						ieMat 				= document.createElement('iframe');
//						ieMat.style.width	= ieUL.offsetWidth+"px";
//						ieMat.style.height	= ieUL.offsetHeight+"px";
//						ieUL.insertBefore(ieMat,ieUL.firstChild);
//						ieUL.style.zIndex="99";
//					}

					this.className+=" over";
//					this.className+=" iehover";
				}
				node.onmouseout=function()
				{
//					this.className=this.className.replace(" over", "")
					this.className=this.className.replace(new RegExp(" over\\b"), "");
//					this.className=this.className.replace(" iehover", "")
				}
			}
		}
	}
}

if (window.attachEvent)
	window.attachEvent("onload", startMenu)
else
	window.onload=startMenu;

//</script>

function TMopen()
{ //v2.5 by Project Seven Development(PVII)
 var i,x,d,hr,ha,ef,a,ag;
 if(document.getElementById)
 {
 	d=document.getElementById("nav_menu");
 	if(d)
	{
		hr=window.location.href;
		ha=d.getElementsByTagName("A");
		hl=d.getElementsByTagName("LI");
		alert(hl[0].className);
		alert(hl[0].childNodes[0].href);
		alert(ha[1].href);
		if(ha&&ha.length)
		{
			for(i=0;i<ha.length;i++)
			{
				if(ha[i].href)
				{
					if(hr.indexOf(ha[i].href)>-1)
					{
						if(ha[i].onclick&&ha[i].onclick.toString().indexOf("expandMenu")>-1)
						{
							a=ha[i].parentNode;
							alert("a");
	  					}
  						else
  						{
  							ha[i].className="currentMark";
  							alert(hl[i].className);
  							a=ha[i].parentNode.parentNode;
  						}
  						while(a)
  						{
  							if(a.firstChild && a.firstChild.tagName=="A")
  							{
  								if(a.firstChild.onclick)
  								{
  									ag=a.firstChild.onclick.toString();
  									if(ag&&ag.indexOf("expandMenu")>-1)
  									{
  										expandMenu(a.firstChild,1);
  									}
  								}
  							}
  							a=a.parentNode;
  						}
  					}
  				}
  			}
  		}
	}
 }
}


