//Programmer: VUTH
//Create Date: 18-September-2008
// JavaScript Document
var xmlHttpMobileCon;
var tabMobileCon;
function GetMobileCon(tabname)	{
	//alert(id+'---'+tabname);
	//alert(tabname);
	tabMobileCon = tabname;
	if (tabname.length==0)	{
		document.getElementById(tabMobileCon).innerHTML="";
		return;
	}
	xmlHttpMobileCon=GetXmlHttpObjectMC();
	if (xmlHttpMobileCon==null)	{
		alert ("Your browser does not support AJAX!");
		return;
	} 
	var url="content/getMobileContent.php";
	url=url+"?tabname="+tabname+"&sid="+Math.random();
	xmlHttpMobileCon.onreadystatechange=MobileConState;
	xmlHttpMobileCon.open("GET",url,true);
	xmlHttpMobileCon.send(null);
}

function MobileConState() 
{ 
if (xmlHttpMobileCon.readyState==4 || xmlHttpMobileCon.readyState=="complete")
 { 
 	document.getElementById('loadingMsg').style.display = "none";
 	document.getElementById(tabMobileCon).innerHTML=xmlHttpMobileCon.responseText;
 } 
}

function GetXmlHttpObjectMC()	{
	var xmlHttpMobileCon=null;
	try	{
		// Firefox, Opera 8.0+, Safari
		xmlHttpMobileCon=new XMLHttpRequest();
	}
	catch (e)	{
		// Internet Explorer
		try	{
			xmlHttpMobileCon=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)	{
			xmlHttpMobileCon=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return xmlHttpMobileCon;
}