//¼±ÅÃ¸Þ´º È°¼ºÈ­
function MenuChange(v){
	if (v == "account"){
		menu_1.src = "/images/topmenu/menu_1_s.gif";
	}else if (v == "member"){
		menu_2.src = "/images/topmenu/menu_2_s.gif";
	}else if (v == "resources"){
		menu_3.src = "/images/topmenu/menu_3_s.gif";
	}else if (v == "threedim"){
		menu_4.src = "/images/topmenu/menu_4_s.gif";
	}else if (v == "perform"){
		menu_5.src = "/images/topmenu/menu_5_s.gif";
	}else if (v == "statistics"){
		menu_6.src = "/images/topmenu/menu_6_s.gif";
	}
}
function MenuChange_sub0(x){
	if (v == "disorder.asp"){
		menu_1.src = "/images/leftmenu/menu_01_s.gif";
	}else if (v == ""){
		menu_2.src = "/images/leftmenu/menu_02_s.gif";
	}else if (v == ""){
		menu_3.src = "/images/leftmenu/menu_03_s.gif";
	}
}
function MenuChange_sub4(v,x,g){
	if (v == "board"){
		if (x == "board_list.asp" || x == "board_write.asp" || x == "board_view.asp"){
			if(g == 4){
				Lmenu_1.src ="/images/button/sub04_title01_on.gif";
			}else if (g == 5){
				Lmenu_2.src ="/images/button/sub04_title02_on.gif";
			}else if (g == 6){
				Lmenu_3.src ="/images/button/sub04_title03_on.gif";
			}else if (g == 7){
				Lmenu_4.src ="/images/button/sub04_title04_on.gif";
			}
		}
	}else if (v == "terminal"){
		if (x == "terminal_info.asp"){
			Lmenu_1.src ="/images/button/sub01_title01_on.gif";
		}else if (x == "terminal_station.asp"){
			Lmenu_2.src ="/images/button/sub01_title02_on.gif";
		}else if (x == "terminal_drive.asp"){
			Lmenu_3.src ="/images/button/sub01_title03_on.gif";
		}else if (x == "terminal_minimap.asp"){
			Lmenu_4.src ="/images/button/sub01_title04_on.gif";
		}else if (x == "terminal_parking.asp"){
			Lmenu_5.src ="/images/button/sub01_title05_on.gif";
		}
	}else if (v == "resources"){
		if (x == "nms_list.asp" || x == "nms_view.asp" || x == "nms_mod.asp"){
			Lmenu_1.src ="/images/leftmenu/menu_31_s.gif";
			Lmenu_2.src ="/images/leftmenu/menu_311_s.gif";
		}else if (x == "mspp_list.asp" || x == "mspp_view.asp" || x == "mspp_mod.asp"){
			Lmenu_1.src ="/images/leftmenu/menu_31_s.gif";
			Lmenu_3.src ="/images/leftmenu/menu_312_s.gif";
		}else if (x == "nms_add.asp"){
			Lmenu_4.src ="/images/leftmenu/menu_32_s.gif";
			Lmenu_5.src ="/images/leftmenu/menu_321_s.gif";
		}else if (x == "mspp_add.asp"){
			Lmenu_4.src ="/images/leftmenu/menu_32_s.gif";
			Lmenu_6.src ="/images/leftmenu/menu_322_s.gif";
		}
	}else if (v == "threedim"){
		Lmenu_1.src ="/images/leftmenu/menu_41_s.gif";
	}
}

function showSub(obj){
	if(obj.style.display == "")obj.style.display = "none";
	else obj.style.display = "";
}

function MenuChange_admin(v,x,g,f){
	var leftFrm = top.frames.ADMIN_LEFT_FRAME.document.all
	if(leftFrm.Lmenu.length != undefined){
		for(var i = 0; i < leftFrm.Lmenu.length;i++){
			if(leftFrm.Lmenu[i] != leftFrm.Lmenu[eval(g-1)])leftFrm.Lmenu[i].style.fontWeight = "";
		}
	}
	if (v == "board"){
		if (x == "board_list.asp" || x == "board_write.asp" || x == "board_view.asp" || x == "filtering.asp"){
			eval("leftFrm." + v + ".style.display = ''");
			if(g != ""){
				eval("leftFrm.Lmenu[" + eval(g-1) + "].style.fontWeight ='bold'");
			}else{
				leftFrm.Lmenu[7].style.fontWeight ="bold"
			}
		}
	}else if (v == "adbanner"){
		//"AdBanner_List.asp" "AdBanner_write.asp" "AdBanner_Write_Ok.asp" "SiteLink_Ok.asp"
		if (x == "adbanner_list.asp" || x == "adbanner_write.asp"){
			if(f == "B"){
				eval("leftFrm." + v + ".style.display = ''");
				eval("leftFrm.Lmenu[8].style.fontWeight ='bold'");
			}else{
				eval("leftFrm." + v + ".style.display = ''");
				eval("leftFrm.Lmenu[9].style.fontWeight ='bold'");
			}
		}
	}else if (v == "allocate"){
		//"allocate_sync.asp" "allocate_write.asp"
		if (x == "allocate_sync.asp"){
			eval("leftFrm." + v + ".style.display = ''");
			eval("leftFrm.Lmenu[10].style.fontWeight ='bold'");
		}else if(x == "allocate_write.asp"){
			eval("leftFrm." + v + ".style.display = ''");
			eval("leftFrm.Lmenu[10].style.fontWeight ='bold'");
		}
	}else if (v == "weblog"){
		//"log_month.asp" "log_person.asp" "log_time.asp" "log_week.asp" "log_year.asp"
		if (x == "log_person.asp"){
			eval("leftFrm." + v + ".style.display = ''");
			eval("leftFrm.Lmenu[11].style.fontWeight ='bold'");
		}else if(x == "log_time.asp"){
			eval("leftFrm." + v + ".style.display = ''");
			eval("leftFrm.Lmenu[12].style.fontWeight ='bold'");
		}else if(x == "log_week.asp"){
			eval("leftFrm." + v + ".style.display = ''");
			eval("leftFrm.Lmenu[13].style.fontWeight ='bold'");
		}else if(x == "log_month.asp"){
			eval("leftFrm." + v + ".style.display = ''");
			eval("leftFrm.Lmenu[14].style.fontWeight ='bold'");
		}else if(x == "log_year.asp"){
			eval("leftFrm." + v + ".style.display = ''");
			eval("leftFrm.Lmenu[15].style.fontWeight ='bold'");
		}
	}
}
//¸Þ´º
function sub_1(menuName){
	if(menuName=="menu_1"){
		location.href="/Terminal/Terminal_Info.asp";
	}else if(menuName=="menu_2"){
		location.href="/Terminal/Terminal_Station.asp";
	}else if(menuName=="menu_3"){
		location.href="/Terminal/Terminal_Drive.asp";
	}else if(menuName=="menu_4"){
		location.href="/Terminal/Terminal_Minimap.asp";
	}else if(menuName=="menu_5"){
		location.href="/Terminal/Terminal_Parking.asp";
	}
}
function sub_2(menuName){
	if(menuName=="menu_1"){
		location.href="/business/business.asp";
	}
}
function sub_3(menuName){
	if(menuName=="menu_1"){
		location.href="/product/product_1.asp";
	}else if(menuName=="menu_2"){
		location.href="/product/product_2.asp";
	}
}
function sub_4(menuName){
	var locStr = "/board/Board_List.asp?B_KIND=";
	if(menuName=="menu_1"){
		location.href=locStr+"4";
	}else if(menuName=="menu_2"){
		location.href=locStr+"5";
	}else if(menuName=="menu_3"){
		location.href=locStr+"6";
	}else if(menuName=="menu_4"){
		location.href=locStr+"7";
	}
}
function sub_5(menuName){
	if(menuName=="menu_1"){
		location.href="/recruit/recruit.asp";
	}
}

