if (window.dialogArguments != null ) {
	var dialogparam = window.dialogArguments;
} else {
	var dialogparam = null;
}


var NUM = "0123456789";	
var SALPHA = "abcdefghijklmnopqrstuvwxyz";
var ALPHA = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"+SALPHA;
var EMAIL = "!#$%&*+-./=?@^_`{|}"+NUM+ALPHA;
var NONIDABLE = "~!@#$%^&*()_+|`-=:;<>?,./¡Ù¡Ø¡Ú¡Û¡Ü¡Ý¡Þ£¦¡ß";


var PASSWORD = "!@.#,$%^*&_-" + ALPHA + NUM;
var ERRORMSG = "";


///// Auto blur
function autoBlur(){ 
    if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") 
    document.body.focus(); 
}
document.onfocusin=autoBlur; 

///// popup
function open_win(URL,name,width,height,top,left) { 
    window.open(URL,name,'width='+width+',height='+height+',top='+top+',left='+left+',scrollbars=auto,resizable=0,status=no,menubar=0'); 
}


function CheckType(s,spc) {
	var i;
	for(i=0; i<s.length; i++) {
		if (spc.indexOf( s.substring(i, i+1)) < 0) {
			return false;
		}
	}
		
	return true;
}

function CheckBType(s,spc) {
	var i;
	for(i=0; i<s.length; i++) {
		if (spc.indexOf( s.substring(i, i+1)) > 0) {
			return false;
		}
	}
	return true;
}

function IsChecked(junkform) {
	var i= 0 ;
	var check_uid = '';
	while (obj = eval("junkform.uid"+ i)) {
		if (obj.checked) check_uid += obj.value + '|';
		i++;
	}
	return check_uid;
}

