if(location.href.indexOf("comp49")!=-1)

SiteUrl="http://comp49/mmn/";

else{

	//SiteUrl="http://174.121.77.254/~nutcase/";

SiteUrl="http://"+location.hostname+"/";

if(location.hostname.indexOf("www")==-1)

	{
		var newLoc=location.href.replace(location.hostname,"www."+location.hostname);

		location.href=newLoc;

	}

}

var newXmlHttp;

var divId="";

var txt='';

var LoggedIn=false;



function ajaxLink(url,did)

{	

	

	divId=did;

	//alert(divId)

	newXmlHttp=GetnewXmlHttpObject();

	if (newXmlHttp==null)

	{

		alert ("Browser does not support HTTP Request");

		return;

	}

	if(url.indexOf("?")!=-1)

	url=SiteUrl+url+"&ajax_call="+Math.random();

	else

	url=SiteUrl+url+"?ajax_call="+Math.random();

	//alert(url)

	newXmlHttp.onreadystatechange=newStateChanged ;

	newXmlHttp.open("GET",url,true);

	newXmlHttp.send(null);

} 







function newStateChanged()

{ 

	if (newXmlHttp.readyState==4 || newXmlHttp.readyState=="complete")

	{	//alert(newXmlHttp.responseText);

		document.getElementById(divId).innerHTML=newXmlHttp.responseText ;

		if(divId=="readytogo_result" || divId=="mix_container_result")

			callOnLoad();

	}

}

//////////////////////////////ajaxAction

function ajaxAction(url)

{

	newXmlHttp=GetnewXmlHttpObject();

	if (newXmlHttp==null)

	{

		alert ("Browser does not support HTTP Request");

		return;

	}

	if(url.indexOf("?")!=-1)

	url=SiteUrl+url+"&ajax_call="+Math.random();

	else

	url=SiteUrl+url+"?ajax_call="+Math.random();

	//newXmlHttp.onreadystatechange=ActionStateChanged ;

	newXmlHttp.open("GET",url,true);

	newXmlHttp.send(null);

} 

//////////////////////////////END ajaxAction

//////////////////////////////ajaxAlert

function ajaxAlert(url)

{

	newXmlHttp=GetnewXmlHttpObject();

	if (newXmlHttp==null)

	{

		alert ("Browser does not support HTTP Request");

		return;

	}

	if(url.indexOf("?")!=-1)

	url=url+"&ajax_call="+Math.random();

	else

	url=url+"?ajax_call="+Math.random();

	newXmlHttp.onreadystatechange=alertStateChanged ;

	newXmlHttp.open("GET",url,true);

	newXmlHttp.send(null);

} 

function alertStateChanged()

{ 

	if (newXmlHttp.readyState==4 || newXmlHttp.readyState=="complete")

	{ 

	alert(newXmlHttp.responseText);

	//$id('topbar').style.display='none';	

	}

} 

//////////////////////////////END ajaxAlert

//////////////////////////////Start show two ajaxAlert

var divId1;

var divId2;

function showTwo(url1,div1,url2,div2)

{

	 divId1=div1;

	 divId2=div2;	

	newxmlHttp=GetnewXmlHttpObject();

	newxmlHttp5=GetnewXmlHttpObject();

	if (newxmlHttp==null)

	{

		alert ("Browser does not support HTTP Request");

		return;

	}

	if(url1.indexOf("?")!=-1)

	url1=SiteUrl+url1+"&ajax_call="+Math.random();

	else

	url1=SiteUrl+url1+"?ajax_call="+Math.random();

	if(url2.indexOf("?")!=-1)

	url2=SiteUrl+url2+"&ajax_call="+Math.random();

	else

	url2=SiteUrl+url2+"?ajax_call="+Math.random();

	newxmlHttp.onreadystatechange=stateChanged4 ;

	newxmlHttp.open("GET",url1,true);

	newxmlHttp.send(null);

	newxmlHttp5.onreadystatechange=stateChanged5 ;

	newxmlHttp5.open("GET",url2,true);

	newxmlHttp5.send(null);

} 

function stateChanged4()

{ 

	if (newxmlHttp.readyState==4 || newxmlHttp.readyState=="complete")

	{ 	// alert(divId1);

		//alert(newxmlHttp.responseText);		

		document.getElementById(divId1).innerHTML=newxmlHttp.responseText ;

	}

} 

function stateChanged5()

{ 

	if (newxmlHttp5.readyState==4 || newxmlHttp5.readyState=="complete")

	{ 		// alert(divId2);

		//alert(newxmlHttp5.responseText);		

		document.getElementById(divId2).innerHTML=newxmlHttp5.responseText ;					

	}

} 

//////////////////////////////END show two

function GetnewXmlHttpObject()

{ 

	var objnewXmlHttp=null;

	if (window.XMLHttpRequest)

	{

		objnewXmlHttp=new XMLHttpRequest();

	}

	else if (window.ActiveXObject)

	{

		objnewXmlHttp=new ActiveXObject("Microsoft.XMLHTTP");

	}

	return objnewXmlHttp;

} 







//function for chatting

//////////////////////////////END show two













	

