// JavaScript Document

var sCurrentTab = 'topShares'

function changeTab(sTabName) {
	
	if (sTabName != null) {
		document.getElementById(sCurrentTab).style.visibility = 'hidden';
		document.getElementById(sCurrentTab + 'Content').style.zIndex = '1';
		
		document.getElementById(sTabName).style.visibility = 'visible';
		document.getElementById(sTabName + 'Content').style.zIndex = '2';
		
		sCurrentTab = sTabName;
		setCookie(sTabName);
	}
	
}

function getCookie(){
	
	var nameEQ = "lseSharePriceTabContent=";

	var ca = document.cookie.split(';');

	for(var i=0;i < ca.length;i++) {
		var c = ca[i];

		while (c.charAt(0)==' ') c = c.substring(1,c.length);

		if (c.indexOf(nameEQ) == 0)

		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;	
}

function setCookie(sTabName){
	document.cookie = "lseSharePriceTabContent=" + sTabName + "; path=/";
}