function CCheckEmail (sEmail) {
	if (!CheckType(sEmail, EMAIL)) {
		alert("¸ÞÀÏÁÖ¼Ò¿¡ Àß¸øµÈ ¹®ÀÚ°¡ ÀÖ½À´Ï´Ù.");
		return false;
	} 
	var a = sEmail.indexOf('@');
	if ( a <=0 || a == sEmail.length -1 ) {
		alert("¸ÞÀÏÁÖ¼Ò´Â aaa@bbb.ccc.ddd µîÀÇ ÇüÅÂ·Î ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
		return false;
	} else {
		return true;
	}
}

function HanMailCheck(email) {
	if (!CCheckEmail(email.value)) {
		return false;
	} else if ((email.value.indexOf("@hanmail.net") > 0 || email.value.indexOf("@daum.net") > 0 )&& !confirm('ÇÑ¸ÞÀÏ ÁÖ¼Ò¸¦ »ç¿ë½Ã ÀÏºÎ ±â´ÉÀ» »ç¿ë ÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.\n\n±×·¡µµ »ç¿ëÇÏ½Ã°Ú½À´Ï±î?')) {
		return false;
	} else {
		return true;
	}
	
}

function goMiniHome(home_id) {
	top.location.href = '/?home_id='+ home_id;
}

function CheckTelNo(telobj) {
	if (!CheckType(telobj.value, NUM + '-')) {
		alert('ÀüÈ­¹øÈ«´Â ¼ýÀÚ¿Í - ±âÈ£¸¸ ¿Ã¼ö ÀÖ½À´Ï´Ù');
		telobj.focus();
	}
}

function popupWin(url) {
	popup = window.open (url ,'popup','width=100,height=100,resizable=no,status=0', false);
	popup.focus();
}

function showZipCode(m) {
	popup = window.open('/popup/pop_zipcode.html?m='+m,'popup', 'width=440,height=200,resizable=no,scrollbars=no,top=10,left=10');	
	popup.focus();
}

function ShowSong(SEQ_MUSIC) {
	t_home_id = getHomeid();
	popup = window.open('/music/pop_buymusic.html?home_id=' + t_home_id + '&uid='+SEQ_MUSIC,'musicplayer', 'width=440,height=200,resizable=no,scrollbars=no,top=10,left=10');	
	popup.focus();
}

function ShowLyrics(SEQ_MUSIC) {
	t_home_id = getHomeid();
	popup = window.open('/music/pop_buymusic.html?m=LY&home_id=' + t_home_id + '&uid='+SEQ_MUSIC,'musicplayer', 'width=440,height=200,resizable=no,scrollbars=no,top=10,left=10');	
	popup.focus();
}

function BuySong(SEQ_MUSIC) {
	popup = window.open('/music/pop_buymusiclist.html?uid='+SEQ_MUSIC,'popup', 'width=440,height=200,resizable=no,scrollbars=no,top=10,left=10');	
	popup.focus();
}


function RadioCheck(radioinput) {
	len = radioinput.length;
	if (len > 0 ) {
		for (i = 0; i < len; i++) {
			if (radioinput[i].checked) return radioinput[i].value;
		}
		return false;
	} else {
		if (radioinput.checked) return radioinput.value;
		return false;
	}
}


function AddItem(selectobj,val,txt,optindex) {
	NewItem = new Option(txt, val, false, true);
	selectobj.options[optindex]= NewItem;
}

function open_wnd(url, name, width, height) {
    var oWnd = window.open(url, name, "toolbar=0,menubar=0,resizable=no,scrollbars=no,width=" + width + ",height=" + height);
    return oWnd;
}

var oImg = new Array();
var img_count = 0;

function resizeImage(Imgobj) {
	oImg[img_count] = Imgobj;
	
	setTimeout("resizeImage2(oImg["+img_count+"])",200);
	img_count++;
}

function resizeImage2(Imgobj) {
	if (Imgobj.width > 520) Imgobj.width = 520;
}

function ImgError(oImg, imgurl) {
	if (imgurl !=  null) {
		oImg.src = imgurl;
	} else {
		oImg.width = 103;
		oImg.height=78;
		oImg.src = '/image/no_img103.gif';
	}
}



function isNotOnlyKorean(id_text){
	for ( var i=0; i < id_text.length; i++ ) {
		if ( id_text.charCodeAt(i) < 0xAC00 || id_text.charCodeAt(i) > 0xD7A3){
			if (( id_text.charCodeAt(i) < 12593 || id_text.charCodeAt(i) > 12643 ) && ( id_text.charCodeAt(i) != 32)) {
				return true;
			}
		}
	}	
	return false;
}

function keydownEngNum() {			//keydown½Ã¿¡ ¿µ¾î¿Í ¼ýÀÚ¸¸ ¸Ô´Â °Í.
	if (!(event.keyCode>=48&&event.keyCode<=57)&&!(event.keyCode>=65&&event.keyCode<=90)&&event.keyCode!=9&&event.keyCode!=8&&event.keyCode!=46&&event.keyCode!=37&&event.keyCode!=39&&event.keyCode!=45) {
		event.keyCode = 0;
		event.cancelBubble = true;
		event.returnValue = false;
	}
}

function hasValue(oField)
{
	if (oField.value.replace(/(^\s*)|(\s*$)/g, "") == "")
		return false;
	else
		return true;
}


function popview(url)
{
    open_wnd("/others/viewimage.html?img=" + url, "imageview", 100, 100);
}

function MenuEvent(en) {
	try {
		if (en != 'home' && ! LoginCheck() ) {
	
		} else if (en == 'home') {
			t_home_id = getSelUserid();
			goMiniHome(t_home_id);
		} else if (en == 'buddyadd' || en == 'buddymod' || en == 'buddydel') {
			BuddyHandle(en);
			if (top.bg_process != null ) top.bg_process.loadMyBuddy();	
		} else if (en == 'msgblk' || en == 'msgwri' ||en == 'smswri' || en == 'mailwri' || en == 'meetsms') {
			MsgHandel(en);
		} else if (en == 'chat1by1' || en == 'chatblk') {
			ChatHandel(en);
		} else if (en == 'invitehome' || en == 'inviteclub') {
			InviteHandel(en);
		}
	} catch(e) {
	}
}

function InviteHandel(en) {
	t_myuser_id = getMyUserid();
	t_home_id = getSelUserid();
	if (!LoginCheck()) {
	} if (t_home_id == t_myuser_id) {
		alert('ÀÚ½ÅÀ» ÃÊ´ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù'); 
	} else if (en == 'invitehome') {
		buddy_id = showModalDialog("/popup/pop_invitehome.html?" +t_home_id , t_home_id , "resizable: no; help: no; status: no; scroll: no; ");	
		MsgSend(buddy_id);
	} else if (en == 'inviteclub') {
		buddy_id = showModalDialog("/popup/pop_inviteclub.html?" +t_home_id , t_home_id , "resizable: no; help: no; status: no; scroll: no; ");
		MsgSend(buddy_id);
	} 
}


function UMenuEvent(show_id, en) {
	SetUserID(show_id);
	MenuEvent(en);
}

function AddBuddy(show_id) {
	SetUserID(show_id);
	t_myuser_id = getMyUserid();
	if (!LoginCheck()) {
	
	} else {
		BuddyHandle('buddyadd');
	}
}

function BuddyHandle(en) {
	t_myuser_id = getMyUserid();
	t_home_id = getSelUserid();
	if (t_home_id == t_myuser_id) {
		alert('ÀÚ½ÅÀ» ¹öµð·Î ÁöÁ¤ÇÏ½Ç¼ö ¾ø½À´Ï´Ù'); 
	} else if (en == 'buddyadd') {
		buddy_id = showModalDialog("/popup/pop_bebuddy.html?" +t_home_id , t_home_id , "resizable: no; help: no; status: no; scroll: no; ");	
		MsgSend(buddy_id);
	} else if (en == 'buddydel') {
		showModalDialog("/popup/pop_buddydel.html?" + t_home_id, t_home_id , "resizable: no; help: no; status: no; scroll: no; ");	
	} else if (en == 'buddymod') {
		showModalDialog("/popup/pop_buddyinfo.html?" + t_home_id, t_home_id , "resizable: no; help: no; status: no; scroll: no; ");	
	}
}

function MsgHandel(en) {
	t_home_id = getSelUserid();
	t_myuser_id = getMyUserid();
	if (t_home_id == t_myuser_id) {
		alert('ÀÚ½Å¿¡°Ô´Â ÂÊÁö¸¦ º¸³¾ ¼ö ¾ø½À´Ï´Ù.'); 
	} else if (en == 'msgblk') {
		showModalDialog("/popup/pop_msgblk.html?" +t_home_id, t_home_id , "resizable: no; help: no; status: no; scroll: no; ");	
	} else if (en == 'msgwri'){
		buddy_id = showModalDialog("/popup/pop_msgwri.html?" + t_home_id, t_home_id , "resizable: no; help: no; status: no; scroll: no; ");	
		MsgSend(buddy_id);
	} else if (en == 'mailwri'){
		showModalDialog("/popup/pop_mailwri.html?" +t_home_id, t_home_id , "resizable: no; help: no; status: no; scroll: no; ");	
	} else if (en == 'meetsms'){
		showModalDialog("/popup/pop_smswri.html?" +t_home_id, t_home_id , "resizable: no; help: no; status: no; scroll: no; ");	
	}
}

function MsgSend(buddy_id) {
	if (simple_client != null && buddy_id != null  && buddy_id != '') {
		buddy_info = buddy_id.split("|");
		alert(buddy_id);
		len = buddy_info.length;
		for (i = 0; i < len; i++) {
			if (buddy_info[i] != '') simple_client.message_sended(buddy_info[i]);
		}
	}
}

function ChatHandel(en) {
	t_home_id = getSelUserid();
	t_myuser_id = getMyUserid();
	if (t_home_id == t_myuser_id) {
		alert('ÀÚ½Å¿¡ ´ëÇÏ¿© Ã¤ÆÃÇÏ½Ç ¼ö ¾ø½À´Ï´Ù'); 
	} else if (en == 'chat1by1') {
		simple_client.requestDate(t_home_id, '');
	} else if (en == 'chatblk') {
		showModalDialog("/popup/pop_chatblk.html?" +t_home_id, t_home_id , "resizable: no; help: no; status: no; scroll: no; ");	
	} else if (en == 'meetblk') {
		showModalDialog("/popup/pop_meetblk.html?" +t_home_id, t_home_id , "resizable: no; help: no; status: no; scroll: no; ");	
	}
}


function poplogin(return_url) {
    if (top.minihp_main != null) {
		t_home_id = top.minihp_main.home_id;
		t_c_menu = top.minihp_main.c_menu;
		if (return_url != null) {
			t_main_url = document.location.pathname;
			pos = t_main_url.lastIndexOf('/');
			t_main_url = t_main_url.substring(0,pos+1); 
			t_main_url += return_url
		} else {
			t_main_url = top.minihp_main.main_url;
		}
		encode_main_url = escape(t_main_url);
		re_url = 'http://mini.tourvill.com/?home_id=' + t_home_id + '&c_menu='+t_c_menu+'&main_url=' + encode_main_url;
		re_url = escape(re_url);
		//open_wnd("http://mini.tourvill.com/" + hompy_mode + "/login.php?re_url=" + re_url , "popuplogin", 500, 380);
		open_wnd("http://tourvill.com/member/pop_login.php?re_url=" + re_url , "popuplogin", 450, 260);
		//location.href= "/" + hompy_mode + "/login.php?home_id=" + t_home_id + "&re_url=" + re_url;	
    }
}

function pop_logout() {
	if (top.minihp_main != null) {
		t_home_id = top.minihp_main.home_id;
		re_url = 'http://mini.tourvill.com/?home_id=' + t_home_id;
		re_url = escape(re_url);
		top.location.href= "http://tourvill.com/member/logout.html?re_url=" + re_url;
	}
}

function LoginCheck() {
	if (getMyUserid() == '' ) {
		poplogin();
		return false;
	} else {
		return true;
	}	
}		


function go_MyHome() {
	if (top.minihp_main != null) {
		t_home_id = top.minihp_main.myuser_id;
		top.location.href= "/?home_id=" + t_home_id;
		//alert(top.location.href);
	}
}

function go_Random() {
	if (top.minihp_main != null) {
		top.location.href= "/include/go_random.html";
	}
}

function getSelUserid() {
		
	try {
		return top.bg_process.user_id;
	} catch (e) {
		return '';
	}
}

function getHomeid() {
	try {
		return top.minihp_main.home_id;
	} catch (e) {
		return '';
	}
}

function getMyUserid() {
	
//	alert(myuser_id);
	try {
		return myuser_id;
	} catch (e) {
		return '';
	}
}


function getHompyMode() {
	
	try {
		return top.bg_process.hompy_mode;
	} catch (e) {
		return '';
	}
	//alert(top.bg_process.hompy_mode);
}


function goMinihome() {
	t_home_id = getSelUserid();
	top.location.href= "/?home_id=" + t_home_id;
}

function CheckAll(form, chkobj) {
	var i= 0 ;
	while (obj = eval("form.uid"+ i)) {
		obj.checked = chkobj.checked;
		i++;
	}
}

document.write("<div id=menu_parent style='position:absolute;display:none;top:0;left:0'>"
	+ "<table border=0 width=78 height=108 cellspacing=0 cellpadding=0 background='/image/popupbg.gif'>"
	+ "<tr><td align=right style='padding: 2 2 2 2'>"
	+ "<table border=0 width=64 height=100 cellspacing=0 cellpadding=0 bgcolor=#F0F0F0 style='cursor:hand'>"
	+ "<tr><td height=20 onMouseOver=\"ChColor(this);menuOver('');\"  onMouseOut=ChColor(this) onClick=MenuEvent('home') class=popup>&nbsp; È¨ÇÇ°¡±â</td></tr>"
	+ "<tr><td height=20 onMouseOver=\"ChColor(this);menuOver('menu_child1');\"  onMouseOut=ChColor(this) class=popup >&nbsp; ¹öµð°ü¸®</td></tr>"
	+ "<tr><td height=20 onMouseOver=\"ChColor(this);menuOver('');\" onClick=MenuEvent('mailwri')  onMouseOut=ChColor(this) class=popup >&nbsp; ¸ÞÀÏº¸³»±â</td></tr>"
	+ "<tr><td height=20 onMouseOver=\"ChColor(this);menuOver('');\" onClick=MenuEvent('meetsms') onMouseOut=ChColor(this) class=popup >&nbsp; ¹®ÀÚº¸³»±â</td></tr>"
	+ "<tr><td height=20 onMouseOver=\"ChColor(this);menuOver('menu_child4');\"  onMouseOut=ChColor(this) class=popup >&nbsp; ÃÊ´ë</td></tr>"
	+ "</table>"
	+ "</td></tr></table>"
	+ "</div>"
	+ "<div id=menu_child1 style='position:absolute;display:none;top:0;left:0'>"
	+ "<table border=0 width=67 cellspacing=0 cellpadding=0>"
	+ "<tr><td><img src=/image/popuptop.gif width=67 height=4></td></tr>"
	+ "<tr><td  background=/image/popupmid.gif style='padding: 0 2 0 1'>"
	+ "<table border=0 width=63 cellspacing=0 cellpadding=0 bgcolor=#F0F0F0 style='cursor:hand'>"
	+ "<tr><td height=20  onMouseOver=ChColor(this)  onMouseOut=ChColor(this) onClick=MenuEvent('buddyadd') class=popup>&nbsp;¹öµð½ÅÃ»</td></tr>"
	+ "<tr><td height=20  onMouseOver=ChColor(this)  onMouseOut=ChColor(this) onClick=MenuEvent('buddymod') class=popup>&nbsp;¹öµðº¯°æ</td></tr>"
	+ "<tr><td height=20  onMouseOver=ChColor(this)  onMouseOut=ChColor(this) onClick=MenuEvent('buddydel') class=popup>&nbsp;¹öµðÇØÁö</td></tr>"
	+ "</table></td></tr>"
	+ "<tr><td><img src=/image/popupbot.gif width=67 height=3></td></tr>"
	+ "</table>"
	+ "</div>"
	+ "<div id=menu_child2 style='position:absolute;display:none;top:0;left:0'>"
	+ "<table border=0 width=67 cellspacing=0 cellpadding=0>"
	+ "<tr><td><img src=/image/popuptop.gif width=67 height=4></td></tr>"
	+ "<tr><td  background=/image/popupmid.gif style='padding: 0 2 0 1'>"
	+ "<table border=0 width=100% cellspacing=0 cellpadding=0 bgcolor=#F0F0F0 style='cursor:hand'>"
	+ "<tr><td height=20  onMouseOver=ChColor(this)  onMouseOut=ChColor(this) onClick=MenuEvent('msgblk') class=popup>&nbsp;ÂÊÁö¸·±â</td></tr>"
	+ "<tr><td height=20  onMouseOver=ChColor(this)  onMouseOut=ChColor(this) onClick=MenuEvent('msgwri') class=popup>&nbsp;ÂÊÁöº¸³»±â</td></tr>"
	+ "<tr><td height=20  onMouseOver=ChColor(this)  onMouseOut=ChColor(this) onClick=MenuEvent('mailwri') class=popup>&nbsp;¸ÞÀÏº¸³»±â</td></tr>"
	+ "<tr><td height=20  onMouseOver=ChColor(this)  onMouseOut=ChColor(this) onClick=MenuEvent('meetsms') class=popup>&nbsp;SMSº¸³»±â</td></tr>"
	+ "</table></td></tr>"
	+ "<tr><td><img src=/image/popupbot.gif width=67 height=3></td></tr>"
	+ "</table>"
	+ "</div>"
	+ "<div id=menu_child3 style='position:absolute;display:none;top:0;left:0'>"
	+ "<table border=0 width=67 cellspacing=0 cellpadding=0>"
	+ "<tr><td><img src=/image/popuptop.gif width=67 height=4></td></tr>"
	+ "<tr><td  background=/image/popupmid.gif style='padding: 0 2 0 1'>"
	+ "<table border=0 width=63 cellspacing=0 cellpadding=0 bgcolor=#F0F0F0 style='cursor:hand'>"
	+ "<tr><td height=20  onMouseOver=ChColor(this)  onMouseOut=ChColor(this) onClick=MenuEvent('chat1by1') class=popup>&nbsp;1:1Ã¤ÆÃÇÏ±â</td></tr>"
	+ "<tr><td height=20  onMouseOver=ChColor(this)  onMouseOut=ChColor(this) onClick=MenuEvent('chatblk') class=popup>&nbsp;Ã¤ÆÃ¸·±â</td></tr>"
	+ "</table></td></tr>"
	+ "<tr><td><img src=/image/popupbot.gif width=67 height=3></td></tr>"
	+ "</table>"
	+ "</div>"
	+ "<div id=menu_child4 style='position:absolute;display:none;top:0;left:0'>"
	+ "<table border=0 width=67 cellspacing=0 cellpadding=0>"
	+ "<tr><td><img src=/image/popuptop.gif width=67 height=4></td></tr>"
	+ "<tr><td  background=/image/popupmid.gif style='padding: 0 2 0 1'>"
	+ "<table border=0 width=63 cellspacing=0 cellpadding=0 bgcolor=#F0F0F0 style='cursor:hand'>"
	+ "<tr><td height=20  onMouseOver=ChColor(this)  onMouseOut=ChColor(this) onClick=MenuEvent('inviteclub') class=popup>&nbsp;Å¬·´ÃÊ´ë</td></tr>"
	+ "<tr><td height=20  onMouseOver=ChColor(this)  onMouseOut=ChColor(this) onClick=MenuEvent('invitehome') class=popup>&nbsp;È¨ÇÇÃÊ´ë</td></tr>"
	+ "</table></td></tr>"
	+ "<tr><td><img src=/image/popupbot.gif width=67 height=3></td></tr>"
	+ "</table>"
	+ "</div>"
	+ "");
	

	var NS4;
	var IE4;
	var mouse_x;
	var mouse_y;
	var parent_menu_name = "menu_parent";
//	var child_menu_array = ["menu_child1", "menu_child2", "menu_child3", "menu_child4"];
//	var child_menu_pos = [23, 18, 60, 60];
	var child_menu_array = ["menu_child1",  "menu_child4"];
	var child_menu_pos = [23, 60];
	var menuover_bgcolor = "#E4E4E4";
	var show_layer = false;
	
	NS4 = (document.layers);
	IE4 = (document.all);
	
	if (NS4) {
		document.captureEvents(Event.CLICK)
		document.onclick = MouseDown;
	} else if (IE4) {
		document.onclick = MouseDown;
	}
	
	function MouseDown(e) {
		try {
			event_target = event.srcElement;
			event_target = event_target.toString();
			event_check = event_target.indexOf("javascript:MPopup(");
			mouse_x = event.clientX;
			mouse_y = event.clientY + window.document.body.scrollTop;
			if (!event_check) {
				if (!show_layer) menuOver('SHOW');
				else menuOver('HIDE');
			} else {
				menuOver('HIDE');
			}
		} catch(e) {
			mouse_x = event.clientX;
			mouse_y = event.clientY
		}
	}	
	
	function menuOver(menu_id) {
		if (menu_id == 'HIDE') {
			eval(parent_menu_name + ".style.display = \"none\"");
			show_layer = false;
		} else if (menu_id == 'SHOW') {
			show_layer = true;
			eval(parent_menu_name + ".style.display = \"\"");
			eval(parent_menu_name + ".style.pixelTop =" + mouse_y);
			eval(parent_menu_name + ".style.pixelLeft =" + mouse_x);		
		}
		var menu_len = child_menu_array.length;
		for (i=0; i<menu_len; i++) {
			if (child_menu_array[i] == menu_id) {
				eval(child_menu_array[i] + ".style.display = \"\"");
				xPos = mouse_x + 75;
				yPos = mouse_y + child_menu_pos[i];
				eval(menu_id + ".style.pixelTop =" + yPos);
				eval(menu_id + ".style.pixelLeft =" + xPos);		
				eval(menu_id + ".style.display = \"\"");
			} else {
				eval(child_menu_array[i] + ".style.display = \"none\"");
			}
		}
	}
	
	function SetUserID(show_id) {
		try {
			top.bg_process.user_id = show_id;
		} catch(e) {
			
		}
	}
	
	function ChColor(obj) {
		if (obj.style.backgroundColor == '') {
			obj.style.backgroundColor = menuover_bgcolor;
		} else {
			obj.style.backgroundColor = '';
		}
		
	}
	
	function MPopup(show_id) {
		SetUserID(show_id);
	}
	function MPopup_top(show_id) {
		SetUserID(show_id);
		menuOver('SHOW')
	}
	
	function LoginEnd() {
		top.location.href = '/home/?home_id='+ home_id + '&c_menu='+c_menu+'&remain_url=' + main_url;
	}

	function MakeColor(obj_name , m, incolor) {
		var hex_color = new Array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F");
	
		obj = eval(obj_name);
		switch (m) {
			case "R" : obj.color_r = incolor; break;
			case "G" : obj.color_g = incolor; break;
			case "B" : obj.color_b = incolor; break;
		}
	
		madecolor = "#"+hex_color[obj.color_r]+hex_color[obj.color_r]+ hex_color[obj.color_g]+hex_color[obj.color_g]+hex_color[obj.color_b]+hex_color[obj.color_b];
		
		eval(obj.setfun + "('" + madecolor + "')");
		
		html = "<table border=0 cellspacing=1 cellpadding=1 bgcolor=#f0f0f0>";
		html += "<tr><td>";
		html += "<table border=0 cellspacing=1 cellpadding=1 bgcolor=#FFFFFF style='cursor:hand'>";
		html += "<tr height=10>";
		for (i = 15 ;  i >= 0; i--) {
			html += "<td width=10  onclick=\"MakeColor('"+obj_name+"','R', '"+i+"')\" bgcolor=#"+hex_color[i]+hex_color[i]+ hex_color[obj.color_g]+hex_color[obj.color_g]+hex_color[obj.color_b]+hex_color[obj.color_b]+"></td>";
		}
		html += "</tr>";
	
		html += "<tr height=10>";
		for (i = 15 ;  i >= 0; i--) {
			html += "<td onclick=\"MakeColor('"+obj_name+"','G', '"+i+"')\" bgcolor=#"+hex_color[obj.color_r]+hex_color[obj.color_r]+ hex_color[i]+hex_color[i]+hex_color[obj.color_b]+hex_color[obj.color_b]+"></td>";
		}
		html += "</tr>";
		html += "<tr height=10>";
		for (i = 15 ;  i >= 0; i--) {
			html += "<td onclick=\"MakeColor('"+obj_name+"','B', '"+i+"')\" bgcolor=#"+hex_color[obj.color_r]+hex_color[obj.color_r]+ hex_color[obj.color_g]+hex_color[obj.color_g]+hex_color[i]+hex_color[i]+"></td>";
		}
		html += "</tr>";
		html += "</table>";
		html += "</td><td width=70 style='cursor:hand;border: 2px #eaeaea solid;color:#FFFFFF' align=center bgcolor=#"+hex_color[obj.color_r]+hex_color[obj.color_r]+ hex_color[obj.color_g]+hex_color[obj.color_g]+hex_color[obj.color_b]+hex_color[obj.color_b]+" >#"+hex_color[obj.color_r]+hex_color[obj.color_r]+ hex_color[obj.color_g]+hex_color[obj.color_g]+hex_color[obj.color_b]+hex_color[obj.color_b]+"</td></tr></table>";
	
		document.all[obj.displaypos].innerHTML = html;
	}
	


// Àü¹®°¡ È¨°¡±â
function Go_ClubHome(anal_id) {
	if(anal_id != "") {
	         location.href= "/02s/s-cm-01.html?anal_id="+anal_id;
	         return;
		
	}
}

// ÀÌ¿ë½ÅÃ»ÇÏ±â
function Go_Payment(anal_id) {
	if(anal_id != "") {
	         location.href= "/01c/c-payment01.html?anal_id="+anal_id;
	         return;
		
	}
}



function Go_FindAnal(reurl, anal_id) {
	         location.href= reurl+"?find_anal_id="+anal_id;
	         return;
}


function flash_Object(flashMovie) {
		document.write(flashMovie);
			
}