function getHomepageStory(limit)
{
    var xmlHttp;
	var limit  = limit;
	var newLimit =0;
	try
	{
		xmlHttp = new XMLHttpRequest(); 
	}
	catch(e)
	{
		 try
		 {
			xmlHttp = new ActiveXObject("Mxml2.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)
		{    
			var resText = xmlHttp.responseText;
			var resTextArr = resText.split("`");
			document.getElementById('topnews').innerHTML=resTextArr[1];
			document.countform.count.value = resTextArr[0];
		}
		
    }
	
	if(limit == 6)
		{
			limit = document.countform.count.value;
		}
	xmlHttp.open("GET","getHomeStory.php?limit="+limit,true);
	xmlHttp.send(null);
	
}


function init()
{
	
	showtime = setInterval("getHomepageStory('6')",6000);
}

function stopRotation()
{
	clearInterval(showtime);	
}
