/*************************************\
	Schaeffer's Investment Research
	Navigation JavaScript
	March 19, 2007
\*************************************/

function ShowSubTabs()
{
	ShowSubNavContainer();

	// adjust the main tabs
	document.getElementById("ctl00_TopNav1_lnkEducation").className = "tabHover";
	document.getElementById("ctl00_TopNav1_lnkCommentary").className = "tabHover";
	document.getElementById("ctl00_TopNav1_lnkMarketCenter").className = "tabHover";
	document.getElementById("ctl00_TopNav1_lnkTools").className = "tabHover";
	document.getElementById("ctl00_TopNav1_lnkProducts").className = "endtabHover";

	// more main tabs
	document.getElementById("ctl00_TopNav1_divMainNav").className = "backHover";
	document.getElementById("ctl00_TopNav1_divMainNavRight").className = "backBlankHover";
	document.getElementById("ctl00_TopNav1_lnkRight").className = "tabrightHover";
	
	// show the subtab background
	document.getElementById("ctl00_TopNav1_divShadow").className = "subNav";
} // ShowSubTabs

function HideSubTabs()
{
	HideSubNavContainer();

	// adjust the main tabs
	document.getElementById("ctl00_TopNav1_lnkEducation").className = "tab";
	document.getElementById("ctl00_TopNav1_lnkCommentary").className = "tab";
	document.getElementById("ctl00_TopNav1_lnkMarketCenter").className = "tab";
	document.getElementById("ctl00_TopNav1_lnkTools").className = "tab";
	document.getElementById("ctl00_TopNav1_lnkProducts").className = "endtab";
	
	// mroe main tab stuff
	document.getElementById("ctl00_TopNav1_divMainNav").className = "back";
	document.getElementById("ctl00_TopNav1_divMainNavRight").className = "backBlank";
	document.getElementById("ctl00_TopNav1_lnkRight").className = "tabright";
	
	// hide the subnav background
	document.getElementById("ctl00_TopNav1_divShadow").className = "shadow";
} // HideSubTabs


function ShowSubTabBar(mainTabID)
{
	subTabID = "ctl00_TopNav1_div" + mainTabID.substring(17);
	document.getElementById(subTabID).style.display = "block";
	
	ShowSubTabs();
	if (mainTabID == "ctl00_TopNav1_lnkProducts")
	{
		document.getElementById(mainTabID).className = "endtabOn";
	}
	else
	{
		document.getElementById(mainTabID).className = "tabOn";
	}
} // ShowSub



function HideSubTabBar(mainTabID)
{
	subTabID = "ctl00_TopNav1_div" + mainTabID.substring(17);
	document.getElementById(subTabID).style.display = "none";
	HideSubTabs();
} // HideSub



function ShowSubTab(subTabID)
{
	ShowSubTabs();
	mainTabID = "ctl00_TopNav1_lnk" + subTabID.substring(17);
	if (mainTabID == "ctl00_TopNav1_lnkProducts")
	{
		document.getElementById(mainTabID).className = "endtabOn";
	}
	else
	{
		document.getElementById(mainTabID).className = "tabOn";
	}
	document.getElementById(subTabID).style.display = "block";
} // ShowSubTab



function HideSubTab(subTabID)
{
	HideSubTabs();
	mainTabID = "ctl00_TopNav1_lnk" + subTabID.substring(17);
	if (mainTabID == "ctl00_TopNav1_lnkProducts")
	{
		document.getElementById(mainTabID).className = "endtab";
	}
	else
	{
		document.getElementById(mainTabID).className = "tab";
	}
	document.getElementById(subTabID).style.display = "none"; 
} // HideSubTab 


function HideEducationSubTab()
{
	HideSubTabs();
	mainTabID = "ctl00_TopNav1_lnkEducation";
	document.getElementById(mainTabID).className = "tab";
	document.getElementById(subTabID).style.display = "none"; 
} // HideSubTab 

function HideCommentarySubTab()
{
	HideSubTabs();
	mainTabID = "ctl00_TopNav1_lnkCommentary";
	document.getElementById(mainTabID).className = "tab";
	document.getElementById(subTabID).style.display = "none"; 
} // HideSubTab  



