// Show current item, hide all others
function showProd(pv_eItem){
	
	try{
		
		// eDiv: The DIV containing the body of text pointed to by pv_eItem.dlink
		
		var eDiv = document.getElementById(pv_eItem.getAttribute('dlink'));
		// Is the selected div already visible?
		if(eDiv.style.display=="block"){ return true; }
		
		// Get the container (parent of current, a DIV tag), then
		// go through the other list items and hide all the divs
		var eMNU = pv_eItem.parentNode;
		var sClass = eMNU.className;
		var aeList = eMNU.getElementsByTagName("DIV");
		for(var i=0;i<aeList.length;i++){
			document.getElementById(aeList[i].getAttribute('dlink')).style.display = "none";	
			aeList[i].className = "vitem_unselected";
		}
		eDiv.style.display = "block";
		pv_eItem.className = "vitem_selected";
		
		// Using the class name of the current menu: if there are any other
		// menus in the same group, then hide all their children too
		if(sClass){
			var aeMenuList = document.getElementsByTagName("DIV");
			for(i=0;i<aeMenuList.length;i++){
				// Don't process the current menu
				if(aeMenuList[i]!=eMNU && aeMenuList[i].className==sClass){
					aeList = aeMenuList[i].getElementsByTagName("DIV");
					for(var j=0;j<aeList.length;j++){
						document.getElementById(aeList[j].getAttribute('dlink')).style.display = "none";
						document.getElementById(aeList[j]).className = "vitem_unselected";
					}
				}
			}
		}
		
	}
	catch(err){
		return false;	
	}
}

function doMODownload(){
	try{
		//var eFrame = parent.mainFrame.document.getElementById("openattachment");
		var sURL = gBaseSite + "Public/mo_download.asp?PRODUCTID=MO";
		var sWindowFeatures = "title,resizable,height=500,width=700,top=50,left=50"
		var sReplaceFlag = ""
		var eWin = window.open(sURL,"modownload",sWindowFeatures,sReplaceFlag);
		eWin.focus();
		return 1;
	}
	catch(err){
		alert("Failed to initialise download (javascript error)");
		return 0;
	}
	
}