//¸µÅ©ÀÌ¹ÌÁö Á¡¼± ¾ø¾Ö±â

function bluring(){
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}
document.onfocusin=bluring;
function body_print(){
	window.open('/comm/inc/print_page.asp', 'print', 'width=730, height=700, top=0, left=0, status=no, resize=no, scrollbars=yes');
}

function checkChr(code){
    	if(((code<48) || (code > 57)) && code != 8){
    		if ((code < 37 || code > 40) && code != 46)
    			if ((code < 96) || (code > 105))
        				event.returnValue = false;
    	}
}

function m_menu(menuName){
	if(menuName=="menu_01"){
		location.href="/blog/blog_view.asp";
	}
	if(menuName=="menu_02"){
		location.href="/board/board_list.asp?B_KIND=4";
	}
	if(menuName=="menu_03"){
		location.href="/board/board_list.asp?B_KIND=0";
	}
	if(menuName=="menu_04"){
		location.href="/board/board_list.asp?B_KIND=2";
	}
	if(menuName=="menu_05"){
		location.href="/support/support_01.asp";
	}
}

function hu(menuName){
	if(menuName=="hu"){
		location.href="/support/support_01.asp";
	}
}



function pop_login(){
	window.open('/member/pop_login.asp','login_pop','left=0,top=0,width=312,height=189');
}

function pop_hu(sno){
	window.open('/support/pop_hu.asp?SNO='+sno, 'ÈÄ¿ø³»¿ªÁ¶È¸', 'left=0,top=0,width=646,height=377');
}


/* ÁÖ¹Îµî·Ï¹øÈ£ Ã¼Å© */
function Jumin_chk(it) {
	IDtot = 0;
	IDAdd = "234567892345";
	for(i=0; i<12; i++) IDtot = IDtot + parseInt(it.substring(i, i+1)) * parseInt(IDAdd.substring(i, i+1));
	IDtot = 11 - (IDtot%11);
	if (IDtot == 10) IDtot = 0;
	else if (IDtot == 11) IDtot = 1;
	if(parseInt(it.substring(12, 13)) != IDtot) return true;
	else return false
}

/* ¾ÆÀÌµð Áßº¹ Ã¼Å© */
function id_check(fmvalue){
	window.open('/member/join_id_check.asp?M_ID='+fmvalue,'ID_CHECK','width=352,height=210,scrollbars=0,resizable=0,status=0');
	return;
}

/* ´Ð³×ÀÓ Ã¼Å© */
function nick_check(fm,fmvalue){
    	window.open('/member/join_nick_check.asp?M_NICKNAME='+fmvalue,'NICK_CHECK','width=365,height=240,scrollbars=0,resizable=0,status=0');
}

/* ¿ìÆí¹øÈ£ Ã£±â */
function post_check(){
    	window.open('/recruit/zip.asp','POST1_SEARCH','width=352,height=260,scrollbars=0,status=0,resizable=0');
}

function NumberCheck(v){
	for(var i=0;i <v.length;i++){
		var c = v.charAt(i);
		if((c < '0' || c > '9')){
			return false;
		}
	}
	return true
}

function mail_change(ch){
	var form = document.member;

	if(ch.value == "etc"){
		form.mmaildomain.readOnly = false;
		form.mmaildomain.value = "";
		form.mmaildomain.focus();
	}
	else{
		form.mmaildomain.readOnly = true;
		form.mmaildomain.value = ch.value;
	}
}

/* °ø¹éÁ¦°Å ½ºÅ©¸³Æ® */
function trim(str){
    	return ltrim(rtrim(str));
}

function ltrim(str){
	var s = new String(str);

    	if (s.substr(0,1) == " " || s.substr(0,1) == "¡¡"){
    		return ltrim(s.substr(1));
    	}
    	else{return s;}
}

function rtrim(str){
	var s = new String(str);

	if(s.substr(s.length-1,1) == " " || s.substr(s.length-1,1) == "¡¡"){
		return rtrim(s.substring(0, s.length-1));
	}
	else{return s;}
}

var maxW,maxH,fromX,fromY,toX,toY,adjX,adjY,zBox,zStep=0,zLink,zNew;
ie = document.all ? true : false
function zoomBox(evt,zlink,maxw,maxh){
	if (arguments.length > 2){
		zNew=1;
	}
	tox = evt.x;
	toy = evt.y;
	scrollH = (window.pageYOffset!=null)?window.pageYOffset:document.body.scrollTop;
	maxW = maxw?maxw:window.innerWidth?innerWidth:document.body.clientWidth;
	maxH = maxh?maxh:window.innerHeight?innerHeight:document.body.clientHeight;
	toX = tox?tox:0;
	toY = (toy?toy:0)+scrollH;
	fromX = evt.pageX?evt.pageX:evt.clientX;
	fromY = (evt.pageY?evt.pageY:evt.clientY)+(document.all?scrollH:0);
	adjX = toX+evt.screenX-fromX;
	adjY = toY+evt.screenY-fromY;

	if (document.createElement && document.body.appendChild && !zBox){
		zBox=document.createElement("div");
		zBox.style.position = "absolute";
		document.body.appendChild(zBox);
	}
	else if (document.all && !zBox) {
		document.all[document.all.length-1].outerHTML+='<div id="zBoxDiv" style="position:absolute"></div>';
		zBox=document.all.zBoxDiv;
	}
	else if (document.layers && !zBox){
		zBox = new Layer(maxW);
		zBox.style=zBox;
	}

	zLink = zlink;
	doZoom();
}

