function InfoGateway(url,data){
	var portal;
	try{
		portal=new XMLHttpRequest();
	}
	catch (e){
  		try{
			portal=new ActiveXObject("Msxml2.XMLHTTP");
    		}
		catch (e){
			try{
				portal=new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e){
				alert("Your browser is a Relic!");
				return false;
			}
		}
	}
	portal.onreadystatechange=function(){
		if(portal.readyState==4 && data==''){
			if(portal.status==200){
				document.getElementById("output").innerHTML = portal.responseText;
				InfoGateway(url,data);
			}
		}
		else{
			if(document.getElementById("output").innerHTML==''){
				document.getElementById("output").innerHTML = "<i>Loading...</i><br/><br/><br/><br/><br/><br/><br/>";
			}
		}
	}
	portal.open("POST",url,true);
	portal.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	if(data) {data = 'chat='+encodeURIComponent(data);}
	portal.send(data);
}

function action(){
	document.getElementById('mid').innerHTML = "";
	document.getElementById('right').innerHTML = document.getElementById('ad').innerHTML;
	document.getElementById('mid').innerHTML = document.getElementById('screen').innerHTML;
	document.getElementById('mid').style.visibility = "visible";
	document.getElementById('chat').style.visibility = "visible";
	document.getElementById('buffer').style.width = "100";
	document.getElementById('t').innerHTML = title;
	document.getElementById('t').align = "left";
}


