function update_status(category, id_status) {
	
	//alert("change made to mod" +modID+" top"+topID+" page"+pageID);
	xmlHttp = GetXmlHttpObject();
	
	var url = "update_status.php?category=" + category + "&id_status=" + id_status;
	
	//alert(url);
	xmlHttp.onreadystatechange = state_changed_status;
	xmlHttp.open("GET", url, true);
	xmlHttp.send(null);
	//test using this line
	//window.open(url, "tempWindow", "status=1, toolbar=0, width=760, height=520, resizable=1");
	
}

function check_username_availability(username) {

	xmlHttp = GetXmlHttpObject();
	
	var url = "check_username_availability.php?username=" + trim(username);
	
	xmlHttp.onreadystatechange = state_changed_username;
	xmlHttp.open("GET", url, true);
	xmlHttp.send(null);
	//test using this line
	//window.open(url, "tempWindow", "status=1, toolbar=0, width=760, height=520, resizable=1");
}

function state_changed_status() { 
	if (xmlHttp.readyState == 4 || xmlHttp.readyState == "complete") { 
		colour_status_boxes();
		//alert(xmlHttp.responseText);
		//loadobjs("style.css");
		//document.getElementById("display_area").innerHTML = xmlHttp.responseText;
	} 
}

function state_changed_username() { 
	if (xmlHttp.readyState == 4 || xmlHttp.readyState == "complete") { 
		//colour_status_boxes();
		//alert(xmlHttp.responseText);
		//loadobjs("style.css");
		//document.getElementById("display_area").innerHTML = xmlHttp.responseText;
		show_tick_cross(xmlHttp.responseText);
	} 
}

function GetXmlHttpObject(handler) { 
	var objXMLHttp = null;
	if (window.XMLHttpRequest) {
		objXMLHttp = new XMLHttpRequest()
	} else if (window.ActiveXObject) {
		objXMLHttp = new ActiveXObject("Microsoft.XMLHTTP")
	}
	return objXMLHttp;
}