<!--
function chkCaptcha(event , obj, form, asyn){
    if (asyn==null) asyn = true;
    // if it is synchronize request, it will return the result of the end-point process ; ie the result of digestCaptchaResult
    return getHttpData(form, "/Common/Captcha/chkCaptcha.jsp", "POST", "", asyn, digestCaptchaResult, event);
}
function digestCaptchaResult(){
    // assume that [0] must be form and
    //             [1] is result
    //             [2] is event object
    if (arguments[1].responseText.indexOf("Error")>=0){
        arguments[0].CaptchaUserInput.focus();
        var div = document.createElement('DIV');
        var objs = document.getElementsByTagName('DIV');
        var num = (objs==null)?1 : objs.length + 1;
        var divname = "div_" + num;
        div.setAttribute("id", divname);
        div.className = "msgpanel";
        div.innerHTML = "<p style='float: right;display: inline; text-align: right;'><input type='button' name='close' value='X' class='close_button' onclick=\"destory(document.getElementById('"+divname+"'));\"></p><br><center>" 
                        + arguments[1].responseText + "</center>" ;
        var xy =  getCoordination();
        div.style.left = xy.x  +"px" ;
        div.style.top =  xy.y  +"px";
        document.body.appendChild(div);
        return false;
    }
    return true;
}
function destory(obj){ obj.parentNode.removeChild(obj);}

function getDocWidth(){
    if(!window.innerWidth) return  document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth;
    return window.innerWidth;
}

function getDocHeight(){
    if(!window.innerHeight) return  document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight;
    return window.innerHeight;
}

function getCoordination(){
    if (!document.all){
        mouX = window.pageXOffset + getDocWidth() *(1/3);
        mouY = window.pageYOffset + getDocHeight()*(1/3);
    }else{
        mouX = document.body.scrollLeft + getDocWidth()/2;
        mouY = document.body.scrollTop + getDocHeight()/2; 
    }
    return {x :mouX , y :mouY};
}

//-->