function doZoom() {
	zStep+=1;
	zPct=(10-zStep)/10
	if (document.layers){
		zBox.moveTo(toX+zPct*(fromX-toX),toY+zPct*(fromY-toY));
		zBox.document.open();
		zBox.document.write("<table width='"+maxW*(1-zPct)+"' height="+maxH*(1-zPct)+" border=2 cellspacing=0><tr><td></td></tr></table>");
		zBox.document.close();
	}
	else {
		zBox.style.border = "1px solid #FFFFFF"; // Å×µÎ¸® ±½±âpx solid Å×µÎ¸® »ö
		zBox.style.left = toX+zPct*(fromX-toX);
		zBox.style.top = toY+zPct*(fromY-toY);
		zBox.style.width = maxW*(1-zPct);
		zBox.style.height = maxH*(1-zPct);
	}

	zBox.style.visibility = "visible";

	if (zStep < 10){
		setTimeout("doZoom("+fromX+","+fromY+","+toX+","+toY+")",20);
	}
	else{
		zBox.style.visibility='hidden';
		zStep=0;
		if (zLink && !zNew){
			location.href=zLink.href;
		}
		else if (zLink && zNew){	 // À©µµ ÀÌ¸§ ÁÖ½Ã¸é 1°³¹Û¿¡ »ç¿ëÇÏÁú ¸øÇÕ´Ï´Ù. »õÃ¢¿¡ ½ºÅ©·Ñ¹Ù¸¦ ³ÖÀ¸·Á¸é scrollbars=yes ·Î..
			var w=window.open(zLink,'','width='+maxW+',height='+maxH+',left='+adjX+',top='+adjY+',scrollbars=no');
			zNew=null;
		}
	}
}

/*  ·¹ÀÌ¾î¿¡ ÇÁ·¹ÀÓÀ» ³Ö¾î º¸¿©ÁÖ±â */
var frameStep,frameBox;
function div_show_frame(x,y,page,w,h,titlebg,btoption) {
	var tabel;
	if (btoption == "" || btoption == undefined) btoption = false;
	if (btoption == false)
		table = '<table width="100%" height="100%" border=0 cellspacing=0><tr><td align="right" height="5%" bgcolor='+titlebg+'><a href="javascript:div_hidden_frame();">´Ý±â</a></td></tr><tr><td height="95%"><iframe name="DIV_frame" src="" width="100%" height="100%" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0"></iframe></td></tr></table>';
	else
		table = '<table width="100%" height="100%" border=0 cellspacing=0><tr><td height="100%"><iframe name="DIV_frame" src="" width="100%" height="100%" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0"></iframe></td></tr></table>';

	if (document.createElement && document.body.appendChild && !frameBox){
		frameBox=document.createElement("div");
		frameBox.style.position = "absolute";
		frameBox.innerHTML = table;
		document.body.appendChild(frameBox);
	}
	else if (document.all && !frameBox) {
		document.all[document.all.length-1].outerHTML+='<div id="frameBoxDiv" style="position:absolute">'+ table +'</div>';
		frameBox=document.all.frameBoxDiv;
	}
	else if (document.layers && !frameBox){
		frameBox = new Layer(w);
		frameBox.style=frameBox;
	}
	frameStep = 0;
	show_atcion_frame(x,y,page,w,h,titlebg,btoption);
}

function show_atcion_frame(x,y,page,w,h,titlebg,btoption){
	frameStep+=1;
	zPct=(10-frameStep)/10
	if (btoption == false)
		table = '<table width='+w*(1-zPct)+' height='+h*(1-zPct)+' border=0 cellspacing=0><tr><td align="right" height="5%" bgcolor='+titlebg+'><a href="javascript:div_hidden_frame();">´Ý±â</a></td></tr><tr><td height="95%"><iframe name="DIV_frame" src="" width="100%" height="100%" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0"></iframe></td></tr></table>';
	else
		table = '<table width='+w*(1-zPct)+' height='+h*(1-zPct)+' border=0 cellspacing=0><tr><td height="100%"><iframe name="DIV_frame" src="" width="100%" height="100%" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0"></iframe></td></tr></table>';
	if (document.layers){
		frameBox.moveTo(x,y);
		frameBox.document.open();
		frameBox.document.write(table);
		frameBox.document.close();
	}
	else {
		frameBox.style.border = "1px solid #000000"; // Å×µÎ¸® ±½±âpx solid Å×µÎ¸® »ö
		frameBox.style.left = x;
		frameBox.style.top = y;
		frameBox.style.width = w*(1-zPct);
		frameBox.style.height = h*(1-zPct);
	}
	if (frameStep < 10){
		setTimeout("show_atcion_frame("+x+","+y+",'"+page+"',"+w+","+h+","+btoption+")",20);
	}else{
		DIV_frame.location.href = page;
	}
	frameBox.style.visibility = "visible";
}

function div_hidden_frame(){
	frameBox.style.visibility = "hidden";
	DIV_frame.location.href = "/bg.html";
	frameBox = undefined;
}

var thisImgIndex = 1;
// ÀÌ¹ÌÁö »çÀÌÁî ÃøÁ¤
function Imagesize(Obj,_width,_height, iname){
	var img = new Image();
	img.src = Obj.value;

	if (img.height != _height || img.width != _width){
		alert(iname +" ÀÌ¹ÌÁöÀÇ Å©±â´Â "+ _width +" ¡¿ "+ _height +" ÀÌ¿©¾ß ÇÕ´Ï´Ù. \n\n ÇöÀç ÀÌ¹ÌÁö Å©±â´Â "+ img.width +" ¡¿ "+ img.height +" ÀÔ´Ï´Ù.");
		Obj.focus();
		return false;
	}

	return true;
}

function getImageWidth(Obj){
	var img = new Image();
	img.src = Obj.value
	return img.width;
}

function getImageHeight(Obj){
	var img = new Image();
	img.src = Obj.value
	return img.height;
}

/** ÀÌ¹ÌÁö °æ·Î¸¦ ¹Þ¾Æ¼­ ÇöÀçÀ§Ä¡¿¡ º¸¿©Áø´Ù */
function getImage(temp,w,h) {
	var selectedRange = document.selection.createRange();
	selectedRange.pasteHTML("<img src=" + temp + " border=0 width=" + w + " height=" + h + " style=cursor:hand><br>");
}

