// T2M Web Page JavaScript
// Version 1.0
// Copyright 2007 Data Broadcast Services


var ActivePage = "Home";
var ActiveMenu = "";
var ActiveSubMenu = "";
var MenuBackgroundColor="#FFFFFF"
var SubMenuBackgroundColor="#FFccFF"
var HighlightedBackgroundColor="#6699CC"
var HighlightedColor="#FFFFFF"
var MenuColor="#336699"
				
		function ShowPage(xiCurrentPage)
		{
			if (ActivePage != "")
				HidePage(ActivePage);
		
			ActivePage=xiCurrentPage
			// Make the page look disabled
			DisPage();
			document.getElementById(xiCurrentPage).style.display="";
		}
	
		function HidePage(xiCurrentPage)
		{
			document.getElementById(xiCurrentPage).style.display="none";
			ActivePage="";
			EnPage();
		}

		
		function ShowOver(xiMenuItem)
		{
			document.getElementById('p_'+xiMenuItem).style.fontWeight='bold';
			document.getElementById('p_'+xiMenuItem).style.backgroundColor=HighlightedBackgroundColor;
			document.getElementById('p_'+xiMenuItem).style.color=HighlightedColor;

			//if (ActivePage != xiMenuItem)
			//{
			//	ShowPage(xiMenuItem);
			//}
		}

		function HideOver(xiMenuItem)
		{
			document.getElementById('p_'+xiMenuItem).style.fontWeight='bold';
			document.getElementById('p_'+xiMenuItem).style.backgroundColor=MenuBackgroundColor;
			document.getElementById('p_'+xiMenuItem).style.color=MenuColor;
		
		}

		
		
		function ShowMenuOver(xiMenuItem)
		{
			document.getElementById('p_'+xiMenuItem).style.fontWeight='bold';
			document.getElementById('p_'+xiMenuItem).style.backgroundColor=HighlightedBackgroundColor;
			document.getElementById('p_'+xiMenuItem).style.color=HighlightedColor;

			//if (ActivePage != xiMenuItem)
			//{
			//	ShowPage(xiMenuItem);
			//}
		}

		function HideMenuOver(xiMenuItem)
		{
			document.getElementById('p_'+xiMenuItem).style.fontWeight='bold';
			document.getElementById('p_'+xiMenuItem).style.backgroundColor=MenuBackgroundColor;
			document.getElementById('p_'+xiMenuItem).style.color=MenuColor;
		
		}


		function GoPage(xiTargetPage)
		{
			document.location(xiTargetPage);
		}

		function GoForm(xiTargetForm)
		{
			document.getElementById(xiTargetForm).submit();
		}


		function ShowMenu(xiMenuItem)
		{
			ActiveMenu=xiMenuItem;
			document.getElementById('div_'+xiMenuItem+'_Menu').style.display='';
			document.getElementById('p_'+xiMenuItem).style.fontWeight='bold';
			document.getElementById('p_'+xiMenuItem).style.backgroundColor=HighlightedBackgroundColor;

		}
		function HideMenu(xiMenuItem)
		{

			document.getElementById('div_'+xiMenuItem+'_Menu').style.display='none';
			document.getElementById('p_'+xiMenuItem).style.fontWeight='normal';
			document.getElementById('p_'+xiMenuItem).style.backgroundColor= MenuBackgroundColor;
		}
		
		function ShowSubMenu(xiMenuItem)
		{
			ActiveSubMenu=xiMenuItem;
			document.getElementById('ps_'+xiMenuItem).style.fontWeight='bold';
			document.getElementById('ps_'+xiMenuItem).style.backgroundColor=HighlightedBackgroundColor;

		}
		function HideSubMenu(xiMenuItem)
		{
			document.getElementById('ps_'+xiMenuItem).style.fontWeight='normal';
			document.getElementById('ps_'+xiMenuItem).style.backgroundColor=SubMenuBackgroundColor;
		}


		function ShowPage(xiPage)
		{
			//alert("Showing Page :"+xiPage+":");
		
			if ( ActivePage != "" )
			{
				HidePage(ActivePage);
			}	

			ActivePage=xiPage;
			
			document.getElementById('div_'+xiPage).style.display='';
			DisPage();

		}
		
		function HidePage(xiPage)
		{
			document.getElementById('div_'+xiPage).style.display='none';
			EnPage();
		}

	
	function DisPage()
	{
		// IE 6 Work round for disabled page size
		document.getElementById('div_DisabledPage').style.height=window.screen.availHeight;
		document.getElementById('div_DisabledPage').style.width=window.screen.availWidth;
		document.getElementById("div_DisabledPage").style.display=""
		O3_FadeOpacity("div_DisabledPage", .5, 800);
	}

	function EnPage()
	{
		document.getElementById("div_DisabledPage").style.display="none"
		O3_SetOpacity("div_DisabledPage", 0);
	}

