/*@cc_on _d=document;eval("var document=_d")@*/
var req;
var target;
var isIE;
var dwTick;
/* Init XMLHTTP */
function initRequest(url) {
    if (window.XMLHttpRequest) {
        req = new XMLHttpRequest();
    } else {
        if (window.ActiveXObject) {
            try {
                req = new ActiveXObject("Msxml2.XMLHTTP");
            }
            catch (e) {
                try {
                    isIE = true;
                    req = new ActiveXObject("Microsoft.XMLHTTP");
                }
                catch (e) {
                    alert(e.description);
                }
            }
        }
    }
    if (!req) {
        alert("Create XMLHTTP Failed");
    }
}
/* sendQuery */
function sendQuery(url, isSync, func) {
    var now = new Date();
    dwTick = now.getTime();
    initRequest(url);
    if (req) {
        try {
            if (isSync) {
                if (func) {
                    req.onreadystatechange = func;
                    req.open("POST", url, true);
                    req.send();
                } else {
                    alert("Call Back Function Invalid!");
                }
            } else {
                req.open("POST", url, false);
                req.send();
            }
        }
        catch (e) {
        }
    }
}
function openDialog(url) 
{
	var strPara = "dialogHeight:400px;left:" + ((screen.width - 350) / 2) + ";dialogWidth:350px;top:" + ((screen.height - 800) / 2) + ";help:off;resizable:off;scroll:no;status:off";
	var strReturn = window.showModalDialog(url, "", strPara);
}
