// JavaScript Document

//the http request
var xmlHttp;
var targetObj;

function creatXMLHttpRequest(){
	if(window.ActiveXObject){
		xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	}
	else if(window.XMLHttpRequest){
		xmlHttp = new XMLHttpRequest();
	}
}

function startRequest(url,obj){
	creatXMLHttpRequest();
	targetObj = document.getElementById(obj);
	//xmlHttp.setRequestHeader("content-type","application/x-www-form-urlencoded");
	//
	xmlHttp.onreadystatechange = handleStateChange;
	xmlHttp.open("POST",url,true);
	//xmlHttp.setRequestHeader("Charset","gb2312"); 
		//xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); 

	xmlHttp.send(null);
}

function handleStateChange(){
	if(xmlHttp.readyState == 4){
		if(xmlHttp.status == 200){
			targetObj.innerHTML=xmlHttp.responseText;
			//alert(xmlHttp.responseText());
		}
	}
}

	function changeBg(me){
	//alert("sfs");
		me.background="img/buttontdbg.jpg";
		me.style.color="#FFFFFF";
	}
	function changeBg2(me){
		me.background="";
		me.style.color="#000000";
	}