function ShowEducation()
{
	ShowSubNavContainer();

	// show/hide subtab parent
	document.getElementById("ctl00_TopNav1_divEducation").style.display = "block";
	document.getElementById("ctl00_TopNav1_divCommentary").style.display = "none";
	document.getElementById("ctl00_TopNav1_divMarketCenter").style.display = "none";
	document.getElementById("ctl00_TopNav1_divTools").style.display = "none";
	document.getElementById("ctl00_TopNav1_divProducts").style.display = "none"; 


	// adjust the main tabs
	document.getElementById("ctl00_TopNav1_lnkEducation").className = "tabOn";
	document.getElementById("ctl00_TopNav1_lnkCommentary").className = "tabHover";
	document.getElementById("ctl00_TopNav1_lnkMarketCenter").className = "tabHover";
	document.getElementById("ctl00_TopNav1_lnkTools").className = "tabHover";
	document.getElementById("ctl00_TopNav1_lnkProducts").className = "endtabHover";

	// more main tabs
	document.getElementById("ctl00_TopNav1_divMainNav").className = "backHover";
	document.getElementById("ctl00_TopNav1_divMainNavRight").className = "backBlankHover";
	document.getElementById("ctl00_TopNav1_lnkRight").className = "tabrightHover";
	
	// show the subtab background
	document.getElementById("ctl00_TopNav1_divShadow").className = "subNav";
	
	// Show/hide subtabs
	document.getElementById("ctl00_TopNav1_divEducation").className = "subNav";
	document.getElementById("ctl00_TopNav1_divCommentary").className = "subNavHide";
	document.getElementById("ctl00_TopNav1_divMarketCenter").className = "subNavHide";
	document.getElementById("ctl00_TopNav1_divTools").className = "subNavHide";
	document.getElementById("ctl00_TopNav1_divProducts").className = "subNavHide"; 
}

function ShowCommentary()
{
	ShowSubNavContainer();

	document.getElementById("ctl00_TopNav1_divEducation").style.display = "none";
	document.getElementById("ctl00_TopNav1_divCommentary").style.display = "block";
	document.getElementById("ctl00_TopNav1_divMarketCenter").style.display = "none";
	document.getElementById("ctl00_TopNav1_divTools").style.display = "none";
	document.getElementById("ctl00_TopNav1_divProducts").style.display = "none"; 

	// adjust the main tabs
	document.getElementById("ctl00_TopNav1_lnkEducation").className = "tabHover";
	document.getElementById("ctl00_TopNav1_lnkCommentary").className = "tabOn";
	document.getElementById("ctl00_TopNav1_lnkMarketCenter").className = "tabHover";
	document.getElementById("ctl00_TopNav1_lnkTools").className = "tabHover";
	document.getElementById("ctl00_TopNav1_lnkProducts").className = "endtabHover";

	// more main tabs
	document.getElementById("ctl00_TopNav1_divMainNav").className = "backHover";
	document.getElementById("ctl00_TopNav1_divMainNavRight").className = "backBlankHover";
	document.getElementById("ctl00_TopNav1_lnkRight").className = "tabrightHover";
	
	// show the subtab background
	document.getElementById("ctl00_TopNav1_divShadow").className = "subNav";
	
	// Show/hide subtabs
	document.getElementById("ctl00_TopNav1_divEducation").className = "subNavHide";
	document.getElementById("ctl00_TopNav1_divCommentary").className = "subNav";
	document.getElementById("ctl00_TopNav1_divMarketCenter").className = "subNavHide";
	document.getElementById("ctl00_TopNav1_divTools").className = "subNavHide";
	document.getElementById("ctl00_TopNav1_divProducts").className = "subNavHide"; 
}

function ShowMarketCenter()
{
	ShowSubNavContainer();

	// show/hide subtab parent
	document.getElementById("ctl00_TopNav1_divEducation").style.display = "none";
	document.getElementById("ctl00_TopNav1_divCommentary").style.display = "none";
	document.getElementById("ctl00_TopNav1_divMarketCenter").style.display = "block";
	document.getElementById("ctl00_TopNav1_divTools").style.display = "none";
	document.getElementById("ctl00_TopNav1_divProducts").style.display = "none"; 

	// adjust the main tabs
	document.getElementById("ctl00_TopNav1_lnkEducation").className = "tabHover";
	document.getElementById("ctl00_TopNav1_lnkCommentary").className = "tabHover";
	document.getElementById("ctl00_TopNav1_lnkMarketCenter").className = "tabOn";
	document.getElementById("ctl00_TopNav1_lnkTools").className = "tabHover";
	document.getElementById("ctl00_TopNav1_lnkProducts").className = "endtabHover";

	// more main tabs
	document.getElementById("ctl00_TopNav1_divMainNav").className = "backHover";
	document.getElementById("ctl00_TopNav1_divMainNavRight").className = "backBlankHover";
	document.getElementById("ctl00_TopNav1_lnkRight").className = "tabrightHover";
	
	// show the subtab background
	document.getElementById("ctl00_TopNav1_divShadow").className = "subNav";
	
	// Show/hide subtabs
	document.getElementById("ctl00_TopNav1_divEducation").className = "subNavHide";
	document.getElementById("ctl00_TopNav1_divCommentary").className = "subNavHide";
	document.getElementById("ctl00_TopNav1_divMarketCenter").className = "subNav";
	document.getElementById("ctl00_TopNav1_divTools").className = "subNavHide";
	document.getElementById("ctl00_TopNav1_divProducts").className = "subNavHide";  
}


