var xmlHttp;

function receive(tmp,set){
	var url=tmp;
	url=url+"?id="+set;
	xmlHttp=GetXmlHttpObject();if(xmlHttp==null){alert("Browser does not support HTTP Request");return;}
	xmlHttp.open("GET",url,true);
	xmlHttp.onreadystatechange=status;
	xmlHttp.send(null);
}
function GetXmlHttpObject(){
	var xmlHttp=null;
	try{xmlHttp=new XMLHttpRequest();}
	catch(e){
		try{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}
		catch(e){xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}
	}
	return xmlHttp;
}
function status(){
	 var login_response = '<div id="logged_in">' +
	 '<div style="width: 350px; float: left; margin-left: 70px;">' + 
	 '<div style="width: 40px; float: left;">' +
	 '<img style="margin: 10px 0px 10px 0px;" align="absmiddle" src="pic/loading.gif">' +
	 '</div>' +
	 '<div style="margin: 10px 0px 0px 10px; float: right; width: 300px;">'+ 
	 "Please wait...</div></div>";  
	if(xmlHttp.readyState==4 && xmlHttp.status==200){
		document.getElementById('news').innerHTML=xmlHttp.responseText;
	}
	else{document.getElementById('news').innerHTML=login_response;}
}