// JavaScript Document
function checkupdate(inputValue, fieldID, messageID){
	var memberurl="checkuu.asp?uuname=<%=uuname%>&"
	if (fieldID){
		// inputValue = encodeURIComponent(inputValue);
		inputValue =escape(inputValue);
		fieldID = escape(fieldID);
		cache.push("inputValue=" + inputValue + "&fieldID=" + fieldID);
	}
	if (cache.length > 0){
		var cacheEntry = cache.shift();
		CheckUUDo(memberurl,cacheEntry,messageID);
	}
}
function checkpassword2(inputValue, fieldID, messageID){
	var uuname=document.myform.uuname.value
	var password=document.myform.password.value
	var memberurl="checkuu.asp?uuname=" + uuname +"&password=" + password + "&"
	if (fieldID){
		// inputValue = encodeURIComponent(inputValue);
		inputValue =escape(inputValue);
		fieldID = escape(fieldID);
		cache.push("inputValue=" + inputValue + "&fieldID=" + fieldID);
	}
	if (cache.length > 0){
		var cacheEntry = cache.shift();
		CheckUUDo(memberurl,cacheEntry,messageID);
	}
}
function checklogin(inputValue, fieldID, messageID){
	var uuname=document.myform.uuname.value
	var usernameuu=document.myform.usernameuu.value
	var memberurl="checkuu.asp?uuname=" + uuname +"&username=" + usernameuu +"&"
	if (fieldID){
		// inputValue = encodeURIComponent(inputValue);
		inputValue =escape(inputValue);
		fieldID = escape(fieldID);
		cache.push("inputValue=" + inputValue + "&fieldID=" + fieldID);
	}
	if (cache.length > 0){
		var cacheEntry = cache.shift();
		CheckUUDo(memberurl,cacheEntry,messageID);
	}
}
function CheckUUDo(Url,postBody,messageID){
    document.getElementById(messageID).innerHTML = "<img border=0 src=" + jsdir + "images/loading.gif>";
    var theHttpRequest = getHttpObject();
    theHttpRequest.onreadystatechange = function() {
        processAJAX(messageID);
    };
    theHttpRequest.open("POST", Url, true);
    theHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
    theHttpRequest.send(postBody);
    function processAJAX(messageID){
        if (theHttpRequest.readyState == 4) {
            if (theHttpRequest.status == 200) {
					var backinfo=unescape(theHttpRequest.responseText);
					document.getElementById(messageID).innerHTML = backinfo;
					if (backinfo.indexOf("10001")>-1){
						document.getElementById('loginpasswordid').style.display="";
					}
					if (backinfo.indexOf("10000")>-1){
						document.getElementById('loginpasswordid').style.display="none";
					}
					if (backinfo.indexOf("icn_no")>-1){
						document.myform.next.disabled="disabled"
					}
					else{
						document.myform.next.disabled=false
					}
             } else {
                document.getElementById(messageID).innerHTML="<p>´íÎóÐÅÏ¢:&nbsp;" + unescape(theHttpRequest.statusText) +"<\/p>";
             }
         }
    }
}