function CreateHTTPObject(){
    var xmlhttp;
    try {xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");}
    catch (e) {
        try {xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");}
        catch (e) {xmlhttp = false;}
    }
    if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
        try {xmlhttp = new XMLHttpRequest();}
        catch (e) {xmlhttp=false;}
    }
    if (!xmlhttp && window.createRequest) {
        try {xmlhttp = window.createRequest();}
        catch (e) {xmlhttp=false;}
    }
    return xmlhttp;
}

function OnReadyStateChng(res,xmlhttp) {
    if (xmlhttp.readyState == 4) {
        if (xmlhttp.status == 200) {res.innerHTML = formatpj(xmlhttp.responseText);}
        else {res.innerHTML = 'HTTP ´íÎó,´íÎó´úÂë:' + xmlhttp.status;}
    }else{
		res.innerHTML = '<img src="http://www.endad.com/img/loading.gif"><font color=gray>¶ÁÈ¡Êý¾Ý...</a>';
	}
}