/* ¼¿·ºÆ®¹Ú½º ÀÌ¹ÌÁö »èÁ¦ */
function Board_Select2(selectedIndex){
	selectedOptIndex = selectedIndex;
	document.writeForm.img_list[selectedIndex].selected = true;
}
	var thisImgIndex = 1;
	// ÀÌ¹ÌÁö »çÀÌÁî ÃøÁ¤
	function Imagesize(Obj,_width,_height, iname){
		var img = new Image();
		img.src = Obj.value;
		if (img.height != _height || img.width != _width){
			alert(iname +" ÀÌ¹ÌÁöÀÇ Å©±â´Â "+ _width +" ¡¿ "+ _height +" ÀÌ¾î¾ß ÇÕ´Ï´Ù. \n\n ÇöÀç ÀÌ¹ÌÁö Å©±â´Â "+ img.width +" ¡¿ "+ img.height +" ÀÔ´Ï´Ù.");
			Obj.focus();
			return false;
		}
		return true;
	}

	//ÀÌ¹ÌÁö °¡·Î»çÀÌÁî °¡Á®¿À±â
	function getImageWidth(Obj){
		var img = new Image();
		img.src = Obj.value
		return img.width;
	}

	//ÀÌ¹ÌÁö ¼¼·Î»çÀÌÁî °¡Á®¿À±â
	function getImageHeight(Obj){
		var img = new Image();
		img.src = Obj.value
		return img.height;
	}

	/** ÀÌ¹ÌÁö °æ·Î¸¦ ¹Þ¾Æ¼­ ÇöÀçÀ§Ä¡¿¡ º¸¿©Áø´Ù */
	function getImage(temp,w,h) {
		if (oldthismodestate == 1){
			HTMLEDITeditorDiv.focus();
			var selectedRange = HTMLEDITeditorDiv.document.selection.createRange();
			selectedRange.pasteHTML("<img src=\""+ temp +"\" border=\"0\" width=" + w +" height="+ h +" onclick=\"showImgPop(this);\" style=\"cursor:hand\"><br>");
		}
		else{
			document.writeForm.comment.value = document.writeForm.comment.value + "<img src="+temp+" border=\"0\" width="+ w +" height="+ h +"  onclick=\"showImgPop(this);\" style=\"cursor:hand\"><br>";
		}
	}
	/** ¿¡µðÅÍ Àü¿ë ÀÌ¹ÌÁö Å¬¸¯½Ã ¿øº» ÀÌ¹ÌÁö º¸±â*/
	function showImgPop(img){
			//alert(img.src);
			window.open(img.src,"","")

	}

function ImageFileCheck(Obj){
	var up_text = Obj.value;
	var check = up_text.substring((up_text.length)-3,up_text.length);
	if(check.toUpperCase()=="GIF" || check.toUpperCase()=="JPG" || check.toUpperCase()=="JPEG"){
		return true;
	}
	return false;
}
/*±Û»óÀÚ¾ÈÀÇ Ã·ºÎ ÀÌ¹ÌÁö »èÁ¦ */
function img_del2() {
	if ( (document.writeForm.img_list.selectedIndex == -1) || (document.writeForm.img_list.options[document.writeForm.img_list.selectedIndex].value == -1) ){
		alert("ÀÌ¹ÌÁö¸¦ ¼±ÅÃÇØ ÁÖ½Ã±â ¹Ù¶ø´Ï´Ù.");
		return;
	}

	var img_op = document.writeForm.img_list.selectedIndex;
	var img_op1 = document.writeForm.img_list.options[img_op].value;
	document.writeForm.img_list.remove(document.writeForm.img_list.selectedIndex);
	i_frame.document.location.href = "/comm/inc/img_del.asp?seq=" + img_op1;
}

function select_del2(fSize){
   	var lenlist = document.writeForm.img_list.length;

	document.writeForm.img_size.value = parseInt(document.writeForm.img_size.value) - parseInt(fSize);

	for (var i=lenlist-1; i>=0; i--) {
		if (document.writeForm.img_list[i].selected == true) {
			document.writeForm.img_list[i] = null;
		}
	}
}

function UploadStart(This_Form,theUniqueID){
	strAppVersion = navigator.appVersion;

	if (strAppVersion.indexOf('MSIE')!=-1 && strAppVersion.substr(strAppVersion.indexOf('MSIE')+5,1) > 4) {
	          winstyle = "dialogWidth=480px; dialogHeight:140px; center:yes";
	          window.showModelessDialog("/Comm/inc/progressbar.asp?nav=ie&ID=" + theUniqueID, "probarwindow", winstyle);
	}
	else {
		winpos = "left=" + ((window.screen.width-380)/2)+",top=" + ((window.screen.height-110)/2);
	         winstyle = "width=480,height=110,status=no,toolbar=no,menubar=no," + "location=no,resizable=no,scrollbars=no,copyhistory=no," + winpos;
		window.open("/Comm/inc/progressbar.asp?ID=" + theUniqueID ,"probarwindow",winstyle);
	}

	This_Form.action = This_Form.action +"?progressid="+theUniqueID;
}

/*------------------------------ »èÁ¦·¹ÀÌ¾î -----------------------------*/
function MM_findObj(n, d) {     //v4.0
  	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 && document.getElementById) {x=document.getElementById(n);}

  	return x;
}

function Layers_open() { //v3.0
  	var i,p,v,obj,args = Layers_open.arguments;

  	for(i=0; i<(args.length-2); i+=3){
   		if((obj=MM_findObj(args[i]))!=null){
			v=args[i+2];
  			if(obj.style){obj=obj.style; v=(v=='show')?'visible':v;}
			obj.visibility=v;
   		}
   	}
}

function Layers_close() { //v3.0
  	var i,p,v,obj,args = Layers_close.arguments;

  	for(i=0; i<(args.length-2); i+=3){
   		if((obj=MM_findObj(args[i]))!=null){
   			v=args[i+2];
      			if(obj.style){
      				obj=obj.style;
      				v=(v=='hide')?'hidden':v;
      			}
   			obj.visibility=v;
   		}
   	}
}



function Layers_Write(a,b,c,e,f,g,bnum) {     //v3.0

  	var i,p,v,obj,args = Layers_Write.arguments;
  	for(i=0; i<(args.length-2); i+=3){
   		if((obj=MM_findObj(args[i]))!=null){
   			v=args[i+2];
      			if(obj.style){
      				obj=obj.style;
      				v=(v=='show')?'visible':v;
      			}
   			obj.visibility=v;
   		}
   	}
   	document.localWrite.GB_CONTENT.focus();
   	document.localWrite.GB_GNUMBER.value = g;
   	document.localWrite.GB_BNUMBER.value = bnum;
}





function Layers_Mod(a,b,c,e) {     //v3.0
    	document.all[a].style.pixelLeft = document.body.scrollLeft + e.x - 400;
    	document.all[a].style.pixelTop = document.body.scrollTop + e.y - 250;

  	var i,p,v,obj,args = Layers_Mod.arguments;
  	for(i=0; i<(args.length-2); i+=3){
   		if((obj=MM_findObj(args[i]))!=null){
   			v=args[i+2];
      			if(obj.style){
      				obj=obj.style;
      				v=(v=='show')?'visible':v;
      			}
   			obj.visibility=v;
   		}
   	}
   	document.localMod.B_PWD.focus();
}

