function request() { //定义xmlhttprequest
    var A=null;
    try {
        A=new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch(e) {
        try{
            A=new ActiveXObject("Microsoft.XMLHTTP");
        }
        catch(oc) {
            A=null;
        }
    }
   if ( !A && typeof XMLHttpRequest != "undefined" ) {
        A=new XMLHttpRequest();
    }
     return A;
}

function changeEvent(eid){
        xmlhttp_request=request();
		//alert('/includes/xml.php?act=add&pid='+pid+'&psize='+psize);
        xmlhttp_request.open('GET', 'includes/xml.php?eid='+eid, false);
        xmlhttp_request.onreadystatechange =changeEventResult;

        xmlhttp_request.setRequestHeader('Content-Type','application/x-www-form-urlencoded;');
        xmlhttp_request.send("");
}

function changeEventResult(){      //处理返回
        if (xmlhttp_request.readyState == 4) {
                if (xmlhttp_request.status == 200) {
                        //var rs=xmlhttp_request.responseXML.getElementsByTagName('rs')[0].firstChild.nodeValue;
                       // if(rs==1){
							price=xmlhttp_request.responseXML.getElementsByTagName('price')[0].firstChild.nodeValue;
							ttype=xmlhttp_request.responseXML.getElementsByTagName('ttype')[0].firstChild.nodeValue;

							rmbtt=xmlhttp_request.responseXML.getElementsByTagName('rmbtt')[0].firstChild.nodeValue;
							document.all('txtPrice').value=price;
							document.all('txttype').value=ttype;
							document.all('txtPricehidden').value=rmbtt;
							for(i=0;i<document.all('rate').options.length;i++){
								if(document.all('rate').options[i].text==ttype) document.all('rate').selectedIndex=i;
							}
						//}
				}
		}
}