	var wid;
	var hei; 
	var frame_min_width;
	var frame_min_height;
	var app_min_size = false;
	var frame_max_width;
	var frame_max_height;
	var app_max_size = false; 

	String.prototype.htmlEntityDecode = function() {
		var str = this;
		return str.replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"').replace(/&#039;/gi,"'").replace(/&amp;/gi,"&"); 
	}
	
	/**
	 * 지정박스의 X좌표(type에 맞는)
	 * @param box_width
	 * @param type
	 * @return
	 */
	function getBoxPosX(box_width, type) {
		var posX = 0;
		if( type == 'center') {
			posX =  getMouseClickPosX(box_width);
			posX = posX - box_width / 2;
			posX = posX > 0 ? posX : 0;
		}

		return posX;
	}

	/**
	 * 지정박스의 Y좌표(type에 맞는)
	 * @param box_height
	 * @param type
	 * @return
	 */
	function getBoxPosY(box_height, type) {
		var posY = 0;		
		if( type == 'center') {
			posY =  getMouseClickPosY(box_height);
			posY = posY - box_height / 2;
			posY = posY > 0 ? posY : 0;
		}

		return posY;
	}
	
	/**
	* 화면상에 마우스가 클릭된 X 좌표
	*/
	function getMouseClickPosX(box_width) {
		// 마우스가 눌린위치
		var mouse_x = window.event.clientX;

		// 상위항목과의 거리
		var screen_width = window.document.body.offsetWidth;

		// 현재 스크롤된 량 
		var scroll_left = document.documentElement.scrollLeft;

		var posX =  ( screen_width - mouse_x ) > box_width ? mouse_x + scroll_left : screen_width - box_width;

		return posX;
	}
	
	/**
	* 화면상에 마우스가 클릭된 Y 좌표
	*/
	function getMouseClickPosY(box_height) {
		// 마우스가 눌린위치
		var mouse_y = window.event.clientY;

		// 상위항목과의 거리
		var screen_height = window.document.body.offsetHeight;

		// 현재 스크롤된 량 
		var scroll_top    =  document.documentElement.scrollTop;

		var posY =  ( screen_height - mouse_y ) > box_height ? mouse_y + scroll_top + 5 : screen_height - box_height;

		return posY;
	}

	function sms_box()
	{
		sms_box_url = 'http://etamin.com/home/sms_box/index.html';
		hi_open_win(sms_box_url, 'sms_box', 700, 540, '');
	}


	function setColor( valuebox,colorbox) 
	{
		var selected_color; 
		var espect; 
		espect = "dialogWidth:425px;dialogHeight:335px;help:no;status:no"

		var my_obj = new Object(); 
		selected_color = window.showModalDialog( baseUrl + "/program/editor/cntr/color", my_obj, espect );
		if ( selected_color == null )
	    {
			return true;
	    } else { 
	    	colorbox.style.backgroundColor = selected_color;
	    	valuebox.value = selected_color;
		}
	}


	// 페이지에 <div id="logoutActionId" style="display:none;"></div> 구문이 있어야함.
	function logout_all(logoutActionId)   
	{   
		if(!confirm('정말 로그아웃을 하시려면 "확인"을 눌러주세요.')) return;
		var logout_iframe = document.createElement("iframe"); 
		logout_iframe.src = baseUrl + '/program/custom/cntr/logout'; 
		if( typeof(logoutActionId) == 'object' )
		{
			logoutActionId.appendChild(logout_iframe);
		}
		else
		{
			alert('element id가 존재하지 않습니다. \n 관리자에게 문의해 주세요.');
		}
	}
	
	/**
	* js 옵져버
	* 사용법 window.addOnLoadListener(함수);
	* ie는 해당안하므로 바꿀것.
	* version : 0.01
	*/
	window.onloadListeners = new Array();
	
	window.addOnLoadListener = function(listener) 
	{    
		window.onloadListeners[window.onloadListeners.length]=listener;
	}
	function init() 
	{       
		if (arguments.callee.done) 
		{
			return;
		}
		
		arguments.callee.done = true;
		for (var i=0; i<window.onloadListeners.length; i++) 
		{        
			var func = window.onloadListeners[i];        
			func();
		} 
	}
	
	/**
	 * 이벤트 리스너
	 * 사용법 jsAddEvent(이벤트, 함수명);
	 * 이벤트명에서 on 을 제외하고 입력 Ex: jsAddEvent('load', myStart);
	 */
	function jsAddEvent(evName, func) {
		try {
			return window.attachEvent('on' + evName, func);
		} catch (e) {
			return window.addEventListener(evName, func, false);
		}
	}
	

	/* 대상색 바꾸기 */
	function setElementColor(obj,obj_color ) {
		var selected_color;

		var espect;

		if ( document.documentElement )	
			espect = "dialogWidth:425px;dialogHeight:295px;help:no;status:no";
		else
			espect = "dialogWidth:425px;dialogHeight:295px;help:no;status:no"
 
		// modal 은 기본적으로 실시간 값 리턴이 안된다. 그래서 modalargument를
		// 사용한다 내부 객체를 만들어서 전달하고 윈도우에서 받는다.
		var myObject = new Object();

		myObject.title = obj;
 
		selected_color = window.showModalDialog( baseUrl + "/program/editor/cntr/color", myObject, espect );
		if ( selected_color == null )
			return true;
		else {
			obj.style.color = selected_color;
			obj_color.value = selected_color;
		}
	}
	
	/**
	* 다시열지 않기
	*/ 
	function getCookie( name )
	{
			var nameOfCookie = name + "=";
			var x = 0;
			while ( x <= document.cookie.length )
			{
					var y = (x+nameOfCookie.length);
					if ( document.cookie.substring( x, y ) == nameOfCookie ) {
							if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
									endOfCookie = document.cookie.length;
							return unescape( document.cookie.substring( y, endOfCookie ) );
					}
					x = document.cookie.indexOf( " ", x ) + 1;
					if ( x == 0 )
							break;
			}
			return "";
	}
	
	
	/**
	* 팝업
	*/ 
	function openPopupWindow(p_use,p_id,p_width,p_height,p_top,p_left,p_center)
	{
		if( p_use == 'ok' )
		{	
			if( getCookie( 'pop_cookie' + p_id ) != '1' )
			{
				var box_url = baseUrl + "/program/popup/cntr/view/id/" + p_id;

				if( p_center == 'ok' )
				{
					var w = hi_open_win(box_url, 'popupbox' + p_id, p_width, p_height, 'scrollbars=auto,resizable=yes');
				} else {
					var w = window.open(box_url, 'popupbox' + p_id,'width='+p_width+',height='+p_height+',toolbar=0,menubar=0,scrollbars=auto,resizable=yes,left='+p_left+',top='+p_top);
				}
				w.focus();
			}
		}
	}
	
	/**
	* 전체 기본 js
	*/ 
	function TextCopyClipBoard(url)
	{
		window.clipboardData.setData('Text',url);
	}
	
	function TextCopy(url) 
	{
		TextCopyClipBoard(url);
		window.alert('복사되었습니다. 본문내용의 원하는 위치에서  Cntr + V 를 누르면 됩니다.');
	}
	
	function ProfileViewer() 
	{
		var popupObj = hi_open_win(baseUrl + "/program/custom/cntr/profile/profile_id/" + custom_id, "profile_box", 500, 344, "resizable=no, scrollbars=yes"); 
		popupObj.focus();
	}
	
	function MessageSend(mode) 
	{
		if( mode == '1' )
		{
			var popupObj = hi_open_win(baseUrl + "/program/note/cntr/addNote/receiver_id/" + custom_id, "profile_box", 500, 494, "resizable=no, scrollbars=yes"); 
			popupObj.focus();
		}
		else
		{
			var popupObj = hi_open_win(baseUrl + "/program/note", "profile_box", 500, 344, "resizable=no, scrollbars=yes"); 
			popupObj.focus();
		}
	}
	
	
	function FullImageViewer(image_url) 
	{
	//  ImageLayer(img);
		ImagePopup(image_url);
	}
	
	function ImagePopup(image_url) 
	{
		var popupObj = hi_open_win(baseUrl + "/program/etc/cntr/imageView?imgurl=" + image_url, "image_box", 600, 500, "resizable=yes, scrollbars=yes"); 
		popupObj.focus();
	}


	function MultiTab2()
	{
	    this.btn_prefix_off = '';
	    this.btn_prefix = '';
	    this.id_prefix = '';
	    this.tmp_i = 0;
	    
		this.swap = function(n)
		{
	        for(var i = 1; i < 10; i++) 
	        {
	            obj = document.getElementById(this.id_prefix + i);
	            img = document.getElementById(this.btn_prefix + i);
	            imgoff = document.getElementById(this.btn_prefix_off + i);
	            if ( obj && imgoff ) 
	            { 
	                if ( n == i ) 
	                {
                        obj.style.display = "block"; // 바디보이기
                        imgoff.style.display = "none"; // 비활성감춤
                        img.style.display = "block"; // 활성보이기
                        this.tmp_i = i;  
	                }  
	                else
	                { 
                        obj.style.display = "none"; // 바디감추기
                        img.style.display = "none"; // 황성정보는 감춤
                        imgoff.style.display = "block"; // 비활성보이기 
	                }
	            }
	        }
		}
	}
	
	
	function MultiTab()
	{
	 
	    this.btn_prefix = '';
	    this.id_prefix = '';
	    this.tmp_i = 0;
		this.swap = function(n)
		{
	        for(var i = 1; i <= 10; i++) {
	            obj = document.getElementById(this.id_prefix + i);
	            img = document.getElementById(this.btn_prefix + i);
	            if ( obj ) {
	            
	            	if( this.tmp_i > 0)
	            	{
	                    if( img.className == 'tab_on' )
	                    {
	                        obj.style.display = "none";
	                        img.className = "tab_off"; 
	                    }
	                }
	            }
	        }
	        
	        
	        for(var i = 1; i < 10; i++) {
	            obj = document.getElementById(this.id_prefix + i);
	            img = document.getElementById(this.btn_prefix + i);
	            if ( obj ) { 
	                if ( n == i ) {
	                    if( img.className == 'tab_off' )
	                    {  
	                        obj.style.display = "block";
	                        img.className = "tab_on";  
	                        this.tmp_i = i;  
	                    }
	                }  
	            }
	        }
		}
	}



	
	function CheckBoxChoice() 
	{  
		this.getChoice = function(choice_obj) 
		{ 
			this.choiced_value = new Array;  
			this.choiced_count = 0; 
			var i = 0; 
	 
			if ( typeof(choice_obj) == 'undefined') 
			{ 
				return false; 
			}
	 
			if ( typeof(choice_obj.length) == 'undefined' ) 
			{
				if ( choice_obj.checked ) 
				{
					this.choiced_value[this.choiced_count++] = choice_obj.value;
				} 
			} 
			else 
			{ 
				for (i = 0; i < choice_obj.length; i++) 
				{ 
					if (choice_obj[i].checked) 
					{
						this.choiced_value[this.choiced_count++] = choice_obj[i].value;
					} 
				} 
			}
	 
			if (this.choiced_count == 0) 
			{ 
				return false; 
			} 
			else 
			{  
				return true; 
			} 
		} 
	}
	
    /**
     * 전체선택 및 해제. 
     *
     * @param object allObj 전체체크선택기
     * @param object itemObj 개별체크선택기
     */
	function AllChoice(allObj, itemObj)
	{
		var box_checked = allObj.checked;
	    
	    if (typeof(itemObj) == 'object')
	    {
	        if (typeof(itemObj.length) == 'undefined')
	        {
	            itemObj.checked = box_checked;
	        }
	        else
	        {
	            for (var i=0; i<itemObj.length; i++)
	                itemObj[i].checked = box_checked;
	        }
	    }	
	}
	
	
	
	/**
	* 콤보패널
	*/
	function ShowComboPannel(cid)
	{ 
		if (tmp_pannel_id != "")
		{
			// 펼쳐져있는게 있으면 감춤 
			eval("document.getElementById('" + tmp_pannel_id + "').style.visibility = 'hidden'");
		}	
	}  
	
	

	/* 마우스 다운 옵져버 */
	window.mousedownListeners = new Array();
	
	window.addMouseDownListener = function(listener) 
	{    
		window.mousedownListeners[window.mousedownListeners.length]=listener;
	}

	/* 가동 */
	function execMouseDown()
	{ 
		if( window.mousedownListeners.length < 1 ) return;
		
		for (var i=0; i<window.mousedownListeners.length; i++) 
		{        
			var func = window.mousedownListeners[i];        
			func();
		} 	
	}
	
	/* 마우스 다운 옵져버 end */
	var wake_function;
	function DownMouse(e) 
	{ 
		execMouseDown();
		
		if( typeof(wake_function) == 'function' )
		{
			wake_function();
			wake_function = null;
		}
		
	}
	
	
	/**
	* 하위호환용
	*/
	function popview(image_url)
	{
		ImagePopup(image_url);
	}

	
	
	function OverMouse(obj) 
	{    
		obj.className = 'click_over'; 
	}
	
	
	function OutMouse(obj) 
	{    
		obj.className = ''; 
	}
	
	document.onclick = DownMouse;
	  


	function encode_url(str)
	{ 
		return str.replace(/\?/gi, "%3F").replace(/&/gi,"%26");
	}
     

	/*### global 함수 ###*/
	function get_id(g) 
	{
		return document.getElementById(g)
	}
	function get_name(g) 
	{
		return document.getElementsByName(g);
	}
	function get_tag(g) 
	{
		return document.getElementsByTagName(g);
	}
	/*##### 숫자만 가능 전화번호용 #####*/ 
	String.prototype.only_num = function()
	{
			var str = this;
			if (  str.search(/^\d+$/) == -1  ) return false;
			else return true;
	}
	/*####################################*/

	
	// 키입력시 숫자만 눌리도록
	// 용법 : <input onkeypress="onlyNum();">
	function onlyNum()
	{
	 	if (((event.keyCode<48)||(event.keyCode>57)) && (event.keyCode != 45))
	 	{
	  		event.returnValue=false;
	 	}
	}



	/*### 이미지 올린것 자동 리사이즈 ###*/
	function resizeImage(num)  
	{ 
		/*### 기존것과 호환이 안되더라도 에러를 띄우면 안된다. ###*/
		try 
		{
			var o_img = eval("document.getElementById('added_user_img" + num + "')");
			if (o_img.width > 150)
			   o_img.width = 150;
		} catch (e) { }
	}
  
	function error_onload_image(num)
	{
		try {
			var img_id = "added_user_img" + num; 
			var onerror_img = eval("document.getElementById('" + img_id + "')"); 
			onerror_img.style.display='none';
		} catch (e) {
		}
	}


	/*### 로딩되야 보이게 하기 카테고리용 ###*/
	function onloadImage(num)
	{
	}
	
	function resize_onload_image(num)
	{
		contentWidth = getContentWidth();

		try {
			var img_id = "added_user_img" + num; 

			var o_img = eval("document.getElementById('" + img_id + "')");
			if (o_img.width > contentWidth) 
			{
				$(img_id).setStyle({width: contentWidth - 40});
			}
 
		} catch (e) {
		}
	}
 

	var contentWidth = 0;
	function getContentWidth() {
		if( $('contentTd') === null ) {
			// alert('contentTd가 정의되지 않았습니다.');
			return;
		}
		
		var _width = 0;
		if( contentWidth == 0 ) {
			_width = parseInt($('contentTd').getStyle('width'));
		} else {
			_width = contentWidth;
		}

		if( _width < 550 ) _width = 550;
		
		if( _width > 800 ) _width = 800;
		
		return _width;
	}


       
    
	function hL(E)  { 
			while (E.tagName!="TR") { E = E.parentElement; } 
			E.className = "H"; 
	} 

	function dL(E)  { 
			while (E.tagName!="TR") { E = E.parentElement; }  
			E.className = ""; 
	} 

  
	function isempty(c,m) {
		var check = c;
		var message = m;
		if( check.value == '' ) {
			check.style.background  = '#cccccc';
			alert(message);
			check.focus();
			return false;
		} else {
			c.style.background  = '';
			return true;
		}
	}
 

 

	function min_iframe_size(width, height) {
		frame_min_width = width;
		frame_min_height = height;
		app_min_size = true;
	}



	function max_iframe_size(width, height) {
		frame_max_width = width;
		frame_max_height = height
		app_max_size = true;
	}


	function parent_iframe_resize(name) {
		try {
/*
			min_iframe_size(580, 0); // 최소 clubhome
			max_iframe_size(599, 999999); // 최대 clubhome
*/
			if (parent && parent != this && parent.iframe_resize != null) {
				parent.iframe_resize(name);
			}
		} catch (e) {}
	}


	function iframe_resize(name) {
		if (name === null || name == "") {
			name = "clubhome";
		}

		try { 
			var oIframe = document.getElementById(name);
			if (document.all) { //ie
				var oBody   = document.frames(name).document.body;
				var _height = oBody.scrollHeight; 
			} else {
				var oBody = document.getElementById(name).contentDocument.body;
				var oDiv = oBody.appendChild(document.createElement("DIV"));
				// float both 제거
				oDiv.style.clear = "both";
				var _height = oDiv.offsetTop;
			}
			
			
			if( _height > 0 )  {
				var _height = _height + (25);
				oIframe.style.height = _height + "px";
			} else {
				// oIframe.style.height = _height + "px";
				oIframe.style.height = "0px";
			}	
			
			oDiv = oBody = _height =null
		} catch (e) {}
	}
	





 
	function hi_win_open(url, name, width, height) {
		var oWnd = hi_open_win(url, name, width, height, "toolbar=0,menubar=0,resizable=no,scrollbars=no");
		return oWnd;
	}



	function hi_open_win(url, name, width, height, feature) {
		var o_win;

		if (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion)>=4) { // browser version >= ie 4
			if(width < window.screen.width && height < window.screen.height) {
				var windowX = Math.ceil( (window.screen.width  - width) / 2 );
				var windowY = Math.ceil( (window.screen.height - height) / 2 );

				o_win = window.open(url, name, feature+",width=" + width +",height=" + height+",left="+windowX+",top="+windowY);
			} else {
				o_win = window.open(url, name, feature+",width=" + width +",height=" + height);
			}
		} else {
			o_win = window.open(url, name, feature+",width=" + width +",height=" + height);
		}
		return o_win;
	}




	function openPopup(url,name,width,height,flag,feature) {
		if (flag == 1)
			var o_pop = hi_open_win(url, name, width, height, "toolbar=0,menubar=0,scrollbars=no,resizable=yes" + feature);    
		else
			var o_pop = hi_open_win(url, name, width, height, "toolbar=0,menubar=0,scrollbars=no,resizable=no" + feature);
		
		return o_pop;
	}
 
	
	function loading_create() {
		this.loading_obj_list = new Array();
		this.add = loading_add;
		this.exec = loading_exec;
	}

	function loading_add(strExec) {
		this.loading_obj_list[this.loading_obj_list.length] = strExec; 
	}

	function loading_exec() {
		var loading_obj_list_len = this.loading_obj_list.length;
		
		for (var i = 0; i < loading_obj_list_len; i++)
		{
			eval(this.loading_obj_list[i]);
		}
	}
        

  

    function send_site_help() {
        var text = "\n";
        text += "기존에 운영중인 사이트로 본 커뮤니티에 참여하는 기능입니다.\n\n"
        text += "이 기능을 사용하시면 본 카페 방문시 입력한 사이트로 이동합니다.\n\n"
        text += "url과 rss 둘중에 하나를 입력하시면 됩니다."
        text += ""
        alert(text);
    }

	   

	function url_play(mid,url) {
		var attech_tag;
		if( (url.indexOf(".wmv") >= 0 || url.indexOf(".WMV") >= 0) || (url.indexOf(".avi") >= 0 || url.indexOf(".AVI") >= 0) || (url.indexOf(".asf") >= 0 || url.indexOf(".ASF") >= 0) || (url.indexOf(".mp3") >= 0 || url.indexOf(".MP3") >= 0) ) 
		{ 
			// movie  
			attech_tag = "<table border=0 cellspacing=0 cellpadding=0 align=center><tr><td><OBJECT classid=clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95 id=mbox"+mid+" name=mbox"+mid+" type=application/x-oleobject standby ='Loading Microsoft Media Player components...' style='display:visible;'>" +
							"<PARAM NAME='FileName' VALUE='"+url+"'>" +
							"<PARAM NAME='AutoSize' VALUE='1'>" +
							"<PARAM NAME='AutoResize' VALUE='1'>" +
							"<PARAM NAME='AnimationAtStart' value='0'>" +
							"<PARAM NAME='AutoStart' VALUE='1'>" +
							"<PARAM NAME='AutoRewind' value='1'>" +
							"<PARAM NAME='Balance' value='0'>" +
							"<PARAM NAME='DisplayMode' value='0'>" +
							"<PARAM NAME='DisplaySize' value='4'>" +
							"<PARAM NAME='ShowCaptioning' value='0'>" +
							"<PARAM NAME='ShowControls' value='1'>" +
							"<PARAM NAME='ShowAudioControls' value='1'>" +
							"<PARAM NAME='ShowDisplay' value='0'>" +
							"<PARAM NAME='ShowGotoBar' value='0'>" +
							"<PARAM NAME='ShowPositionControls' value='1'>" +
							"<PARAM NAME='ShowStatusBar' value='1'>" +
							"<PARAM NAME='ShowTracker' value='1'>" +
							"<PARAM NAME='TransparentAtStart' value='-1'>" +
							"<PARAM NAME='VideoBorderWidth' value='0'>" + 
							"</OBJECT></td></tr><tr><td align=right><img src=/img/skin/global/fullsize.gif onclick=full_screen('"+mid+"')></td></tr></table>";
		} else { // SWF 
            attech_tag+="<table border=0 cellspacing=0 cellpadding=0 align=center><tr><td><object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='400' height='400' align='middle'>" +
						"<param name='allowScriptAccess' value='always' />" +
						"<param name='movie' value='" + url + "' />" +
						"<param name='quality' value='high' />" +
						"<param name='bgcolor' value='#000000' />" +
						"<param name='wmode' value='transparent' />" +
						"<embed src='" + url + "' quality='high' wmode='transparent' width='400' height='400' id=mbox"+mid+" name=mbox"+mid+" align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />" +
						"</object></td></tr></table>"; 
		}
		document.getElementById('mplay'+mid).innerHTML = attech_tag;
		self.setTimeout("parent_iframe_resize('clubhome')",300);
	}	

	
	
	function MM_preloadImages() { //v3.0
	 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	 var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	 if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
	}

	function MM_findObj(n, d) { //v4.01
	 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	 d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	 if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	 for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	 if(!x && d.getElementById) x=d.getElementById(n); return x;
	}

	function MM_openBrWindow(theURL,winName,features) { //v2.0
	 window.open(theURL,winName,features);
	 
	}

	function MM_swapImgRestore() { //v3.0
	 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
	}

	function MM_swapImage() { //v3.0
	 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	 if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
	}
	
	
	
	

	function jsSetCookie( name, value, expiredays ) { 
		var todayDate = new Date(); 
		todayDate.setDate( todayDate.getDate() + expiredays ); 
		document.cookie = name + "=" + escape( value ) + "; path=/; expires=" +     todayDate.toGMTString() + ";" 
	} 


	/**
	* 브라우져경고
	* Usage : 
	* window.addOnLoadListener(jsNoticeSlider);
	*/
	var jsNoticeSlider = function () {

		var oSlideDivAmount = 10;
		var oSlideDivHeight;
		var oMove;
		var oSlideDiv;
		var oSlideDivPos;

		// div 높이
		var divHeight = 65;
		var divUpHeight = 75; // 밀어올릴 높이

		var _element_id = "jsNoticeId";
		_jsnotice_slider_closer = this; // public 처리

		var _clientWidth = document.body.clientWidth;
		var _clientHeight = document.body.clientHeight;
	 
		var Txt = "" +
		"<div id='" + _element_id + "' style='position:absolute;z-index:999;top:-100px;height:" + divHeight + "px;width:700px;padding:0px;display:none;background-color:white;border:5px gray solid;font-size:12px;overflow:hidden;'>" +
		"<table border='0' cellpadding='0' cellspacing='0' align='center'>" +
		"<tr>" +
		"<td>본 사이트는 인터넷 익스플로러 7 이상에서 최상으로 보입니다. 브라우져를 업그레이드 하시면 본 메세지는 나타나지 않습니다.<br/> <a href='http://www.microsoft.com/korea/windows/internet-explorer/' style='font-weight:bold;' target='_blank'>최신브라우져다운받기</a><br/>" +
		"<input type='checkbox' name='_jsnotice_slide_nodisplay' id='_jsnotice_slide_nodisplay'> 오늘은 다시 보지 않기" +
		"<a href='javascript:_jsnotice_slider_closer.divUp();'>닫기</a>" +
		"</form>" +
		"</td>" +
		"</tr>" +
		"</table>" +
		"</div>";


		this.divUp = function () {
			try
			{
				// 다시 열리지 않도록 쿠키심음
				if( document.getElementById("_jsnotice_slide_nodisplay").checked == true ) {
					jsSetCookie("js_notice_slider_display_ok", "no" , 1);
				}
				oMove = setInterval("divMoveStart('up')",50);
			}
			catch (e)
			{
			}
		}

	 
		this.divClose = function () {
			clearTimeout(oMove);
			oMove = setInterval("_jsnotice_slider_closer.divMoveStart('up')",50)
		}


		// 이동시작
		this.divMoveStart = function (type) {

			  oSlideDiv.style.top = oSlideDivPos + "px";

			  // 내리기
			  if ( type == "down") {

				  if (oSlideDivPos < 0){

					  // oSlideDivAmount 씩 증가
					  oSlideDivPos = Math.min(oSlideDivPos + oSlideDivAmount, 0)
					  oSlideDiv.style.top = oSlideDivPos + "px"

				  } else {

					  // 반복 종료
					  clearTimeout(oMove);
					  // 20초후 닫기
					  oMove = setInterval("_jsnotice_slider_closer.divClose()",20000)

				  }
			  } else {

				  if (oSlideDivPos < (oSlideDivHeight * - 1 )){

					  clearTimeout(oMove);

				  } else {

					  oSlideDivPos=Math.min(oSlideDivPos - oSlideDivAmount, 0)
					  oSlideDiv.style.top=oSlideDivPos+"px"

				  }

			  }
		}
		
		this.browserDetect = function () {
			if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ 
				 var ieversion=new Number(RegExp.$1)
				 return ieversion;
			}
			
			return '';
		}

		/* 다시보지 않기 체크 */
		this.checkCookie = function () {

			var isOldIE = false;
			
			// ie6 이하이면서 최상위창에만 출력
			if( _jsnotice_slider_closer.browserDetect() <= 6 && top == self ) {
				isOldIE = true;
			}
			
			if( isOldIE === true ) {
				var display_ok = getCookie('js_notice_slider_display_ok');
				/* 슬라이딩이 가능하면 처리 */
				try {
					if (display_ok != "no") {
						document.getElementById(_element_id).style.display = "block"; 
						
						_jsnotice_slider_closer.oReset(_element_id, divUpHeight,10);
						oMove = setInterval("_jsnotice_slider_closer.divMoveStart('down')",50);
					}
	
				/* 안되면 그냥 보여줌 */
				} catch (e) {
					try {
						if (display_ok != "no") {
							document.getElementById(_element_id).style.display = "block"; 
						}			
					} catch (e) {
					}
				}
			}
		}
		

		// id, 레이어height, 속도
		this.oReset = function (_oDiv_id, _oDiv_height, _oDiv_amount) {
			oSlideDivHeight = _oDiv_height;
			oSlideDivPos = parseInt(oSlideDivHeight) * (-1);
			oSlideDivAmount = _oDiv_amount;
			oSlideDiv = document.getElementById(_oDiv_id)
			oSlideDiv.style.top = oSlideDivPos+"px";
		}


		this.init = function () {
		 
			var oDiv = document.createElement('div');
			oDiv.innerHTML = Txt; 
			document.body.appendChild(oDiv);
	 
			var oBox = document.getElementById(_element_id);
			var width = oBox.style.width.replace("px","");
			var height = oBox.style.height.replace("px","");
	 
			var windowX = Math.ceil( _clientWidth / 2  - width / 2 );
			var windowY = Math.ceil( _clientHeight / 2 - height / 2 );
	 
			document.getElementById(_element_id).style.left = windowX + 'px'; 
			document.getElementById(_element_id).style.top = windowY + 'px';  

			// 슬라이딩 시작(php에서 브라우져 판별 )
			_jsnotice_slider_closer.checkCookie();
		}

		_jsnotice_slider_closer.init();
	}

	// window.addOnLoadListener(jsNoticeSlider);
	
	
	var addOption = function (select_element_id, option_name, option_value) { 

		if (!option_name || !option_value || !select_element_id) return false;

		var select_id = document.getElementById(select_element_id);

		if (document.createElement) {
			var new_option = document.createElement("option");
			new_option.value = option_value;
			new_option.innerHTML = option_name;

			if (select_id.appendChild) {
				select_id.appendChild(new_option); 
			}
		}
	}

	var removeOption = function (select_element_id, index) {

		if (!index || isNaN(index) || !select_element_id) return false;

		var select_id = document.getElementById(select_element_id);

		if (select_id.removeChild && select_id.options && select_id.options.length > index) {
			select_id.removeChild(select_id.options[index]);
		}
	}
	
	/**
	 * 제작사 공지사항 출력기
	 */
	var jasin_notice_list = new Object;
	function jasincms_notice(noticelist) {
		var noticebox, html, elements, body, firstEl, i, n;
		noticebox = document.createElement('div');
		noticebox.id = 'jasincms_notice_box';
		noticebox.style.position = 'relative';
		noticebox.style.height = '100%';
		noticebox.style.height = '25px';
		noticebox.style.backgroundColor = '#efefef';
		noticebox.style.color = '#0080ff';
		noticebox.style.fontFamily = '굴림';
		noticebox.style.textAlign = 'center';
		noticebox.style.fontSize = '9pt';
		noticebox.style.borderBottom = '1px #c0c0c0 solid';
		
		html = '<div style="position:absolute; left:0px; top:7px; height:19px;"><span style="color:#0080ff; font-size:8pt;">&nbsp;[JASIN 공지] 이 공지는 관리자에게만 보입니다 <span>&nbsp;';
		html += '<span style="cursor:pointer; color:red;" onclick="close_jasincms_notice()">[닫기]</span></div>';
		html += '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td id="jasin_notice_area" align="center" height=25>';
		html += '</td></tr></table></div>';
		
		noticebox.innerHTML = html;
		
		elements = document.getElementsByTagName('body');
		body = elements[0];
		
		firstEl = body.childNodes(0);
		
		document.body.insertBefore(noticebox, firstEl);
		
		jasin_notice_list.list = noticelist;
		jasin_notice_list.count = 0;
		rotate_jasin_notice();
		window.setInterval(rotate_jasin_notice, 3000);
	};
	
	function rotate_jasin_notice() {
		var html, box, n, url, title, regdate, listnum;
		
		box = document.getElementById('jasin_notice_area');
		n = jasin_notice_list.count;
		url = 'http://jasin.co.kr/request_name/' + jasin_notice_list.list[n].request_name;
		regdate = jasin_notice_list.list[n].regdate;
		regdate = regdate.substr(0,10);
		title = '[' + regdate + '] ' + jasin_notice_list.list[n].title;
		html = '<a href="' + url + '" target="_blank" style="font-size:9pt; color:black;">' + title + '</a>';
		
		box.innerHTML = html;
		
		listnum = jasin_notice_list.list.length;
		
		if ( n == (listnum - 1) ) {
			jasin_notice_list.count = 0;
		} else {
			jasin_notice_list.count = n + 1;
		}
		
	};
	
	function close_jasincms_notice() {
		document.getElementById('jasincms_notice_box').style.display = 'none';
	};
	
	// 처음과끝의 공백문자를 제거해서 돌려주는 함수
	function trim(val) {
		val = val.replace(/^\s+/, '');
		if (val != '') {
			val = val.replace(/\s+$/, '');
		}
		return val;
	}
	
	/**
	 * 날자 시간 선택기
	 * 사용법 : 
	 * 
	 * 1. 날자만 선택
	 * 		<input type="text" id="mydatetime" name="formname" value="value" onclick="jsDtPicker.showCalendar('mydatetime', 'date')" />
	 * 2. 날자와 시:분 까지 선택
	 * 		<input type="text" id="mydatetime" name="formname" value="value" onclick="jsDtPicker.showCalendar('mydatetime', 'datetime')" />
	 * 3. 날자와 시:분:초 까지 선택
	 * 		<input type="text" id="mydatetime" name="formname" value="value" onclick="jsDtPicker.showCalendar('mydatetime', 'full')" />
	 */
	function jsDtPick() {
		var me = this;
		me.tbox = '';
		me.selDate = Array();
		me.oldday = '';
		
		me.init = function(datebox, type) {
			me.type = type;
			me.tbox = $(datebox);
			var darray = new Array();
			
			darray = me.parsedate(me.tbox.value);
			
			me.dateobj = new Date();
			me.dateobj.setYear(darray[0]);
			me.dateobj.setMonth( (darray[1] - 1), darray[2] );
			
			me.dateobj.setHours(darray[3]);
			me.dateobj.setMinutes(darray[4]);
			me.dateobj.setSeconds(darray[5]);
			
			me.selDate[0] = darray[0];
			me.selDate[1] = darray[1];
			me.selDate[2] = darray[2];         
		
			me.tboxW = me.tbox.offsetWidth;
			me.tboxH = me.tbox.offsetHeight;
			
			me.getPosTbox();
		};
		
//			***************************************************	
		me.getPosTbox = function() {
			var po = me.tbox.positionedOffset();
			me.tboxPosX = po[0];
			me.tboxPosY = po[1];
			
		};
		
		me.setAttr = function(cell, align) {
			cell.style.fontFamily = 'verdana';
			cell.style.fontSize = '9pt';
			cell.style.color = '#777777';
			cell.style.padding = '0px';
			cell.style.cursor = 'default';
			
			switch (align) {
				case 'left':
					cell.align = 'left';
					break;
				case 'center':
					cell.align = 'center';
					break;
				case 'right':
					cell.align = 'right';
					break;
				case 'default':
			}
			
			return cell;
		};
		
		me.addEvent = function(element, evtype, handler) {
			if (element.attachEvent) {
				element.attachEvent("on" + evtype, handler);
			} else if (element.addEventListener) {
				element.addEventListener(evtype, handler, true);
			} else {
				element["on" + evtype] = handler;
			}
		};
		
		me.createCalendar = function() {
			var caldiv, clabox, titleRow, dateRow, timeRow, footRow, timeHtml;
			
			caldiv = document.createElement("div");
			caldiv.id = 'jsDateDiv';
			caldiv.style.position = 'absolute';
			caldiv.style.display = 'none';
			caldiv.style.backgroundColor = 'white';
			
			document.body.appendChild(caldiv);
			
			calbox = document.createElement("table");
			caldiv.appendChild(calbox);
			calbox.width = 160;
			calbox.cellSpacing = 0;
			calbox.style.border = '1px #cccccc solid';
			
			titleRow = calbox.insertRow(0);
			titleRow.style.height = '17px';
			titleRow.bgColor = '#eeeeee';
			
			for  (i=0; i<5; i++) {
				cell = titleRow.insertCell(i);
				cell = me.setAttr(cell, 'center');
				
				switch (i) {
					case 0:
						cell.width = 10;
						cell.innerHTML = '&#171;';
						cell.style.fontWeight = 'bold';
						cell.vAlign = 'top';
						me.addEvent(cell, "click", me.prevyear);
						me.addEvent(cell, "mouseover", me.calCtlOver);
						me.addEvent(cell, "mouseout", me.calCtlOut);
						break;
					case 1:
						cell.width = 10;
						cell.innerHTML = '&#x2039;';
						cell.style.fontWeight = 'bold';
						cell.vAlign = 'top';
						me.addEvent(cell, "click", me.prevmonth);
						me.addEvent(cell, "mouseover", me.calCtlOver);
						me.addEvent(cell, "mouseout", me.calCtlOut);
						break;
					case 2:
						cell.width = 120;
						cell.style.fontSize = '9pt';
						cell.style.fontWeight = 'bold';
						cell.vAlign = 'bottom';
						break;
					case 3:
						cell.width = 10;
						cell.innerHTML = '&#x203a;';
						cell.style.fontWeight = 'bold';
						cell.vAlign = 'top';
						me.addEvent(cell, "click", me.nextmonth);
						me.addEvent(cell, "mouseover", me.calCtlOver);
						me.addEvent(cell, "mouseout", me.calCtlOut);
						break;
					case 4:
						cell.width = 10;
						cell.innerHTML = '&#187;';
						cell.style.fontWeight = 'bold';
						cell.vAlign = 'top';
						me.addEvent(cell, "click", me.nextyear);
						me.addEvent(cell, "mouseover", me.calCtlOver);
						me.addEvent(cell, "mouseout", me.calCtlOut);
						break;
				}
			}
			
			dateRow = calbox.insertRow(1);
			cell = dateRow.insertCell(0, 'center');
			cell.colSpan = 5;
			cell = me.setAttr(cell);
			
			timeRow = calbox.insertRow(2);
			cell = timeRow.insertCell(0, 'center');
			cell.colSpan = 5;
			cell.height = '22px';
			cell = me.setAttr(cell, 'center');
			cell.style.borderWidth = '0px';
			cell.style.borderTopWidth = '1px';
			cell.style.borderBottomWidth = '1px';
			cell.style.borderColor = '#d7d7d7';
			cell.style.borderStyle = 'solid';
			timeHtml =  '<input type="text" style="border:1px #d7d7d7 solid; padding:0px; width:20px; background-color:#efefef; text-align:right;" id="jsdt_hour" onkeydown="jsDtPicker.timeHdl(\'hour\', event)" title="키보드 방향키로 변경하세요" />:';
			timeHtml += '<input type="text" style="border:1px #d7d7d7 solid; padding:0px; width:20px; background-color:#efefef; text-align:right;" id="jsdt_min" onkeydown="jsDtPicker.timeHdl(\'min\', event)" title="키보드 방향키로 변경하세요" />:';
			timeHtml += '<input type="text" style="border:1px #d7d7d7 solid; padding:0px; width:20px; background-color:#efefef; text-align:right;" id="jsdt_sec" onkeydown="jsDtPicker.timeHdl(\'sec\', event)" title="키보드 방향키로 변경하세요" />';
			timeHtml += '&nbsp;&nbsp;&nbsp;<span style="padding:0px; border:1px #d7d7d7 solid; background-color:#797979; color:white;" onclick="jsDtPicker.applydate()">선택</span>';
			cell.innerHTML = timeHtml;
			
			footRow = calbox.insertRow(3);
			footRow.height = '15px';
			
			cell = footRow.insertCell(0);
			cell.colSpan = 5;
			cell = me.setAttr(cell, 'right');
			cell.innerHTML = '<span style="cursor:pointer;" onclick="jsDtPicker.removeCal()">Close&nbsp;</span>';
			
			calbody = document.createElement("table");
			calbox.childNodes[0].childNodes[1].childNodes[0].appendChild(calbody);
			calbody.border = 0;
			calbody.width = 156;
			calbody.cellSapcing = 0;
			calbody.align = 'center';
			
			for (i=0; i<6; i++) {
				trow = calbody.insertRow(i);
				for (j=0; j<7; j++)
				{
					tcell = trow.insertCell(j);
					tcell = me.setAttr(tcell, 'right');
				}
			}
			me.caldiv = caldiv;
			me.calbox = calbox;
			me.calbody = calbody;
		};

		me.showCalendar = function(datebox, type) {
			
			me.init(datebox, type);
			
			if (me.caldiv.style.display != 'block')
			{
				me.caldiv.style.display = 'block';
			} else {
				me.removeCal();
				return;
			}
			
			me.caldiv.style.left = me.tboxPosX + 'px';
			me.caldiv.style.top = me.tboxPosY + me.tboxH + 'px';
			
			me.setCalendar();

		};

		me.setCalendar = function() {
			var row, col, cell, cellid, rowid, daysOfMonth, cDay;
			var days = Array(31,28,31,30,31,30,31,31,30,31,30,31);
			var y, m, d, y1, m1, d1;
			var dobj = new Date();

			y = me.dateobj.getFullYear() + 0;
			m = me.dateobj.getMonth() + 1;
			d = me.dateobj.getDate() + 0;
			
			if ( me.isleapyear(y) == true ) {
				days[1] = 29;
			}

			me.calbox.childNodes[0].childNodes[0].childNodes[2].innerHTML = '<strong">' + y + '년 ' + m + '월</strong>';
			
			
			
			//달력의 내용을 모두 지움..
			for (row=0; row<6 ; row++ ) {
				for (col=0; col<7 ; col++ ) {
					me.calbody.childNodes[0].childNodes[row].childNodes[col].style.backgroundColor = 'white';
					me.calbody.childNodes[0].childNodes[row].childNodes[col].innerHTML = '';
				}
			}

			cDay = me.dateobj.getDate();
			daysOfMonth = days[me.dateobj.getMonth()];

			dobj.setYear(y);
			dobj.setMonth(m-1, d);
			
			for (i=1; i<=daysOfMonth; i++ ) {
				dobj.setDate(i);
				row = me.getWeekOfMonth(dobj);
				col = dobj.getDay();
				
				y1 = dobj.getFullYear();
				m1 = dobj.getMonth() + 1;
				d1 = dobj.getDate();
				
				if (m1 < 10) {
					m1 = '0' + m1;
				}
				if (d1 < 10) {
					d1 = '0' + d1;
				}
				
				date = y1 + ',' + m1 + ',' + d1;
				me.calbody.childNodes[0].childNodes[row].childNodes[col].innerHTML = '<span style="cursor:pointer;" onclick="jsDtPicker.selectDate(' + date + ',event)" >' + i + '</span>';
				if (i == cDay)
				{
					me.calbody.childNodes[0].childNodes[row].childNodes[col].style.backgroundColor = "#cccccc";
					me.oldday = me.calbody.childNodes[0].childNodes[row].childNodes[col];
				}
			}
			
			try {
				rowid = 'calrow' + (row + 1);
				document.getElementById(rowid).style.display = 'none';
				rowid = 'calrow' + (row + 2);
				document.getElementById(rowid).style.display = 'none';
			} catch (e) {}
			
			$('jsdt_hour').value = me.dateobj.getHours();
			$('jsdt_min').value = me.dateobj.getMinutes();
			$('jsdt_sec').value = me.dateobj.getSeconds();

		};
		
		me.timeHdl = function(t, e) {
			if (!e) {
				e = window.event;
			}
			
			/* keyCode
			 * 37 : ←
			 * 38 : ↑
			 * 39 : →
			 * 40 : ↓
			 */
			
			var val = parseInt($('jsdt_' + t).value);
			
			if (e.keyCode == 37 || e.keyCode == 40) {
				// 좌측/아래쪽 방향키 값 감소
				switch (t) {
					case 'hour':
						val = ( val < 2 ) ? 23 : (val - 1);
						break;
					default:
						val = ( val < 2 ) ? 59 : (val - 1);
				}
			} else if (e.keyCode == 38 || e.keyCode == 39) {
				// 우측/위쪽 방향키 값 증가
				switch (t) {
					case 'hour':
						val = ( val > 23 ) ? 0 : (val + 1);
						break;
					default:
						val = ( val > 58 ) ? 0 : (val + 1);
				}
			} else {
				return;
			}
			
			$('jsdt_' + t).value = val;
			
		}
		
		me.selectDate = function(y, m, d, e) {
			me.selDate[0] = y;
			me.selDate[1] = m;
			me.selDate[2] = d;
			
			if (!e) e = window.event;
			var o = e.srcElement || e.target;
			me.oldday.style.backgroundColor = 'white';
			o.parentNode.style.backgroundColor = '#cccccc';
			me.oldday = o.parentNode;
			if (me.type == 'date') me.applydate();
		};

		me.getWeekOfMonth = function(dobj) {
			var weekOfFirstDay, weekOfMonth, firstSunday, cDay, dayAmount;
			var firstday = new Date();
			var y1,m1,d1;

			y1 = dobj.getFullYear();
			m1 = dobj.getMonth();
			d1 = dobj.getDate();
			firstday.setYear(y1);
			firstday.setMonth(m1, 1);
			
			weekOfFirstDay = firstday.getDay();
			
			if (weekOfFirstDay == 0) {
				firstSunday = 1;
			} else {
				firstSunday = 7 - (weekOfFirstDay - 1);
			}

			cDay = dobj.getDate();

			if (cDay < firstSunday) {
				return 0;
			}

			dayAmount = cDay - firstSunday;

			if (dayAmount < 0) {
				return 0;
			}

			if (firstSunday == 1) {
				weekOfMonth = 0;
			} else {
				weekOfMonth = 1;
			}
			weekOfMonth += Math.floor(dayAmount / 7);
					
			return weekOfMonth;
		};

		me.isleapyear = function(year) {
			if ( ( (year % 4 == 0) && (year % 100 != 0) ) || (year % 400 == 0) ) {
				return true;
			} else {
				return false;
			}
		};
		
		me.parsedate = function(datestr) {
			var dobj = new Date();
			var y,m,d;
			var patt_dt, patt_d, res;
			var darray = new Array();

			patt_dt = new RegExp(/([0-9]{4})-([0-9]?[0-9])-([0-9]?[0-9]) ([0-9]?[0-9]):([0-9]?[0-9]):?([0-9]?[0-9])?/);
			patt_d = new RegExp(/([0-9]{4})-([0-9]?[0-9])-([0-9]?[0-9])/);
			
			if (patt_dt.exec(datestr) == null && patt_d.exec(datestr) == null) datestr = '';
			
			if (datestr == '') {
				y = dobj.getFullYear();
				m = dobj.getMonth();
				d = dobj.getDate();
				darray[0] = y + 0;
				darray[1] = m + 1;
				darray[2] = d + 0;
				darray[3] = dobj.getHours();
				darray[4] = dobj.getMinutes();
				darray[5] = dobj.getSeconds();
			} else {
				
				res = patt_dt.exec(datestr);
				if (res == null) {
					res = patt_d.exec(datestr);
				}
				darray[0] = parseInt(res[1]);
				darray[1] = parseInt(res[2]);
				darray[2] = parseInt(res[3]);
				if (res.length > 4) {
					darray[3] = parseInt(res[4]);
					darray[4] = parseInt(res[5]);
					if (res[6] == null || isNaN(res[6]) ) {
						darray[5] = 0;
					} else {
						darray[5] = res[6];
					}
				} else {
					darray[3] = dobj.getHours();
					darray[4] = dobj.getMinutes();
					darray[5] = dobj.getSeconds();
				}
				
			}
			
			return darray;
		};

		me.applydate = function() {
			var datestr;
			
			datestr = me.selDate[0] + '-' + me.selDate[1] + '-' + me.selDate[2];
			
			if (me.type == 'datetime') {
				datestr += ' ' + $('jsdt_hour').value + ':' + $('jsdt_min').value; 
			} else if (me.type == 'full') {
				datestr += ' ' + $('jsdt_hour').value + ':' + $('jsdt_min').value + ':' + $('jsdt_sec').value;
			}
			me.tbox.value = datestr;
			me.removeCal();
		};
		
		me.removeCal = function() {
			me.caldiv.style.display = 'none';
		};

		me.calCtlOver = function(e) {
			if (!e) {
				e = window.event;
			}
			try {
				var o = e.srcElement || e.target;
				o.style.backgroundColor = 'white';
			} catch (a) {}
		};
		me.calCtlOut = function(e) {
			if (!e) {
				e = window.event;
			}
			try {
				var o = e.srcElement || e.target;
				o.style.backgroundColor = '#eeeeee';
			} catch (a) {}
		};
		
		me.prevyear = function() {
			y = me.dateobj.getFullYear();
			y--;
			me.dateobj.setYear(y);
			me.setCalendar();
		};

		me.prevmonth = function() {
			var y = me.dateobj.getFullYear();
			var m = me.dateobj.getMonth();
			var d = me.dateobj.getDate();

			if (m == 0) {
				y--;
				m = 11;
			} else {
				m--;
			}
			if (m == 1) {
				if (me.isleapyear(y) != true && d == 29) {
					d = 28;
				}
			}
			me.dateobj.setYear(y);
			me.dateobj.setMonth(m,d);

			me.setCalendar();
		};

		me.nextmonth = function() {
			var y = me.dateobj.getFullYear();
			var m = me.dateobj.getMonth();
			var d = me.dateobj.getDate();

			if (m == 11) {
				y++;
				m = 0;
			} else {
				m++;
			}
			if (m == 1) {
				if (me.isleapyear(y) != true && d == 29)
				{
					d = 28;
				}
			}
			me.dateobj.setYear(y);
			me.dateobj.setMonth(m,d);

			me.setCalendar();
		};

		me.nextyear = function() {
			var y = me.dateobj.getFullYear();
			y++;
			me.dateobj.setYear(y);
			me.setCalendar();
		};

	}
	var jsDtPicker = new jsDtPick();
	jsAddEvent("load", jsDtPicker.createCalendar);
	
	/**
	 * 색상 선택기
	 * 실행방법
	 * jsColorPicker(position, arg, func);
	 * position : {'x':xPos|null|false, 'y':yPos|null|false, 'center':ture|false};
	 * arg : {'styleName':'styleName', 'id':'targetId', 'dest':'destCode', 'color':'colorCode'};
	 * 		styleName 	: color, backgroundColor 스타일명
	 * 		id 			: 실시간으로 컬러를 적용할 개체의 ID
	 * 		dest		: 에디터용 (어느항목의 컬러를 변경할것인지 지정 (forecolor, backcolor 등)
	 * 		color		: 컬러교환 (원래의 컬러값을 받아오고 적용수행시 이 변수에 값을 넣어서 전달)
	 * func : 완료시 수행할 함수의 포인터
	 */
	function colorPicker() {
		var me = this;
		me.imgdir;
		me.box;
		me.arg;
		me.func;
		
		me.init = function() {
			
			// 개체 생성
			var box, div_container, div_ctable, div_info, div_grad, div_btn;
			var r, c, grad_img, htmlstr;
			var div_color, div_code, div_prev, imgOk, imgClose;
			
			var colortable = {
					0:['#ffffff','#fafafa','#efefef','#d7d7d7','#cccccc','#c0c0c0','#aaaaaa'],
					1:['#999999','#888888','#777777','#666666','#444444','#333333','#000000'],
					2:['#ffcccc','#ff6666','#ff0000','#cc0000','#990000','#660000','#330000'],
					3:['#ffcc99','#ff9966','#ff9900','#ff6600','#cc6600','#993300','#663300'],
					4:['#ffff99','#ffff66','#ffcc66','#ffcc33','#cc9933','#996633','#663333'],
					5:['#ffffcc','#ffff33','#ffff00','#ffcc00','#999900','#666600','#333300'],
					6:['#99ff99','#66ff99','#33ff33','#33cc00','#009900','#006600','#003300'],
					7:['#99ffff','#33ffff','#66cccc','#00cccc','#339999','#336666','#003333'],
					8:['#ccffff','#66ffff','#33ccff','#3366ff','#3333ff','#000099','#000066'],
					9:['#ccccff','#9999ff','#6666cc','#6633ff','#6600cc','#333399','#330099'],
					10:['#ffccff','#ff99ff','#cc66cc','#cc33cc','#993399','#663366','#330033']
				 };
			
			me.imgdir = baseUrl + '/htmls/site1/programs/common/skins/basic/images/colorpicker';
			
			box = document.createElement('div');
			box.style.position = 'absolute';
			box.id = 'jscp_box';
			box.style.padding = '3px';
			box.style.width = '385px';
			box.style.height = '213px';
			box.style.background = "url('" + me.imgdir + "/bg.jpg')";
			
			div_container = document.createElement('div');
			div_container.style.cursor = 'default';
			div_container.position = 'relative';
			div_container.style.marginTop = '19px';
			div_container.style.width = '382px';
			div_container.style.height = '194px';
			
			div_ctable = document.createElement('div');
			div_ctable.style.position = 'absolute';
			div_ctable.style.left = '13px';
			div_ctable.style.top = '28px';
			div_ctable.style.width = '165px';
			div_ctable.style.border = '1px #cccccc solid';
			div_ctable.style.padding = '8px';
			div_ctable.style.textAlign = 'center';
			
			htmlstr = '';
			for (r=0; r<7; r++) {
				for (c=0; c<11; c++) {
					htmlstr += '<div onclick="jsColorPicker.swatchColor(this)" style="position:relative; float:left; width:12px; height:13px; margin:1px; background-color:' + colortable[c][r] + '; cursor:pointer; border-right:1px black solid; border-bottom:1px black solid;"></div>';
				}
			}
			div_ctable.innerHTML = htmlstr;
			div_ctable.style.display = 'inline';
			
			div_grad = document.createElement('div');
			div_grad.style.position = 'absolute';
			div_grad.style.left = '200px';
			div_grad.style.top = '28px';
			div_grad.innerHTML = '<img width=170 height=153 src="' + me.imgdir + '/color.jpg" onclick="jsColorPicker.gradClick(event)" onmousemove="jsColorPicker.gradMove(event)" style="cursor:crosshair; border:1px #cccccc solid;" />';
			
			div_color = document.createElement('div');
			div_color.id = 'jscp_preview_color';
			div_color.style.position = 'absolute';
			div_color.style.top = '164px';
			div_color.style.left = '15px';
			div_color.style.width = '94px';
			div_color.style.height = '16px';
			div_color.style.border = '1px #d7d7d7 solid';
			div_color.style.cursor = 'default';
			div_color.style.backgroundColor = 'white';
			
			div_code = document.createElement('div');
			div_code.id = 'jscp_preview_code';
			div_code.style.position = 'absolute';
			div_code.style.top = '164px';
			div_code.style.left = '114px';
			div_code.style.width = '60px';
			div_code.style.height = '16px';
			div_code.style.border = '1px #d7d7d7 solid';
			div_code.style.backgroundColor = 'white';
			div_code.style.fontFamily = 'Courier New';
			div_code.style.fontSize = '9pt';
			div_code.innerHTML = '#FFFFFF';
			
			div_prev = document.createElement('div');
			div_prev.id = 'jscp_preview_grad';
			div_prev.style.position = 'absolute';
			div_prev.style.top = '164px';
			div_prev.style.left = '176px';
			div_prev.style.width = '16px';
			div_prev.style.height = '16px';
			div_prev.style.border = '1px #d7d7d7 solid';
			div_prev.style.cursor = 'default';
			div_prev.style.backgroundColor = 'white';
			
			div_btn = document.createElement('div');
			div_btn.style.position = 'absolute';
			div_btn.style.textAlign = 'center';
			div_btn.style.left = '10px';
			div_btn.style.top = '186px';
			div_btn.style.width = '100%';
			div_btn.style.height = '22px';
			
			imgOk = '<img src="' + me.imgdir + '/btn_apply.png" onclick="jsColorPicker.applyColor()" />';
			imgClose = '<img src="' + me.imgdir + '/btn_close.png" onclick="jsColorPicker.cancel()" style="margin-left:50px;" />';
			
			div_btn.innerHTML = imgOk + imgClose;
			
			div_container.appendChild(div_ctable);
			div_container.appendChild(div_grad);
			div_container.appendChild(div_color);
			div_container.appendChild(div_code);
			div_container.appendChild(div_prev);
			div_container.appendChild(div_btn);
			
			box.appendChild(div_container);
			document.body.appendChild(box);
			
			me.box = box;
			me.box.style.display = 'none';
			
		};
		
		me.show = function(position, arg, func) {
			var x, y;
			me.arg = arg;
			me.func = func;
			
			me.box = $('jscp_box');
			me.box.style.display = 'block';
			if (position.center == true) {
				var pos = me.getCenter();
				x = pos[0];
				y = pos[1];
			} else {
				x = position.x;
				y = position.y;
			}
			me.box.style.left = x + 'px';
			me.box.style.top = y + 'px';
			
			if (arg.color) {
				var color = me.toHex(arg.color);
				$('jscp_preview_color').style.backgroundColor = color;
				$('jscp_preview_code').innerHTML = color;
			}
			
		};
		
		me.getCenter = function() {
			var w, h, pw, ph, x, y, retval;
			
			w = me.box.offsetWidth;
			h = me.box.offsetHeight;
			
			x = Math.floor(document.documentElement.scrollLeft + (document.documentElement.clientWidth - w) / 2);
			y = Math.floor(document.documentElement.scrollTop + (document.documentElement.clientHeight - h) / 2);
			
			retval = new Array(x,y);
			return retval;
		};
		
		me.swatchColor = function(o) {
			var pvcolor, pvcode, color;
			
			pvcolor = $('jscp_preview_color');
			pvcode = $('jscp_preview_code');
			
			color = o.style.backgroundColor;
			
			pvcolor.style.backgroundColor = color;
			pvcode.innerHTML = me.toHex(color);
			
			if (me.arg.id) {
				var styleName = me.arg.styleName;
				$(me.arg.id).style[me.arg.styleName] = me.toHex(color);
			}
		};
		
		me.gradClick = function(event) {
			if (!event) event = window.event;
			var color = me.getPxColor(event);
			$('jscp_preview_color').style.backgroundColor = color;
			$('jscp_preview_code').innerHTML = color;
			
			if (me.arg.id) {
				var styleName = me.arg.styleName;
				$(me.arg.id).style[me.arg.styleName] = color;
			}
			
		};
		
		me.gradMove = function(event) {
			if (!event) event = window.event;
			var color = me.getPxColor(event);
			$('jscp_preview_grad').style.backgroundColor = color;
		};
		
		me.getPxColor = function(event) {
			var hsv = new Object();
			var h, y, x, el;
			
			if (event.srcElement) {
				el = event.srcElement;
				h = el.offsetHeight;
				y = event.offsetY;
				x = event.offsetX;
			} else {
				el = event.target;
				h = el.offsetHeight;
				y = event.layerY;
				x = event.layerX;
			}
			
			hsv.h = 360 * x / el.offsetWidth;
			
			if ( y > h/2 ) {
				hsv.s = 1.0;
				hsv.v = 2 * (h - y) / h;
			} else {
				hsv.v = 1.0;
				hsv.s = y / (h / 2);
			}
			
			var rgb = me.hsvToRgb(hsv);
			
			var r, g, b;
			r = Math.round(rgb.r * 255);
			g = Math.round(rgb.g * 255);
			b = Math.round(rgb.b * 255);
			
			r = (!isNaN(r))? r : 0;
			g = (!isNaN(g))? g : 0;
			b = (!isNaN(b))? b : 0;
			
			var rgbcode = 'rgb(' + r + ', ' + g + ', ' + b + ')';
			return me.toHex(rgbcode);
			
		};
		
		me.hsvToRgb = function(hsv) {
			var rgb = new Object();
			var i, f, p, q, t;
			
			if ( hsv.s == 0 ) {
				// achromatic (grey)
				rgb.r = rgb.g = rgb.b = hsv.v;
				return rgb;
			}
		
			hsv.h /= 60;	// sector 0 to 5
			i = Math.floor( hsv.h );
			f = hsv.h - i;	// factorial part of h
			p = hsv.v * ( 1 - hsv.s );
			q = hsv.v * ( 1 - hsv.s * f );
			t = hsv.v * ( 1 - hsv.s * ( 1 - f ) );
		
			switch( i ) {
			case 0:
				rgb.r = hsv.v; rgb.g = t; rgb.b = p; break;
			case 1:
				rgb.r = q; rgb.g = hsv.v; rgb.b = p; break;
			case 2:
				rgb.r = p; rgb.g = hsv.v; rgb.b = t; break;
			case 3:
				rgb.r = p; rgb.g = q; rgb.b = hsv.v; break;
			case 4:
				rgb.r = t; 	rgb.g = p; rgb.b = hsv.v; break;
			default:	// case 5:
				rgb.r = hsv.v; rgb.g = p; rgb.b = q; break;
			}
				
			return rgb;
		};
		
		me.applyColor = function(event) {
			me.box.style.display = 'none';
			var color = $('jscp_preview_code').innerHTML;
			
			if (me.func != null) {
				me.arg.color = color;
				me.func();
			}
			return;
		};
		
		me.cancel = function() {
			if (me.arg.id) {
				var styleName = me.arg.styleName;
				$(me.arg.id).style[me.arg.styleName] = me.arg.color;
			}
			me.box.style.display = 'none';
		};
		
		me.toHex = function(code) {
			if (code.substr(0,1) == '#') return code.toUpperCase();
			var patt, buff, r, g, b;
			
			patt = RegExp(/rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)/);
			
			buff = patt.exec(code);
			r = parseInt(buff[1]).toString(16);
			g = parseInt(buff[2]).toString(16);
			b = parseInt(buff[3]).toString(16);
			
			if (r.length < 2) r = '0' + r;
			if (g.length < 2) g = '0' + g;
			if (b.length < 2) b = '0' + b;
			
			var ret = '#' + r.toUpperCase() + g.toUpperCase() + b.toUpperCase();
			return ret;
		};
		
	};
	var jsColorPicker = new colorPicker();
	jsAddEvent("load", jsColorPicker.init );
	
	/**
	 * 문자 선택기
	 * 실행방법
	 * jsCharTable(position, arg, func);
	 * position : {'x':xPos|null|false, 'y':yPos|null|false, 'center':ture|false};
	 * arg : {'chars':''};
	 * 		chars : 선택한 문자열을 전달할 개체
	 * func : 완료시 수행할 함수의 포인터
	 */
	
	function chartable() {
		var me = this;
		me.arg;
		me.box;
		me.imgdir;
		me.browser;
		me.arg;
		me.func;
		
		me.init = function() {
			var chars = {
					0 : ['｛','｝','〔','〕','〈','〉','《','》','「','」','『','』','【','】','‘','’','“','”','、','。','·','‥','…','§','※','☆','★','○','●','◎','◇','◆','□','■','△','▲','▽','▼','◁','◀','▷','▶','♤','♠','♡','♥','♧','♣','⊙','◈','▣','◐','◑','▒','▤','▥','▨','▧','▦','▩','±','×','÷','≠','≤','≥','∞','∴','°','′','″','∠','⊥','⌒','∂','≡','≒','≪','≫','√','∽','∝','∵','∫','∬','∈','∋','⊆','⊇','⊂','⊃','∪','∩','∧','∨','￢','⇒','⇔','∀','∃','´','～','ˇ','˘','˝','˚','˙','¸','˛','¡','¿','ː','∮','∑','∏','♭','♩','♪','♬','㉿','→','←','↑','↓','↔','↕','↗','↙','↖','↘','㈜','№','㏇','™','㏂','㏘','℡','♨','☏','☎','☜','☞','¶','†','‡','®','ª','º','♂','♀'],
					1 : ['½','⅓','⅔','¼','¾','⅛','⅜','⅝','⅞','¹','²','³','⁴','ⁿ','₁','₂','₃','₄','Ⅰ','Ⅱ','Ⅲ','Ⅳ','Ⅴ','Ⅵ','Ⅶ','Ⅷ','Ⅸ','Ⅹ','ⅰ','ⅱ','ⅲ','ⅳ','ⅴ','ⅵ','ⅶ','ⅷ','ⅸ','ⅹ','￦','$','￥','￡','€','℃','Å','℉','￠','¤','‰','㎕','㎖','㎗','ℓ','㎘','㏄','㎣','㎤','㎥','㎦','㎙','㎚','㎛','㎜','㎝','㎞','㎟','㎠','㎡','㎢','㏊','㎍','㎎','㎏','㏏','㎈','㎉','㏈','㎧','㎨','㎰','㎱','㎲','㎳','㎴','㎵','㎶','㎷','㎸','㎹','㎀','㎁','㎂','㎃','㎄','㎺','㎻','㎼','㎽','㎾','㎿','㎐','㎑','㎒','㎓','㎔','Ω','㏀','㏁','㎊','㎋','㎌','㏖','㏅','㎭','㎮','㎯','㏛','㎩','㎪','㎫','㎬','㏝','㏐','㏓','㏃','㏉','㏜','㏆'],
					2 : ['㉠','㉡','㉢','㉣','㉤','㉥','㉦','㉧','㉨','㉩','㉪','㉫','㉬','㉭','㉮','㉯','㉰','㉱','㉲','㉳','㉴','㉵','㉶','㉷','㉸','㉹','㉺','㉻','ⓐ','ⓑ','ⓒ','ⓓ','ⓔ','ⓕ','ⓖ','ⓗ','ⓘ','ⓙ','ⓚ','ⓛ','ⓜ','ⓝ','ⓞ','ⓟ','ⓠ','ⓡ','ⓢ','ⓣ','ⓤ','ⓥ','ⓦ','ⓧ','ⓨ','ⓩ','①','②','③','④','⑤','⑥','⑦','⑧','⑨','⑩','⑪','⑫','⑬','⑭','⑮','㈀','㈁','㈂','㈃','㈄','㈅','㈆','㈇','㈈','㈉','㈊','㈋','㈌','㈍','㈎','㈏','㈐','㈑','㈒','㈓','㈔','㈕','㈖','㈗','㈘','㈙','㈚','㈛','⒜','⒝','⒞','⒟','⒠','⒡','⒢','⒣','⒤','⒥','⒦','⒧','⒨','⒩','⒪','⒫','⒬','⒭','⒮','⒯','⒰','⒱','⒲','⒳','⒴','⒵','⑴','⑵','⑶','⑷','⑸','⑹','⑺','⑻','⑼','⑽','⑾','⑿','⒀','⒁','⒂'],
					3 : ['ㄱ','ㄲ','ㄳ','ㄴ','ㄵ','ㄶ','ㄷ','ㄸ','ㄹ','ㄺ','ㄻ','ㄼ','ㄽ','ㄾ','ㄿ','ㅀ','ㅁ','ㅂ','ㅃ','ㅄ','ㅅ','ㅆ','ㅇ','ㅈ','ㅉ','ㅊ','ㅋ','ㅌ','ㅍ','ㅎ','ㅏ','ㅐ','ㅑ','ㅒ','ㅓ','ㅔ','ㅕ','ㅖ','ㅗ','ㅘ','ㅙ','ㅚ','ㅛ','ㅜ','ㅝ','ㅞ','ㅟ','ㅠ','ㅡ','ㅢ','ㅣ','ㅥ','ㅦ','ㅧ','ㅨ','ㅩ','ㅪ','ㅫ','ㅬ','ㅭ','ㅮ','ㅯ','ㅰ','ㅱ','ㅲ','ㅳ','ㅴ','ㅵ','ㅶ','ㅷ','ㅸ','ㅹ','ㅺ','ㅻ','ㅼ','ㅽ','ㅾ','ㅿ','ㆀ','ㆁ','ㆂ','ㆃ','ㆄ','ㆅ','ㆆ','ㆇ','ㆈ','ㆉ','ㆊ','ㆋ','ㆌ','ㆍ','ㆎ'],
					4 : ['Α','Β','Γ','Δ','Ε','Ζ','Η','Θ','Ι','Κ','Λ','Μ','Ν','Ξ','Ο','Π','Ρ','Σ','Τ','Υ','Φ','Χ','Ψ','Ω','α','β','γ','δ','ε','ζ','η','θ','ι','κ','λ','μ','ν','ξ','ο','π','ρ','σ','τ','υ','φ','χ','ψ','ω','Æ','Ð','Ħ','Ĳ','Ŀ','Ł','Ø','Œ','Þ','Ŧ','Ŋ','æ','đ','ð','ħ','I','ĳ','ĸ','ŀ','ł','ł','œ','ß','þ','ŧ','ŋ','ŉ','Б','Г','Д','Ё','Ж','З','И','Й','Л','П','Ц','Ч','Ш','Щ','Ъ','Ы','Ь','Э','Ю','Я','б','в','г','д','ё','ж','з','и','й','л','п','ф','ц','ч','ш','щ','ъ','ы','ь','э','ю','я'],
					5 : ['ぁ','あ','ぃ','い','ぅ','う','ぇ','え','ぉ','お','か','が','き','ぎ','く','ぐ','け','げ','こ','ご','さ','ざ','し','じ','す','ず','せ','ぜ','そ','ぞ','た','だ','ち','ぢ','っ','つ','づ','て','で','と','ど','な','に','ぬ','ね','の','は','ば','ぱ','ひ','び','ぴ','ふ','ぶ','ぷ','へ','べ','ぺ','ほ','ぼ','ぽ','ま','み','む','め','も','ゃ','や','ゅ','ゆ','ょ','よ','ら','り','る','れ','ろ','ゎ','わ','ゐ','ゑ','を','ん','ァ','ア','ィ','イ','ゥ','ウ','ェ','エ','ォ','オ','カ','ガ','キ','ギ','ク','グ','ケ','ゲ','コ','ゴ','サ','ザ','シ','ジ','ス','ズ','セ','ゼ','ソ','ゾ','タ','ダ','チ','ヂ','ッ','ツ','ヅ','テ','デ','ト','ド','ナ','ニ','ヌ','ネ','ノ','ハ','バ','パ','ヒ','ビ','ピ','フ','ブ','プ','ヘ','ベ','ペ','ホ','ボ','ポ','マ','ミ','ム','メ','モ','ャ','ヤ','ュ','ユ','ョ','ヨ','ラ','リ','ル','レ','ロ','ヮ','ワ','ヰ','ヱ','ヲ','ン','ヴ','ヵ','ヶ'],
					6 : ['─','│','┌','┐','┘','└','├','┬','┤','┴','┼','━','┃','┏','┓','┛','┗','┣','┳','┫','┻','╋','┠','┯','┨','┷','┿','┝','┰','┥','┸','╂','┒','┑','┚','┙','┖','┕','┎','┍','┞','┟','┡','┢','┦','┧','┩','┪','┭','┮','┱','┲','┵','┶','┹','┺','┽','┾','╀','╁','╃','╄','╅','╆','╇','╈','╉','╊']
					};
			var div_container, div_tab, div_input, htmlstr;
			var i,k,v;
			var div_symbols = new Array();
			
			me.browser = (navigator.appName != 'Netscape') ? 'ie' : 'mozilla';
			
			me.imgdir = baseUrl + '/htmls/site1/programs/common/skins/basic/images/chartable';
			me.box = document.createElement('div');
			me.box.id = 'jsct_box';
			me.box.style.position = 'absolute';
			me.box.style.width = '391px';
			me.box.style.height = '219px';
			me.box.style.background = "url('" + me.imgdir + "/bg.png') no-repeat";
			
			div_container = document.createElement('div');
			div_container.style.position = 'relative';
			div_container.style.cursor = 'default';
			div_container.style.width = me.box.style.width;
			div_container.style.height = me.box.style.height;
			me.box.appendChild(div_container);
			
			div_tab = document.createElement('div');
			div_tab.style.position = 'absolute';
			div_tab.style.height = '20px';
			div_tab.style.width = '381px';
			div_tab.style.left = '5px';
			div_tab.style.top = '20px';
			div_container.appendChild(div_tab);
			
			var tabs = {
						0:['기호', 'jsct_symbol_tab'],
						1:['숫자/단위', 'jsct_unit_tab'], 
						2:['원/괄호문자', 'jsct_circle_tab'], 
						3:['한글','jsct_korean_tab'],
						4:['라틴','jsct_latin_tab'], 
						5:['일본어','jsct_japan_tab'],
						6:['선문자', 'jsct_line_tab']
			};
			
			htmlstr = '';
			for (i=0; i<7; i++) {
				htmlstr += '<div id="' + tabs[i][1] + '" onclick="jsCharTable.switchTab(\'' + tabs[i][1] + '\')" style="float:left; font-size:8pt; letter-spacing:-1px; height:20px; text-align:left; padding:3px; cursor:pointer; border:1px #d7d7d7 solid; background-color:#efefef;">' + tabs[i][0] + '</div>';
			}
			div_tab.innerHTML = htmlstr;
			
			for (i=0; i<7; i++) {
				div_symbols[i] = document.createElement('div');
				div_symbols[i].id = tabs[i][1].replace('_tab', '');
				div_symbols[i].style.position = 'absolute';
				div_symbols[i].style.display = 'none';
				div_symbols[i].style.top = '40px';
				div_symbols[i].style.left = '6px';
				div_symbols[i].style.width = '380px';
				div_symbols[i].style.height = '150px';
				div_symbols[i].style.backgroundColor = '#efefef';
				//div_symbols[i].style.border = '1px #d7d7d7 solid';
				div_container.appendChild(div_symbols[i]);
				
				htmlstr = '';
				for (k=0; k<chars[i].length; k++ ) {
					htmlstr += "<div onmouseover=\"this.style.backgroundColor='#e7e7e7'\" onmouseout=\"this.style.backgroundColor='white'\" style=\"float:left; width:16px; height:16px; padding-top:2px; text-align:center; background-color:white; font-family:굴림체; font-size:13px; margin:-1px 0px 0px -1px; border:1px #d7d7d7 solid; cursor:pointer;\" onclick=\"jsCharTable.addChar('" + chars[i][k] + "')\">" + chars[i][k] + "</div>";
				}
				div_symbols[i].innerHTML = htmlstr;
				
			}
			
			div_input = document.createElement('div');
			div_input.style.position = 'absolute';
			div_input.style.left = '5px';
			div_input.style.top = '194px';
			div_input.style.width = '381px';
			div_input.style.height = '16px';
			
			htmlstr = '<input type="text" id="jsct_input" style="width:314px; height:16px; border:1px #d7d7d7 solid; font-family:굴림체; font-size:9pt; background-color:white;" />';
			htmlstr += '<img src="' + me.imgdir + '/btn_apply.png" style="margin-left:2px; cursor:hand;" onclick="jsCharTable.applyChars()" align="absmiddle" />';
			htmlstr += '<img src="' + me.imgdir + '/btn_close.png" style="margin-left:2px; cursor:hand;" onclick="jsCharTable.cancel()" align="absmiddle" />';
			div_input.innerHTML = htmlstr;
			
			div_container.appendChild(div_input);
			
			document.body.appendChild(me.box);
			
			me.box.style.display = 'none';
			
		};
		
		me.addChar = function(char) {
			$('jsct_input').value += char;
		};
		
		me.applyChars = function() {
			me.arg.chars = $('jsct_input').value;
			me.func();
			me.cancel();
		};
		
		me.cancel = function() {
			me.box.style.display = 'none';
		};
		
		me.switchTab = function(tabid) {
			
			var tabidlist = new Array('jsct_symbol_tab', 'jsct_unit_tab', 'jsct_circle_tab', 'jsct_korean_tab', 'jsct_latin_tab', 'jsct_japan_tab', 'jsct_line_tab');
			var contidlist = new Array('jsct_symbol', 'jsct_unit', 'jsct_circle', 'jsct_korean', 'jsct_latin', 'jsct_japan', 'jsct_line');
			var el, id;
			
			for (i=0; i<7; i++) {
				$(tabidlist[i]).style.borderBottomColor = '#cccccc';
				$(tabidlist[i]).style.backgroundColor = '#efefef';
				$(contidlist[i]).style.display = 'none';
			}
			
			el = $(tabid);
			el.style.borderBottomColor = 'white';
			el.style.backgroundColor = 'white';
			
			id = el.id.replace('_tab', '');
			$(id).style.display = 'inline';
		};
		
		me.show = function(position, arg, func) {
			var x,y;
			me.arg = arg;
			me.func = func;
			me.box.style.display = 'block';
			if (position.center == true) {
				var pos = me.getCenter();
				x = pos[0];
				y = pos[1];
			} else {
				x = position.x;
				y = position.y;
			}
			me.box.style.left = x + 'px';
			me.box.style.top = y + 'px';
			me.switchTab('jsct_symbol_tab');
		};
		
		me.getCenter = function() {
			var w, h, pw, ph, x, y, retval;
			
			w = me.box.offsetWidth;
			h = me.box.offsetHeight;
			
			x = Math.floor(document.documentElement.scrollLeft + (document.documentElement.clientWidth - w) / 2);
			y = Math.floor(document.documentElement.scrollTop + (document.documentElement.clientHeight - h) / 2);
			
			retval = new Array(x,y);
			return retval;
		};
		
	};
	var jsCharTable = new chartable();
	jsAddEvent("load", jsCharTable.init);
	
	