/**
 * 自建ajax框架
 */
function MyAjax(){
	this.xmlHttp={};
}
MyAjax.prototype.createXMLHttpRequest=function(){
	if(window.XMLHttpRequest){
		this.xmlHttp = new XMLHttpRequest();
	}else if(window.ActiveXObject){
		this.xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	}
}
//post方法
MyAjax.prototype.sendPostRequest=function(queryString,url,winnercallback){
	//var queryString = "user="+frm.user.value+"&pwd="+frm.pwd.value; 
	this.createXMLHttpRequest();
	this.xmlHttp.open("POST",url,true);
	this.xmlHttp.onreadystatechange=winnercallback;
	this.xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8"); 
	this.xmlHttp.send(queryString);
} 

//初始化mt,并且建立实体
function initMt(){
	var xmlHttp=this.xmlHttp;
	if(xmlHttp.readyState == 4){
		if(xmlHttp.status == 200){
			var json=eval("("+xmlHttp.responseText+")"); 
			if(json.result!="0000"){
				//alert(json.errorMsg);
				return;
			}
			for(var i=0;i<json.items.length;i++){
				var temp=json.items[i];
				Zgh.sQ.options.add(new Option(temp.issue,i));
				Zgh.eQ.options.add(new Option(temp.issue,i));
			}
			Zgh.records=Math.min(Zgh.records,json.itemsNum.length);
			Zgh.sQ.options[Zgh.records-1].selected=true;
			buildBody(json);
		}
	}
}