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; var url = "check-username.asp?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(""); } function detectUserNames(userNames, 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 usernames = userNames.value; var url = "check-username.asp?usernames=" + usernames; try { xmlhttp.open("GET", url, true); } catch (e) { } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { var status = xmlhttp.status; if (status == 200) { globalObj = userNames; userNames.select(); showInvlidormatErrorInfo(userNames, 1); }else { resetInfoBox(userNames); globalObj = null; } } } xmlhttp.send(""); }