function xmlhttpPost(strURL) {
    var xmlHttpReq = false;
    var self = this;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq.open('GET', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
        if (self.xmlHttpReq.readyState == 4) {
            updatepage(self.xmlHttpReq.responseText);
        }
    }
    self.xmlHttpReq.send();
}
function updatepage(str){
	
    //Do nothing here for now
	if (str=="error|refresh")
	{
		window.location.reload();	
	}
	else if (str=="error|none")
	{
		return;	
	}
	else
	{
		var n = str.split("|");
		if (n[0]=="requestRestart")
		{
			if (confirm('You need to restart the region to activate this change. Restart now?'))
			{
				restartRegion(n[1]);	
			}
		}
		else if (n[0]=="error")
		{
			alert(n[1]);
		}
	}
}
function submitAjaxText(object, value, option)
{
	xmlhttpPost("regiondetails.php?action=regiondetails.submitajax&object="+escape(object)+"&value="+escape(value)+"&option="+escape(option));	
}