





    function detectUserName(userName, infoDiv){
        
        var xmlhttp = false;
        try {
            xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
            try {
                xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (E) {
                xmlhttp = false;
            }
        }
        
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
            xmlhttp = new XMLHttpRequest();
        }
        
        var username = userName.value;
        if (username.indexOf('@') < 0) {
            username = username + '@35.com';
        }
        
        var url = "/check-username.srf?username=" + username;
        try {
            xmlhttp.open("GET", url, true);
        } catch (e) {
            
        }
        
        xmlhttp.onreadystatechange=function() {
            if (xmlhttp.readyState==4) {
                var status = xmlhttp.status;
                
                if (status == 200) {
                    globalObj = userName;
                    userName.select();
                    showInvlidormatErrorInfo(userName, 1);
                }else {
                    resetInfoBox(userName);
                    globalObj = null;
                }
            }
        }
        
        xmlhttp.send("");
    }
    
    