//		leftnav.js for Internet Explorer

		var mobjDivCol;					// Module level collection of all DIV tags in the document
		var msPreviousLayer = "";		// Module level variable to store layer name
		var mbTopicsInvisible = true;	// Module level boolean variable
		var mXCoord;						// Module level variable for the mapping mouse events
		var mYCoord;						// Module level variable for the mapping mouse events
		var mYTopCoord = 170;			// Module level variable for the mapping mouse events
		var mobjDivCol = document.all.tags("DIV");
		
		function bCheck4RightLayer(psLayer2Check)
		{
			// Function to check if the DIV or LAYER to be operated upon is of the left nav.
			// Assumption is no other DIV or Layer has"idTopic" or "idSubCh" as its first seven characters
			
			var iStartIndex = 0;
			var iNoOfChars = 7;
			
			var sSubString = psLayer2Check.substr(iStartIndex, iNoOfChars);
			//alert(sSubString)
		
			if(sSubString == "idTopic" || sSubString == "idSubCh")
				return true;
		}
		
		
		function showSubChannel(psSecondaryName)
		{
			/*
					Purpose				: Senses browser and calls appropriate function to show 
										Sub-Channel layers	
											  
					Inputs				: Layers secondary name
					Output				: None
						
					Author				: Anirudh
					Created on			: 18th July, 2000
						
					Modified by			Date			Version		Description
					-----------------------------------------------------------
					Anirudh				07/18/2000		1.0.1	
			*/
			
			var sPrimaryName = "idSubChannel";			// Primary name, constant for all Sub-Channel layers
			var sLayerName = sPrimaryName + psSecondaryName;	// Complete name of the Layer
			
			// Hide any open DIVs
			hideDivs();
			
			// Show the appropriate DIV
			showSubChannelDiv(sLayerName);
		}		

		
		function showSubChannelDiv(psDivName)
		{
			// Function to show DIVs in IE

			for(var iCount = 0; iCount < mobjDivCol.length; iCount++)
			{
				if(mobjDivCol[iCount].id == psDivName)
					mobjDivCol[iCount].style.display = "";
			}
		}
		
		function hideDivs(psSubChannel)
		{
			// Hides all the DIVs except the DIV that's passed as the parameter
			
			for(var iCount = 0; iCount < mobjDivCol.length; iCount++)
			{
				if(mobjDivCol[iCount].id != psSubChannel && mobjDivCol[iCount].id &&
							(bCheck4RightLayer(mobjDivCol[iCount].id)))
				{
					//alert(psSubChannel)
					mobjDivCol[iCount].style.display = "none";
				}
			}
			
			mbTopicsInvisible = true;
		}
		

		function showTopics(psLayerName)
		{
			
			hidePrevTopics(psLayerName);
			
			for(var iCount = 0; iCount < mobjDivCol.length; iCount++)
			{
				if(mobjDivCol[iCount].id == psLayerName)
				{
					mobjDivCol[iCount].style.display = "";
				}
			}
			
			//alert(psLayerName);
			mbTopicsInvisible = false;
		}
		
		function hideTopic(psDivName)
		{
			psDivName.style.display = "none";
			
			mbTopicsInvisible = true;
		}
		
		
		function hidePrevTopics(psTopicName)
		{
			
			if(msPreviousLayer != "")
			{
				for(var iCount = 0; iCount < mobjDivCol.length; iCount++)
				{
					if(mobjDivCol[iCount].id == msPreviousLayer)
					{

						mobjDivCol[iCount].style.display = "none";
					}
				}
			}

			msPreviousLayer = psTopicName;
			
			mbTopicsInvisible = true;
		
		}
		
		function senseTopicsLayer(psSubChannel)
		{		
			if(mbTopicsInvisible)
				hideAll(psSubChannel);
		}
		
		function hideAll(psSubChannel)
		{
			hideDivs(psSubChannel);
		}

		/////////////
		
		function VerificaMouse(e)
		{
			var iClientY = event.clientY;
			yCoord = (parseInt(iClientY) + parseInt(document.body.scrollTop));


			var iClientX = event.clientX;
			xCoord = (parseInt(iClientX) + parseInt(document.body.scrollLeft));
			
			// Distance from browser top to the top of left nav table/layer
			if(yCoord < mYTopCoord)
			{
				hideAll("");	
			}

			// Distance from browser top to the bottom of the last topics layer
			if(yCoord > parseInt(mYCoord))
			{
				hideAll("");
			}
			
			// Distance from left edge of browser to the right edge of the topic
			if(xCoord > parseInt(mXCoord))
			{
				hideAll("");
			}
		
		}
		
		function IniciaMouse()
		{	
			if(navigator.appName.indexOf("Netscape") != -1)
			{
				document.onmousemove = VerificaMouse;
				document.captureEvents(Event.MOUSEMOVE);
			}
		}