
//global var
sTopNav = "";
function showButton(sButton, sMode)
{
	eval("document." + sButton + ".src = 'images/scsweb_" + sButton + "_" + sMode + ".jpg';");
}

function showSub(sButton, sMode)
{
	//Create var for pagename
	sPage = window.location.href.split("/");
	//Check if we are on a submenu page
	iServicesPage = false;
	iAboutPage = false;
	if(sPage[3] == "services.htm" || sPage[3] == "services.htm" || sPage[3] == "training.htm" || sPage[3] == "analysis.htm" || sPage[3] == "products.htm" || sPage[3] == "reinsurance.htm") iServicesPage = true
	if(sPage[3] == "aboutus.htm" || sPage[3] == "mission.htm" || sPage[3] == "philosophy.htm" || sPage[3] == "history.htm") iAboutPage = true
	if(sMode == 'on')
	{ 
		//Get rel. position of services button to position submenu abs.
		subnavLeft = services.offsetParent.offsetLeft - 120;
		subnavTop = services.offsetParent.offsetTop + 3;
		//See which submenu to show
		if(sButton == "services" || sButton == "divServicesOn")
		{
			//Keep Hili button On
			if(iServicesPage == false) document.services.src = "images/scsweb_services_on.jpg"
			//Turn off other menus and default
			divSubNavOff.style.display = "none";
			divAboutOn.style.display = "none";
			//Turn on Services Sub
			divServicesOn.style.display = "";
			divServices.style.left = subnavLeft;
			divServices.style.top = subnavTop;
		}
		if(sButton == "about" || sButton == "divAboutOn")
		{
			//Keep Hili button On
			if(iAboutPage == false) document.about.src = "images/scsweb_about_on.jpg"
			//Turn off other menus and default
			divSubNavOff.style.display = "none";
			divServicesOn.style.display = "none";
			//Turn on About Sub
			divAboutOn.style.display = "";
			divAbout.style.left = subnavLeft;
			divAbout.style.top = subnavTop;
		}
	}
	if(sMode == 'off')
	{ 
		//Reset Hili buttons
		if(iAboutPage == false) document.about.src = "images/scsweb_about_off.jpg"
		if(iServicesPage == false) document.services.src = "images/scsweb_services_off.jpg"
		
		//Reset Divs
		divSubNavOff.style.display = "";
		divAboutOn.style.display = "none";
		divServicesOn.style.display = "none";
	}
	
}