function Layers_Del(a,b,c,e) {     //v3.0
    	document.all[a].style.pixelLeft = document.body.scrollLeft + e.x - 400;
    	document.all[a].style.pixelTop = document.body.scrollTop + e.y - 250;

  	var i,p,v,obj,args = Layers_Del.arguments;

  	for(i=0; i<(args.length-2); i+=3){
   		if((obj=MM_findObj(args[i]))!=null){
   			v=args[i+2];
      			if(obj.style){
      				obj=obj.style;
      				v=(v=='show')?'visible':v;
      			}
   			obj.visibility=v;
   		}
   	}
   	document.localDel.B_PWD.focus();
}

function Layers_Del2(a,b,c,e) {     //v3.0
    	document.all[a].style.pixelLeft = document.body.scrollLeft + e.x + 10;
    	document.all[a].style.pixelTop = document.body.scrollTop + e.y - 100;

  	var i,p,v,obj,args = Layers_Del2.arguments;

  	for(i=0; i<(args.length-2); i+=3){
   		if((obj=MM_findObj(args[i]))!=null){
			v=args[i+2];
  			if(obj.style){obj=obj.style; v=(v=='show')?'visible':v;}
			obj.visibility=v;
   		}
   	}

   	document.addDel.A_ANUMBER.value = b;
   	document.addDel.A_PWD.focus();
}

function Layers_Del3(a,b,c,e) {     //v3.0
    	document.all[a].style.pixelLeft = document.body.scrollLeft + e.x + 10;
    	document.all[a].style.pixelTop = document.body.scrollTop + e.y - 100;

  	var i,p,v,obj,args = Layers_Del3.arguments;

  	for(i=0; i<(args.length-2); i+=3){
   		if((obj=MM_findObj(args[i]))!=null){
			v=args[i+2];
  			if(obj.style){obj=obj.style; v=(v=='show')?'visible':v;}
			obj.visibility=v;
   		}
   	}

   	document.localDel.B_BNUMBER.value = b;
   	document.localDel.B_PWD.focus();
}

/*  ÀÌ¹ÌÁö º¸¿©ÁÖ´Â ·¹ÀÌ¾î */
var ImgStep,ImgBox;
function div_show_img(x,y,Imgsrc,w,h) {
	if (document.createElement && document.body.appendChild && !ImgBox){
		ImgBox=document.createElement("div");
		ImgBox.style.position = "absolute";
		ImgBox.innerHTML = '<IMG SRC="" ID="DIV_IMG" WIDTH="0" height="0" onclick="javascript:div_hidden_img();">';
		document.body.appendChild(ImgBox);
	}
	else if (document.all && !ImgBox) {
		document.all[document.all.length-1].outerHTML+='<div id="ImgBoxDiv" style="position:absolute"><IMG SRC="" ID="DIV_IMG" WIDTH="0" height="0" onclick="javascript:div_hidden_img();"></div>';
		ImgBox=document.all.ImgBoxDiv;
	}
	else if (document.layers && !ImgBox){
		ImgBox = new Layer(w);
		ImgBox.style=ImgBox;
	}
	ImgStep = 0;
	show_atcion(x,y,Imgsrc,w,h);
}

function show_atcion(x,y,Imgsrc,w,h){
	ImgStep+=1;
	zPct=(10-ImgStep)/10
	if (document.layers){
		ImgBox.moveTo(x,y);
		ImgBox.document.open();
//			ImgBox.document.write("<table width='"+w*(1-zPct)+"' height="+h+" border=2 cellspacing=0><tr><td><IMG SRC='' ID='DIV_IMG' WIDTH=0 height=0 onclick='javascript:div_hidden_img();'></td></tr></table>");
		ImgBox.document.write("<table width='"+w*(1-zPct)+"' height="+h*(1-zPct)+" border=2 cellspacing=0><tr><td><IMG SRC='' ID='DIV_IMG' WIDTH=0 height=0 onclick='javascript:div_hidden_img();'></td></tr></table>");
		ImgBox.document.close();
	}
	else {
		ImgBox.style.border = "1px solid #000000"; // Å×µÎ¸® ±½±âpx solid Å×µÎ¸® »ö
		ImgBox.style.left = x;
		ImgBox.style.top = y;
		ImgBox.style.width = w*(1-zPct);
		ImgBox.style.height = h*(1-zPct);
	}
	ImgBox.style.visibility = "visible";
	DIV_IMG.src = Imgsrc;
	DIV_IMG.width = w*(1-zPct);
	DIV_IMG.height = h * (1-zPct);

	if (ImgStep < 10){
		setTimeout("show_atcion("+x+","+y+",'"+Imgsrc+"',"+w+","+h+")",20);
	}
}

function div_hidden_img(){
	ImgBox.style.visibility = "hidden";
}

/*  ·¹ÀÌ¾î¿¡ ÇÁ·¹ÀÓÀº ³Ö¾î º¸¿©ÁÖ±â */
var frameStep,frameBox;
function div_show_frame(x,y,page,w,h,titlebg,btoption) {
	var tabel;
	if (btoption == "" || btoption == undefined) btoption = false;
	if (btoption == false)
		table = '<table width="100%" height="100%" border=0 cellspacing=0><tr><td align="right" height="5%" bgcolor='+titlebg+'><a href="javascript:div_hidden_frame();">´Ý±â</a></td></tr><tr><td height="95%"><iframe name="DIV_frame" src="" width="100%" height="100%" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0"></iframe></td></tr></table>';
	else
		table = '<table width="100%" height="100%" border=0 cellspacing=0><tr><td height="100%"><iframe name="DIV_frame" src="" width="100%" height="100%" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0"></iframe></td></tr></table>';

	if (document.createElement && document.body.appendChild && !frameBox){
		frameBox=document.createElement("div");
		frameBox.style.position = "absolute";
		frameBox.innerHTML = table;
		document.body.appendChild(frameBox);
	}
	else if (document.all && !frameBox) {
		document.all[document.all.length-1].outerHTML+='<div id="frameBoxDiv" style="position:absolute">'+ table +'</div>';
		frameBox=document.all.frameBoxDiv;
	}
	else if (document.layers && !frameBox){
		frameBox = new Layer(w);
		frameBox.style=frameBox;
	}
	frameStep = 0;
	show_atcion_frame(x,y,page,w,h,titlebg,btoption);
}