function ShowTools()
{
	ShowSubNavContainer();

	// show/hide subtab parent
	document.getElementById("ctl00_TopNav1_divEducation").style.display = "none";
	document.getElementById("ctl00_TopNav1_divCommentary").style.display = "none";
	document.getElementById("ctl00_TopNav1_divMarketCenter").style.display = "none";
	document.getElementById("ctl00_TopNav1_divTools").style.display = "block";
	document.getElementById("ctl00_TopNav1_divProducts").style.display = "none";

	// adjust the main tabs
	document.getElementById("ctl00_TopNav1_lnkEducation").className = "tabHover";
	document.getElementById("ctl00_TopNav1_lnkCommentary").className = "tabHover";
	document.getElementById("ctl00_TopNav1_lnkMarketCenter").className = "tabHover";
	document.getElementById("ctl00_TopNav1_lnkTools").className = "tabOn";
	document.getElementById("ctl00_TopNav1_lnkProducts").className = "endtabHover";

	// more main tabs
	document.getElementById("ctl00_TopNav1_divMainNav").className = "backHover";
	document.getElementById("ctl00_TopNav1_divMainNavRight").className = "backBlankHover";
	document.getElementById("ctl00_TopNav1_lnkRight").className = "tabrightHover";
	
	// show the subtab background
	document.getElementById("ctl00_TopNav1_divShadow").className = "subNav";
	
	// Show/hide subtabs
	document.getElementById("ctl00_TopNav1_divEducation").className = "subNavHide";
	document.getElementById("ctl00_TopNav1_divCommentary").className = "subNavHide";
	document.getElementById("ctl00_TopNav1_divMarketCenter").className = "subNavHide";
	document.getElementById("ctl00_TopNav1_divTools").className = "subNav";
	document.getElementById("ctl00_TopNav1_divProducts").className = "subNavHide";  
}


function ShowProducts()
{
	ShowSubNavContainer();

	// show/hide subtab parent
	document.getElementById("ctl00_TopNav1_divEducation").style.display = "none";
	document.getElementById("ctl00_TopNav1_divCommentary").style.display = "none";
	document.getElementById("ctl00_TopNav1_divMarketCenter").style.display = "none";
	document.getElementById("ctl00_TopNav1_divTools").style.display = "none";
	document.getElementById("ctl00_TopNav1_divProducts").style.display = "block";

	// adjust the main tabs
	document.getElementById("ctl00_TopNav1_lnkEducation").className = "tabHover";
	document.getElementById("ctl00_TopNav1_lnkCommentary").className = "tabHover";
	document.getElementById("ctl00_TopNav1_lnkMarketCenter").className = "tabHover";
	document.getElementById("ctl00_TopNav1_lnkTools").className = "tabHover";
	document.getElementById("ctl00_TopNav1_lnkProducts").className = "endtabOn";

	// more main tabs
	document.getElementById("ctl00_TopNav1_divMainNav").className = "backHover";
	document.getElementById("ctl00_TopNav1_divMainNavRight").className = "backBlankHover";
	document.getElementById("ctl00_TopNav1_lnkRight").className = "tabrightHover";
	
	// show the subtab background
	document.getElementById("ctl00_TopNav1_divShadow").className = "subNav";
	
	// Show/hide subtabs
	document.getElementById("ctl00_TopNav1_divEducation").className = "subNavHide";
	document.getElementById("ctl00_TopNav1_divCommentary").className = "subNavHide";
	document.getElementById("ctl00_TopNav1_divMarketCenter").className = "subNavHide";
	document.getElementById("ctl00_TopNav1_divTools").className = "subNavHide";
	document.getElementById("ctl00_TopNav1_divProducts").className = "subNav";  
}


function HideSubNavContainer()
{
	if (document.getElementById("ctl00_TopNav1_divSubNavContainer") == null) return;
	document.getElementById("ctl00_TopNav1_divSubNavContainer").style.display = "none";
}

function ShowSubNavContainer()
{
	if (document.getElementById("ctl00_TopNav1_divSubNavContainer") == null) return;
	document.getElementById("ctl00_TopNav1_divSubNavContainer").style.display = "block";
}
