// ID ÄÁ¹öÆÃ °ü·Ã
function getConvObj() {
	var code_1_byte = new Array("~","`","!","@","#","$","%","^","&","*","(",")","-","_","+","=","|","\\","{","[","}","]",":",";","\"","'","<",",",">",".","?","/"," ");
	var code_2_byte = new Array("¢¦","£à","£¡","£À","££","£¤","£¥","£Þ","£¦","£ª","£¨","£©","£­","£ß","£«","£½","£ü","£Ü","£û","£Û","£ý","£Ý","£º","£»","£¢","£§","£¼","£¬","£¾","£®","£¿","£¯","¡¡");
	var i, retObj = new Object();
	for(i=0;i<code_1_byte.length;i++) 
		retObj[code_1_byte[i]] = code_2_byte[i];
	return retObj
}
// µ¥ÀÌÅÍ ÁØºñ
arrIdCharConvData = getConvObj();
arrN2AData = new Array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z");
for ( i =0, arrA2NDataObj = new Object();i<arrN2AData.length;i++) 
	arrA2NDataObj[arrN2AData[i]] = i;
arrEtcConvChar = new Array("¡ì","¡í","¡­","¡ª","¢ç","¢Á","¡¤","¢°","¡«","¡©","","¢æ");
for ( i = 0, arrEtcConvData = new Object(), arrEtcRevConvData = new Object();i<arrEtcConvChar.length;i++) {
	tmpValue = i+32;
	arrEtcConvData[arrEtcConvChar[i]] = tmpValue;
	arrEtcRevConvData[tmpValue] = arrEtcConvChar[i];
}
function isAlNum(strA) {
	return /^[0-9a-z]*$/gi.test(strA);
}
function asciiConvert(arrObj, value) {
	return ( typeof(arrObj[value]) != "undefined" ? arrObj[value] : "" );
}
function id_convert(conv_user_id) {
	conv_user_id = conv_user_id.replace(/^ +/,"").replace(/ +$/,"");
	if ( isAlNum(conv_user_id) )
		return conv_user_id;
	var i, codeValue,charValue,ret="";
	for(i=0;i<conv_user_id.length;i++)
		ret += ( (codeValue = conv_user_id.charCodeAt(i)) < 32 || typeof( codeValue = arrEtcConvData[(charValue = conv_user_id.charAt(i))]) != "undefined" ? "_"+asciiConvert(arrN2AData, codeValue) : ( typeof( codeValue = arrIdCharConvData[charValue]) != "undefined" ? codeValue : charValue ));
	return ret;
}
function id_reverse_convert(conv_user_id) {
	if ( isAlNum(conv_user_id) )
		return conv_user_id;
	var i, codeValue, charValue, tmpValue, ret="";
	for(i=0;i<conv_user_id.length;i++) 
		ret += ( (codeValue = conv_user_id.charAt(i)) == "_" && typeof(tmpValue = arrA2NDataObj[conv_user_id.charAt(++i)]) != "undefined" ? ( tmpValue < 32 ? String.fromCharCode(tmpValue) : ( typeof(arrEtcRevConvData[tmpValue]) != "undefined" ? arrEtcRevConvData[tmpValue] : "?" )) : codeValue);
	return ret;
}
function makeUserId(userId) {
	return id_reverse_convert(id_convert(userId));
}			
function id2frame_name(user_id) {
	var i, ret;
	user_id = makeUserId(user_id.toLowerCase());
	for(i=0, ret = "";i<user_id.length;i++) 
		ret += "A"+user_id.charCodeAt(i);
	return ret;
}