var browseType;
var AlliedresourceStyle, GTechStyle, NavajoNationsStyle, NovellEducationStyle, NovellConferenceStyle, PreviousStyle;

if (document.layers) {browseType=0;}
if( document.getElementById )  {browseType=1;}
if (document.all) {browseType=2;}

	function showText(StyleObjectName, bttnNum)
	{
		if( PreviousStyle == null )
			return;

		PreviousStyle.visibility='hidden';
		
		StyleObjectName.visibility="visible";
		PreviousStyle = StyleObjectName;

		if (browseType > 0) 
		{
			if( bttnNum == 1)
				leftBttn1.border = 1;
			else
				leftBttn1.border = 0;
			if( bttnNum == 2)
				leftBttn2.border = 1;
			else
				leftBttn2.border = 0;
			if( bttnNum == 3)
				leftBttn3.border = 1;
			else
				leftBttn3.border = 0;
			if( bttnNum == 4)
				leftBttn4.border = 1;
			else
				leftBttn4.border = 0;
			if( bttnNum == 5)
				leftBttn5.border = 1;
			else
				leftBttn5.border = 0;
		}
		
		return;
	}

	function init() 
	{
		if (browseType == 1)
		{
			AlliedresourceStyle = document.getElementById("Alliedresource").style;
			GTechStyle = document.getElementById("GTech").style;
			NavajoNationsStyle = document.getElementById("NavajoNations").style;
			NovellEducationStyle = document.getElementById("NovellEducation").style;
			NovellConferenceStyle = document.getElementById("NovellConference").style;
			MLFStyle = document.getElementById("MLF").style;
			
			leftBttn1 = document.images.btnARC;
			leftBttn2 = document.images.btnGTech;
			leftBttn3 = document.images.btnNN;
			leftBttn4 = document.images.btnNovell;
			leftBttn5 = document.images.btnCC;
			leftBttn6 = document.images.btnMLF;
		}
		else if (browseType == 0) 
		{
			AlliedresourceStyle = document.Alliedresource;
			GTechStyle = document.GTech;
			NavajoNationsStyle = document.NavajoNations;
			NovellEducationStyle = document.NovellEducation;
			NovellConferenceStyle = document.NovellConference;
			MLFStyle = document.MLF;

//			leftBttn1 = document.images.bttn1;
//			leftBttn2 = document.images.bttn2;
//			leftBttn3 = document.images.bttn3;
//alert("leftbttn1="+leftBttn1);
		}
		else if (browseType == 2) 
		{
			AlliedresourceStyle = document.all("Alliedresource").style;
			GTechStyle = document.all("GTech").style;
			NavajoNationsStyle = document.all("NavajoNations").style;
			NovellEducationStyle = document.all("NovellEducation").style;
			NovellConferenceStyle = document.all("NovellConference").style;
			MLFStyle = document.all("MLF").style;

			leftBttn1 = document.all("btnARC");
			leftBttn2 = document.all("btnGTech");
			leftBttn3 = document.all("btnNN");
			leftBttn4 = document.all("btnNovell");
			leftBttn5 = document.all("btnCC");
			leftBttn6 = document.all("btnMLF");
		}
		
		//If coming from the main page with ?client=EquiMark then change to that div.
		var sLocation = new String(document.location);
		if( sLocation.indexOf("NN") > 0 )
		{
			PreviousStyle = AlliedresourceStyle;
			showText(NavajoNationsStyle, 3);
		}
		else if( sLocation.indexOf("NOVELL") > 0 )
		{
			PreviousStyle = AlliedresourceStyle;
			showText(NovellEducationStyle, 4);
		}
		else if( sLocation.indexOf("CC") > 0 )
		{
			PreviousStyle = AlliedresourceStyle;
			showText(NovellConferenceStyle, 5);
		}
		else if( sLocation.indexOf("GT") > 0 )
		{
			PreviousStyle = AlliedresourceStyle;
			showText(GTechStyle, 2);
		}
		else if( sLocation.indexOf("ALLIED") > 0 )
		{
			PreviousStyle = AlliedresourceStyle;
			showText(AlliedresourceStyle, 1);
		}
		else //if( sLocation.indexOf("MLF") > 0 )
		{
			PreviousStyle = AlliedresourceStyle;
			showText(MLFStyle, 6);
		}
	}

	function openNewWindow(pgnew) 
	{
		mywin = top.open(pgnew, "ApexConnex", "toolbar=0,scrollbars=1,location=0,menubar=no,status=no,resizable=1,height=690,width=660,top=100,left=100");
		mywin.location = pgnew;
	}
