//ws2

function showSidebarPage(saved, url) 
{
	document.cookie = 'topLevel=sidebar' + saved + ';path=/;';
	window.location=url;
}
function showHeaderPage(saved, url) 
{
	document.cookie = 'topLevel=header' + saved + ';path=/;';
	window.location=url;
}
function showLastVisited()
{
	var identifier = readCookie(' topLevel');
	if(window.location.href.lastIndexOf('TopCategoriesDisplay') != -1)
	{
		document.getElementById('header3').style.color="#ECCB6F";
	}

	else if (identifier != null)
	{
		var item = document.getElementById(identifier);
		if(item != null)
		{
			if(identifier.charAt(0) == 's')
			{
				item.style.backgroundColor="silver";
				item.style.color="#000000";
			}
			else
			{
				item.style.color="#ECCB6F";
			}
		}
	}
}
function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
	var c = ca[i];
	while (c.charAt==' ') c = c.substring(1,c.length);
	if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}