function show_atcion_frame(x,y,page,w,h,titlebg,btoption){
	frameStep+=1;
	zPct=(10-frameStep)/10
	if (btoption == false)
		table = '<table width='+w*(1-zPct)+' height='+h*(1-zPct)+' border=0 cellspacing=0><tr><td align="right" height="5%" bgcolor='+titlebg+'><a href="javascript:div_hidden_frame();">´Ý±â</a></td></tr><tr><td height="95%"><iframe name="DIV_frame" src="" width="100%" height="100%" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0"></iframe></td></tr></table>';
	else
		table = '<table width='+w*(1-zPct)+' height='+h*(1-zPct)+' border=0 cellspacing=0><tr><td height="100%"><iframe name="DIV_frame" src="" width="100%" height="100%" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0"></iframe></td></tr></table>';
	if (document.layers){
		frameBox.moveTo(x,y);
		frameBox.document.open();
		frameBox.document.write(table);
		frameBox.document.close();
	}
	else {
		frameBox.style.border = "1px solid #000000"; // Å×µÎ¸® ±½±âpx solid Å×µÎ¸® »ö
		frameBox.style.left = x;
		frameBox.style.top = y;
		frameBox.style.width = w*(1-zPct);
		frameBox.style.height = h*(1-zPct);
	}
	if (frameStep < 10){
		setTimeout("show_atcion_frame("+x+","+y+",'"+page+"',"+w+","+h+","+btoption+")",20);
	}else{
		DIV_frame.location.href = page;
	}
	frameBox.style.visibility = "visible";
}

function div_hidden_frame(){
	frameBox.style.visibility = "hidden";
	DIV_frame.location.href = "/bg.html";
	frameBox = undefined;
}

var SubWindow;
var CreatWindow = false;
function ShowProgressbar(){
	SubWindow = window.open("/comm/inc/InsertProgressbar.asp","INSERT", "top=50,left=50,width=500,height=150");
}

function show_calendar(str_target, str_datetime) {
	var arr_months = ["1¿ù", "2¿ù", "3¿ù", "4¿ù", "5¿ù", "6¿ù","7¿ù", "8¿ù", "9¿ù", "10¿ù", "11¿ù", "12¿ù"];
	var week_days = ["ÀÏ","¿ù", "È­", "¼ö", "¸ñ", "±Ý", "Åä" ];
	var n_weekstart = 0;

	var dt_datetime = (str_datetime == null || str_datetime =="" ?  new Date() : str2dt(str_datetime));
	var dt_prev_month = new Date(dt_datetime);
	dt_prev_month.setMonth(dt_datetime.getMonth()-1);
	var dt_next_month = new Date(dt_datetime);
	dt_next_month.setMonth(dt_datetime.getMonth()+1);
	var dt_firstday = new Date(dt_datetime);
	dt_firstday.setDate(1);
	dt_firstday.setDate(1-(7+dt_firstday.getDay()-n_weekstart)%7);
	var dt_lastday = new Date(dt_next_month);
	dt_lastday.setDate(0);

	var str_buffer = new String (
		"<html>\n"+
		"<head>\n"+
		"	<title>Calendar</title>\n"+
		"</head>\n"+
		"<link href=\"/comm/css/style.css\" rel=\"stylesheet\" type=\"text/css\">\n"+
		"<body bgcolor=\"White\">\n"+
		"<table cellspacing=\"0\" border=\"0\" width=\"100%\">\n"+
		"<tr><td bgcolor=\"#4682B4\">\n"+
		"<table cellspacing=\"1\" cellpadding=\"3\" border=\"0\" width=\"100%\">\n"+
		"<tr>\n	<td bgcolor=\"#4682B4\"><a href=\"javascript:window.opener.show_calendar('"+
		str_target+"', '"+ dt2dtstr(dt_prev_month)+"');\">"+
		"<img src=\"/images/ca_arrow_1.gif\" width=\"16\" height=\"16\" border=\"0\""+
		" alt=\"previous month\"></a></td>\n"+
		"	<td bgcolor=\"#4682B4\" colspan=\"5\" align=center>"+
		"<font color=\"#FFFFFF\" face=\"tahoma, verdana\" size=\"2\">"
		+arr_months[dt_datetime.getMonth()]+" "+dt_datetime.getFullYear()+"</font></td>\n"+
		"	<td bgcolor=\"#4682B4\" align=\"right\"><a href=\"javascript:window.opener.show_calendar('"
		+str_target+"', '"+dt2dtstr(dt_next_month)+"');\">"+
		"<img src=\"/images/ca_arrow_2.gif\" width=\"16\" height=\"16\" border=\"0\""+
		" alt=\"next month\"></a></td>\n</tr>\n"
	);

	var dt_current_day = new Date(dt_firstday);
	str_buffer += "<tr>\n";
	for (var n=0; n<7; n++)
		str_buffer += "	<td bgcolor=\"#E1E9F5\" align=center>"+
		"<font color=\"#000000\" face=\"tahoma, verdana\" size=\"2\">"+
		week_days[(n_weekstart+n)%7]+"</font></td>\n";
	str_buffer += "</tr>\n";
	while (dt_current_day.getMonth() == dt_datetime.getMonth() ||
		dt_current_day.getMonth() == dt_firstday.getMonth()) {
		str_buffer += "<tr>\n";
		for (var n_current_wday=0; n_current_wday<7; n_current_wday++) {
				if (dt_current_day.getDate() == dt_datetime.getDate() &&
					dt_current_day.getMonth() == dt_datetime.getMonth())
					str_buffer += "	<td bgcolor=\"#B49BBC\" align=\"right\">";
				else if (dt_current_day.getDay() == 0 || dt_current_day.getDay() == 6)
					str_buffer += "	<td bgcolor=\"#F0FFFF\" align=\"right\">";
				else
					str_buffer += "	<td bgcolor=\"white\" align=\"right\">";

				if (dt_current_day.getMonth() == dt_datetime.getMonth())
					str_buffer += "<a href=\"javascript:window.opener."+str_target+
					".value='"+dt2dtstr(dt_current_day)+"'; window.close();\">"+
					"<font color=\"black\" face=\"tahoma, verdana\" size=\"2\">";
				else
					str_buffer += "<a href=\"javascript:window.opener."+str_target+
					".value='"+dt2dtstr(dt_current_day)+"'; window.close();\">"+
					"<font color=\"gray\" face=\"tahoma, verdana\" size=\"2\">";
				str_buffer += dt_current_day.getDate()+"</font></a></td>\n";
				dt_current_day.setDate(dt_current_day.getDate()+1);
		}
		str_buffer += "</tr>\n";
	}
	str_buffer +=
		"</table>\n" +
		"</tr>\n</td>\n</table>\n" +
		"</body>\n" +
		"</html>\n";

	var vWinCal = window.open("", "Calendar", "width=200,height=170,status=no,resizable=yes,top=200,left=200");

	vWinCal.opener = self;
	var calc_doc = vWinCal.document;
	calc_doc.write (str_buffer);
	calc_doc.close();
}


function str2dt (str_datetime) {
//	var re_date = /^(\d+)\-(\d+)\-(\d+)\s+(\d+)\:(\d+)\:(\d+)$/;
	var y,m,d
	y = str_datetime.substring(0,4);
	m = str_datetime.substring(4,6);
	d = str_datetime.substring(6,8);
	return (new Date (y,m-1,d));
}
function dt2dtstr (dt_datetime) {
		var m,d
		var sdate, edate
		m = dt_datetime.getMonth()+1;
		d = dt_datetime.getDate();
		if (m < 10) m = "0"+m;
		if (d < 10) d = "0"+d;
		edate = dt_datetime.getYear()+""+m+""+d
		return (new String (edate));
}
function dt2tmstr (dt_datetime) {
	return "";
}


