/***********************************Ajax Starts*************************************/
var xmlHttp = null;
function GetXmlHttpObject()
{
	var xmlHTTP = null;
	//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_news(news_id)
{ 
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
	alert ("Your browser does not support AJAX!");
	return;
	} 
	if(news_id == "")
	{
		alert("No record available.");	
		return;
	}
	url = "seeker_news.php?news_id="+news_id;
	xmlHttp.onreadystatechange=showChangedContents;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function showChangedContents()
{ 
 	if (xmlHttp.readyState==2 || xmlHttp.readyState==3)
	{
		document.getElementById("seeker_news").innerHTML='<span>Loading...<br /><img src="images/loading_animation_liferay.gif" alt="#" /></span>';
	}
	if (xmlHttp.readyState==4)
	{	document.getElementById("seeker_news").innerHTML = xmlHttp.responseText;
			//alert(xmlHttp.responseText);
	}
	
}
/***********************************Ajax Ends*************************************/
