var xmlHttp
function GetXmlHttpObject()
{
	var xmlHttp=null;
	try
	{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch (e)
	{
		// Internet Explorer
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return xmlHttp;
}

function change_tab(tab)
{
	xmlHttp=GetXmlHttpObject() 
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	}
	else
	{
		switch(tab)
		{
			case "Markets":
					var url="menu/channel_market.php"
					document.getElementById('Market').className="selected"
					document.getElementById('Stock').className=""
					document.getElementById('Sector').className=""
					document.getElementById('Company').className=""
					break;
			case "Stocks":
					var url="menu/channel_stocks.php"
					document.getElementById('Stock').className="selected"
					document.getElementById('Market').className=""
					document.getElementById('Sector').className=""
					document.getElementById('Company').className=""
					break;
			case "Sectors":
					var url="menu/channel_sectors.php"
					document.getElementById('Sector').className="selected"
					document.getElementById('Market').className=""
					document.getElementById('Stock').className=""
					document.getElementById('Company').className=""
					break;
			case "Company":
					var url="menu/channel_company.php"
					document.getElementById('Company').className="selected"
					document.getElementById('Market').className=""
					document.getElementById('Stock').className=""
					document.getElementById('Sector').className=""
					break;
			case "Latest":
					var url="./shares/research/bin/ResearchSummaryHome_opt.php"
					document.getElementById('Latest').className="selected"
					document.getElementById('Morning').className=""
					break;
			case "Morning":
					var url="./shares/research/bin/mornhtml.html"
					document.getElementById('Morning').className="selected"
					document.getElementById('Latest').className=""
					break;
		}
		xmlHttp.onreadystatechange=stateChanged_tab
		xmlHttp.open("GET",url,true)
		xmlHttp.send(null)

	}
}
function stateChanged_tab()
{
		if (xmlHttp.readyState==4)
		{ 
			document.getElementById("show_tab").innerHTML=xmlHttp.responseText;
		}
}

function change_tabH(tab)
{
	xmlHttp=GetXmlHttpObject() 
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	}
	else
	{
		switch(tab)
		{
			case "Latest":
					var url="./shares/research/bin/ResearchSummaryHome_opt.php"
					document.getElementById('Latest').className="selected"
					document.getElementById('Morning').className=""
					break;
			case "Morning":
					var url="./shares/research/bin/mornhtml.html"
					document.getElementById('Morning').className="selected"
					document.getElementById('Latest').className=""
					break;
		}
		xmlHttp.onreadystatechange=stateChanged_tabH
		xmlHttp.open("GET",url,true)
		xmlHttp.send(null)

	}
}
function stateChanged_tabH()
{
		if (xmlHttp.readyState==4)
		{ 
			document.getElementById("show_tabH").innerHTML=xmlHttp.responseText;
		}
}