//ÀÌ¹ÌÁö Å¬¸¯½Ã ÆË¾÷À¸·Î ÀÌ¹ÌÁö ¿øº» º¸¿©ÁÖ±â(HTML¿¡µðÅÍ ¿ë)
function showImgPop(obj){
	var img = new Image();
	img.src = obj.value
	var img_win = window.open('','img','left=0,top=0,width='+ img.width+',height='+img.height+',scrollbars=no');
	img_win.opener = self;
	var img_doc = img_win.document;
	var HTML = "<HTML><HEAD><title>ÀÌ¹ÌÁö º¸±â</title></HEAD><meta http-equiv='Content-Type' content='text/html' charset='euc-kr'>";
	HTML += "<link href='/comm/css/admin_style.css' type='text/css' rel='stylesheet'><body>	"
	HTML += "<img src="+ obj.src +" style='cursor:hand' onclick='javascript:self.close();' onload='window.resizeTo(this.width+10,this.height+30);'>"
	HTML += "<body></html>"
	img_doc.write (HTML);
	img_doc.close();

}

//--------------- UMS °ü·Ã -------------------//
 function GroupSH(flag){
//	showModalDialog("Group_Choice.asp",window,"dialogWidth:500px; dialogHeight:380px;dialogTop: 10px; dialogLeft: 300px; center=yes; screenTop=yes; scroll=no; status=no; help=no;");
	window.open("Group_Choice.asp?flag=" + flag, "GROUPCHOICE", "top=50,left=50,width=500,height=350");
}

function _totalcnt(){
	TOTAL.innerHTML = document.forms[0].sendlist.length;
}

function memberSH(flag){
	window.open("Member_Choice.asp?flag=" + flag, "MEMBERSH", "top=50,left=50,width=600,height=450");
}

function _excel(){
	window.open("excel_form.asp","EXCEL", "top=50,left=50,width=500,height=150");
}

function emoticon(){
	showModalDialog("emoticon_frm.asp",window,"dialogWidth:550px; dialogHeight:625px;dialogTop: 10px; dialogLeft: 300px; center=yes; screenTop=yes; scroll=no; status=no; help=no;");

//	window.open("emoticon_frm.asp","GROUPCHOICE", "top=50,left=50,width=550,height=625");
}

function SendType(kind){
	var frm = document.UMS;
	if (kind == 0){
		frm.SYEAR.disabled = true;
		frm.SMONTH.disabled = true;
		frm.SDAY.disabled = true;
		frm.SHOUR.disabled = true;
		frm.SLIMT.disabled = true;
	}
	else{
		frm.SYEAR.disabled = false;
		frm.SMONTH.disabled = false;
		frm.SDAY.disabled = false;
		frm.SHOUR.disabled = false;
		frm.SLIMT.disabled = false;
	}
}

//////////////////////////////////////////////////////////////////////////////////////
var longMsgStatus		= false;
var hangulStatus		= false;

function msgByteLength(Obj){
	var str,msg;
	var len = 0;
	var temp;
	var count = 0;

	msg = Obj.value;
	str = new String(msg);
	len = str.length;

	for (k=0 ; k<len ; k++){
		temp = str.charAt(k);

		if (escape(temp).length > 4) {
			count += 2;
		}
		else if (temp == '\r' && str.charAt(k+1) == '\n') {
			count += 2;
		}
		else if (temp != '\n') {
			count++;
		}
	}

	return count;
}

function fc_chk_byte(aro_name,ari_max){
	var count	= msgByteLength(aro_name);
	if(count > ari_max) {
		aro_name.blur();
		aro_name.focus();
//		alert("¸Þ½ÃÁö ³»¿ëÀº 80¹ÙÀÌÆ®±îÁö¸¸ Àü¼ÛÀÌ °¡´ÉÇÕ´Ï´Ù.");
		CutChar(aro_name,ari_max);
		return ;
	}

	if (aro_name.name == "SMSMSG"){
		SMS.innerHTML = count;
	}
	else{
		TTS.innerHTML = count;
		document.UMS.TTSMSGLENGTH.value = count;
	}
}

/* ÁöÁ¤µÈ ¹ÙÀÌÆ®°¡ ÃÊ°ú°æ¿ì ¹®ÀÚ¸¦ »èÁ¦ÇÑ´Ù. */

function CutChar(Obj,ari_max) {
	var str,msg;
	var len=0;
	var temp;
	var count;
	count = 0;

	msg = Obj.value;
	str = new String(msg);
	len = str.length;

	for(k=0 ; k<len ; k++) {
		temp = str.charAt(k);

		if(escape(temp).length > 4) {
			count += 2;
		}
		else if(temp == '\r' && str.charAt(k+1) == '\n') {
			count += 2;
		}
		else if(temp != '\n') {
			count++;
		}

		if(count > ari_max) {
			str = str.substring(0,k);
			break;
		}
	}

	Obj.value = str;
}
function CutChar2(Obj,ari_max) {
	var str,msg;
	var len=0;
	var temp,temp_str;
	var count;
	count = 0;
 	temp_str = "";
	msg = Obj.value;
	str = new String(msg);
	len = str.length;

	for(k=0 ; k<len ; k++) {
		temp = str.charAt(k);

		if(escape(temp).length > 4) {
			count += 2;
		}
		else if(temp == '\r' && str.charAt(k+1) == '\n') {
			count += 2;
		}
		else if(temp != '\n') {
			count++;
		}

		if(count > ari_max)	break;

		temp_str += temp;
	}

	return temp_str;
}
function delCode(p_idx){
	if (p_idx > -1){
		with(document.forms[0]){
			newItem = document.createElement("OPTION");

			newItem.text = sendlist.options[p_idx].text;
			newItem.value = sendlist.options[p_idx].value;

			sendlist.options.remove(p_idx);
		}
		_totalcnt();
	}
	else{
		alert("Á¤È®È÷ ¼±ÅÃÇØ ÁÖ½Ã±â ¹Ù¶ø´Ï´Ù.");
	}
}

