function getMostPopular(type){
	
	reset = "<div style='width:100%; height:200px;margin-top:100px;margin-left:220px'><img src='/images/loading.gif'></div>";
	document.getElementById('innerMostPopular').innerHTML= reset;
	
	var strURL="/ajx/moreMostPopular.php?type="+type;
   var req = new XMLHttpRequest();
   if (req)
   {
	 req.onreadystatechange = function()
	 {
	  if (req.readyState == 4)
	  {
	 // only if "OK"
	 if (req.status == 200)
		 {
		 //alert(req.responseText );
		document.getElementById('mostPopularContent').innerHTML=req.responseText ;
	 } else {
	   alert("There was a problem while using XMLHTTP:\n" + req.statusText);
	 }
	   }
	  }
   req.open("GET", strURL, true);
   req.send(null);
   }
}

function getLatestPosts(page){
	reset = "<img src='/images/loading.gif'>";
	document.getElementById('mostPopularContent').innerHTML= reset;
	
	var strURL="/ajx/moreLatestPosts.php?pageNo="+page;
   var req = new XMLHttpRequest();
   if (req)
   {
	 req.onreadystatechange = function()
	 {
	  if (req.readyState == 4)
	  {
	 // only if "OK"
	 if (req.status == 200)
		 {
		 //alert(req.responseText );
		document.getElementById('latestPosts').innerHTML=req.responseText ;
	 } else {
	   alert("There was a problem while using XMLHTTP:\n" + req.statusText);
	 }
	   }
	  }
   req.open("GET", strURL, true);
   req.send(null);
   }
}
