
//For IE6
function icisHover() {
		var mItems = document.getElementById("menuItems").getElementsByTagName("LI");
		for (var i=0; i<mItems.length; i++) {
			mItems[i].onmouseover=function() {
				this.className="over";
			}
			mItems[i].onmouseout=function() {
				this.className="";
			}
		}
}

function ShowArticleId(articleID)
{
	var h = document.location.href;
	var start = h.indexOf('Articles');
	var params;
	
	if(start == -1){
		start = h.indexOf('News');
		start = start + 5;
		params = "News.aspx?id="		
	} else {
		start = start + 9;
		params = "Article.aspx?liArticleID=";
	}	
	
	h = h.substr(0, start);
	document.location.href = h + params + articleID;
	
}

var currentMenuItem;

function toggleSubMenu(menuItemID)
{
	try{	
		var menuItem = document.getElementById(menuItemID);
		var isTopLevelNav;
			
		menuItem.className = switchClassName(menuItem.className);	
		if(currentMenuItem!=null)
		{	
			if(currentMenuItem!=menuItem)
			{
				ensureMenuItemClosed(currentMenuItem);
			}
		}
		
		currentMenuItem = menuItem;	
	}
	catch(e){	
		return;	
	}
}

function switchClassName(className)
{
	className = className.indexOf('Show')>-1?className.replace('Show','Hide'):className.replace('Hide','Show');
	return className;
}

function ensureMenuItemClosed(menuItem)
{
	if(menuItem.className.indexOf('Show')>-1)
	{
		menuItem.className = switchClassName(menuItem.className);
	}
}