function checkemail(Obj){
	var testresults;
	var str = Obj;
	var filter=/^(\w+(?:\.\w+)*)@((?:\w+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;

	if (filter.test(str)){testresults = true;}
	else{testresults=false;}

	return (testresults);
}

function addItem(){
	var frm = document.forms[0];
	var parentObj = frm.sendlist;
	var	exist = true;
	newItem = document.createElement("OPTION");
	if (frm.addname.value == "¼º¸í" || frm.addnumber.value =="ÀÌ¸ÞÀÏÁÖ¼Ò"){
		alert("¼º¸í°ú ÀÌ¸ÞÀÏÁÖ¼Ò¸¦ ÀÔ·ÂÇÏ½Ê½Ã¿ä");
		return;
	}
	if (frm.addname.value == "" || frm.addnumber.value ==""){
		alert("¼º¸í°ú ÀÌ¸ÞÀÏÁÖ¼Ò¸¦ ÀÔ·ÂÇÏ½Ê½Ã¿ä");
		return;
	}
	if (!checkemail(frm.addnumber.value)){
		alert("¿Ã¹Ù¸¥ ÀÌ¸ÞÀÏ ÁÖ¼Ò¸¦ ÀÔ·ÂÇÏ½Ê½Ã¿ä");
		return;
	}
	for (var i=0;i < parentObj.length;i++)
		if (frm.addname.value +":"+frm.addnumber.value == parentObj[i].value) exist = false;

	if (exist){
		SelectOptionInput(parentObj, frm.addnumber.value, frm.addname.value +"("+frm.addnumber.value+")");
	}

	frm.addname.value = "¼º¸í";
	frm.addnumber.value = "ÀüÈ­¹øÈ£";
	_totalcnt();
}

function SelectOptionInput(Obj,value,text){
	var cnt = Obj.length;
	var ck = true;
	for (i=0;i < Obj.length;i++){
		if (value == Obj[i].value) ck = false;
	}
	if (ck){
		Obj.length = cnt+1;
		Obj[cnt].text = text;
		Obj[cnt].value = value;
	}
}

function AddItem(){
	var frm = document.UMS;
	var parentObj = frm.sendlist;
	var	exist = true;
	newItem = document.createElement("OPTION");
	if (frm.addname.value == "¼º¸í" || frm.addnumber.value =="ÀüÈ­¹øÈ£"){
		alert("¼º¸í°ú ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇÏ½Ê½Ã¿ä");
		return;
	}
	if (frm.addname.value == "" || frm.addnumber.value ==""){
		alert("¼º¸í°ú ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇÏ½Ê½Ã¿ä");
		return;
	}
	if (frm.addnumber.value.substring(0,2) != "01"){
		alert("ÇÚµåÆù ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇÏ½Ê½Ã¿ä");
		return;
	}
	for (i=0;i < parentObj.length;i++)
		if (frm.addname.value +":"+frm.addnumber.value == parentObj[i].value) exist = false;

	if (exist){
		SelectOptionInput(parentObj,frm.addname.value +":"+frm.addnumber.value,frm.addname.value +"("+frm.addnumber.value+")");
	}
	frm.addname.value = "¼º¸í";
	frm.addnumber.value = "ÀüÈ­¹øÈ£";
	_totalcnt();
}

function allDel(){
	document.forms[0].sendlist.length = 0;
	_totalcnt();
}

function ItemPush(InObj,OutObj){
	var cnt = InObj.length;
	var outcnt = OutObj.length;
	for (i=0;i<OutObj.length;i++){
		if (OutObj[i].selected == true){
			cnt++;
			InObj.length = cnt;
			InObj[cnt-1].text = OutObj[i].text;
			InObj[cnt-1].value = OutObj[i].value

		}
	}
	for (i=0;i<outcnt;i++){
		if (OutObj[i].selected == true){
			OutObj.remove(i);
			i--;
			outcnt--;
		}
	}
}


//=======================================================================================================
// °³¹ßÀÚ : ÀÌ ½Â Ã¶          °³¹ßÀÏ : 2007-03-29          °³¹ß¸í : ¼¿·ºÆ® ¹Ú½º ´Þ·Â
//-------------------------------------------------------------------------------------------------------
function makeDay(form, VluChk) {
	var YEAR		= eval("form." + VluChk + "Year.options[form." + VluChk + "Year.selectedIndex].value;")
	var MONTH		= eval("form." + VluChk + "Month.options[form." + VluChk + "Month.selectedIndex].value;")
	var daysInMonth	= new Date(new Date(YEAR,MONTH,1)-86400000).getDate();

	for(var i=0; i<eval("form." + VluChk + "Day.length"); i++) eval("form." + VluChk + "Day.options[i]=null;")
		for(var j=0; j<daysInMonth; j++) {
			if(j<9) var k="0"+(j+1); else var k=j+1;
			eval("form." + VluChk + "Day.options[j]=new Option(k, k);")
		}
}

function View_week(form, Year, Month, Day){
	week = new Date(Year,Month-1,Day).getDay();
		switch (week) {
			case 0:
				form.WeekDay.value = "ÀÏ";
				break;
			case 1:
				form.WeekDay.value = "¿ù";
				break;
			case 2:
				form.WeekDay.value = "È­";
				break;
			case 3:
				form.WeekDay.value = "¼ö";
				break;
			case 4:
				form.WeekDay.value = "¸ñ";
				break;
			case 5:
				form.WeekDay.value = "±Ý";
				break;
			case 6:
				form.WeekDay.value = "Åä";
				break;
			}
}

//¼ýÀÚ ¹× ³¯Â¥ Ã¼Å© ÇÔ¼ö
function DecimalNumber(val) {
 var i;
 var find = true;

 while (find) {
  if (val.charAt(0) != "0") {
   find = false;
   break;
  }

  if (val.length > 1)
   val = val.substring(1);
  else break;
 }

 return parseInt(val);
}


function isNumber(val)
{
 var comp="1234567890-";
 var len=val.length;
 for(i=0;i<len;i++)
 {
  if(comp.indexOf(val.substring(i,i+1).toUpperCase()) < 0 ) {
   return false;
  }
 }
 return true;
}

function isDate(val) {
 var ret = false;
 var year, month, day;
 var thisMonth, nextMonth, maxDay;

 year = month = day = 0;
 if (isNumber(val) && val.length == 8) {
  year = DecimalNumber(val.substring(0, 4));
  month = DecimalNumber(val.substring(4, 6));
  day  = DecimalNumber(val.substring(6));
 }
 else if (isDateNumber(val) && val.split("-").length == 3) {
  year = DecimalNumber(val.split("-")[0]);
  month = DecimalNumber(val.split("-")[1]);
  day  = DecimalNumber(val.split("-")[2]);
 }

 if (year >= 1900 && (month >= 1 || month <=12)) {
  thisMonth = new Date(year, month-1, 1);
  nextMonth = new Date(year, month, 1);

  maxDay  = (nextMonth - thisMonth) / 1000 / 60 / 60 / 24;

  if (day >= 1 && day <= maxDay)
   ret = true;
 }

 return ret;
}



function playflash(File, width, height){
	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='" + width + "' height='"+ height +"'>");
 	document.write("<param name='movie' value='" + File + "'>");
 	document.write("<param name='quality' value='high'>");
 	document.write("<param name='wmode' value='transparent'> ");
 	document.write("<embed src='" + File + "' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='" + width + "' height='"+ height +"'></embed> ");
 	document.write("</object>");
}