function loadContent(ele, url, showloading)
{  
	var xmlHttp;
  try
  {   
		xmlHttp=new XMLHttpRequest();
	}
  catch (e)
  {       
		try
    {     
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");      
		}
    catch (e)
    {      
			try
      {        
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");        
			}
      catch (e)
      {        
				alert("Your browser does not support AJAX!");        
				return false;        
			}      
		}    
	}

  xmlHttp.onreadystatechange=function()
  {
  	if(xmlHttp.readyState==4)
    {
		if(xmlHttp.status==200){
			document.getElementById(ele).innerHTML=xmlHttp.responseText;
		} else {
			document.getElementById(ele).innerHTML='Error '+xmlHttp.status;
		}
    } else {
		if(showloading)
			document.getElementById(ele).innerHTML='<img src="ajax/ajax-loader.gif" style="width:16px;height:16px;"/> Loading...';
	}
  }

	xmlHttp.open("GET",url+"&ticket="+Math.random()*10,true);

	xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8'); 
	xmlHttp.send(null);  
}

function getCoverStory(id, showloading){
	loadContent("latest_cs","ajax/getcoverstory.jsp?s="+id, showloading);
}

function getBusiness(id, showloading){
	loadContent("latest_buss","ajax/getbusiness.jsp?s="+id, showloading);
}

function getSociety(id, showloading){
	loadContent("latest_soc","ajax/getsociety.jsp?s="+id, showloading);
}

function getWorldAffairs(id, showloading){
	loadContent("latest_world","ajax/getworldaffairs.jsp?s="+id, showloading);
}

function getTechnology(id, showloading){
	loadContent("latest_tech","ajax/gettechnology.jsp?s="+id, showloading);
}

function getHealth(id, showloading){
	loadContent("latest_health","ajax/gethealth.jsp?s="+id, showloading);
}

function getArts(id, showloading){
	loadContent("latest_arts","ajax/getarts.jsp?s="+id, showloading);
}