var activeSubMenuElement;

//To open the Case Study pdf document
function openNewWindow(psFileToOpen)
	{
		var sWindowFeatures = "height=600,width=840,left=0,top=0,resizable=yes,toolbar=no,menubar=no,scrollbar=no,status=no";
		
		window.open(psFileToOpen,"objPopupWindow",sWindowFeatures);
	}
	
//Top Navigation function
function showmenu(elmnt,tdObj)
{
	if (navigator.appName == "Microsoft Internet Explorer")
	{
		var iCellCount = tdObj.parentElement.cells.length;
		for(i=0;i<iCellCount;i++)
		{
			var childNodeObjList = tdObj.parentElement.cells[i].children;	
			for(var childIndex = 0;childIndex < childNodeObjList.length;childIndex++)
			{
				var nodeObj = childNodeObjList[childIndex];
				if(nodeObj != null)
				{					
					var idObj = nodeObj.id;	
					if(idObj != null && idObj.length > 0 && document.getElementById(idObj))
					{
						document.getElementById(idObj).style.visibility="hidden"; 					
					}
				 } 	     
			 }
		 }
		 
		document.getElementById(elmnt).style.visibility="visible";
		activeSubMenuElement = elmnt;
	}
	else
	{
		var iCellCount = tdObj.parentNode.cells.length;		
		for(i=1;i<iCellCount;i++)
		{
			var childNodeObjList = tdObj.parentNode.cells[i].childNodes;	
			for(var childIndex = 0;childIndex < childNodeObjList.length;childIndex++)
			{
				var nodeObj = childNodeObjList[childIndex];
				if(nodeObj != null && nodeObj.nodeType == Node.ELEMENT_NODE)
				{				
					var idObj = nodeObj.id;
					if(idObj != null && idObj.length > 0 && document.getElementById(idObj))
						document.getElementById(idObj).style.visibility="hidden"; 						
				 } 	     
			 }
		 }
			document.getElementById(elmnt).style.visibility="visible";
			activeSubMenuElement = elmnt;
		}
}
function hidemenu(elmnt,tdObj)
{
	document.getElementById(elmnt).style.visibility="hidden";
}

function hideActiveSubmenu()
{
	if(activeSubMenuElement != null)
	{
		document.getElementById(activeSubMenuElement).style.visibility="hidden";
	}
}

function hideAll(ele)
{
	var currentElement = ele;
	while(currentElement.nextSibling != null)
	{
		currentElement = currentElement.nextSibling;
		if (navigator.appName == "Microsoft Internet Explorer")
		{
			var childNodeObjList = currentElement.children;	
			for(var childIndex = 0;childIndex < childNodeObjList.length;childIndex++)
			{
				var nodeObj = childNodeObjList[childIndex];
				if(nodeObj != null)
				{					
					var idObj = nodeObj.id;	
					if(idObj != null && idObj.length > 0 && document.getElementById(idObj))
					{
						document.getElementById(idObj).style.visibility="hidden"; 					
					}
				 } 	     
			 }
		}else
		{		 
			var childNodeObjList = currentElement.childNodes;		
			for(var childIndex = 0;childIndex < childNodeObjList.length;childIndex++)
			{
				var nodeObj = childNodeObjList[childIndex];
				if(nodeObj != null && nodeObj.nodeType == Node.ELEMENT_NODE)
				{				
					var idObj = nodeObj.id;
					if(idObj != null && idObj.length > 0 && document.getElementById(idObj))
						document.getElementById(idObj).style.visibility="hidden"; 						
				} 	     
			}	
		}
	}
}