var xmlHttp;
function createXMLHttpRequest()
{
	if(window.ActiveXObject)
	{
		xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
	}else if(window.XMLHttpRequest)
	{
		xmlHttp=new XMLHttpRequest();
	}
}

function startRequest(id)
{
	createXMLHttpRequest();
	var url="checknewshow.php?id="+id;
	xmlHttp.onreadystatechange=handleStateChange;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function init(id)
{
	member();
	if(id!=null)
	{
		startRequest(id);
	}
}

function handleStateChange()
{
	if(xmlHttp.readyState==4)
	{
		if(xmlHttp.status==200)
		{
			if(xmlHttp.responseText==true)
			{
				
			}else if(xmlHttp.responseText==false)
			{
				window.location.href="newshowroom.php";
			}
		}
	}
}

function memberhandleStateChange()
{
	if(xmlHttp.readyState==4)
	{
		if(xmlHttp.status==200)
		{
			document.getElementById("results").innerHTML=xmlHttp.responseText;
		}
	}
}

function member()
{
	createXMLHttpRequest();
	var url="showlogin.php";
	xmlHttp.onreadystatechange=memberhandleStateChange;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}