//ÇÃ·¡½Ã 
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>");
}

function flash(File,width,height,n){
	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 + "?pageNum="+ n +"'>");
 	document.write("<param name='quality' value='high'>");
 	document.write("<param name='wmode' value='transparent'> ");
 	document.write("<embed src='" + File + "?pageNum="+ n  +"'' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='" + width + "' height='"+ height +"'></embed> ");
 	document.write("</object>");
}

function menuflash(File,width,height,n,m){
	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='" + width + "' height='" + height + "'>");
	document.write("<param name='movie' value='" + File + "?pageNum="+ n +"&sub="+ m +"'>");
	document.write("<param name='quality' value='high'>");
	document.write("<param name='wmode' value='transparent'>");
	document.write("<embed src='" + File + "?pageNum="+ n +"&sub="+ m +"'' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='" + width + "' height='" + height + "'></embed> ");
	document.write("</object>");
}

//¸Þ´º
function sub_1(menuName){
	if(menuName=="menu_1"){
		location.href="/products/products_pro.asp";
	}else if(menuName=="menu_1_2"){
		location.href="/products/products.asp";
	}else if(menuName=="menu_1_3"){
		location.href="/products/products02.asp";
	}else if(menuName=="menu_1_4"){
		location.href="/products/products_mm110pro.asp";
	}else if(menuName=="menu_1_5"){
		location.href="/products/products_mm110lite.asp";
	}else if(menuName=="menu_1_6"){
		location.href="/products/products_haptic.asp";
	}else if(menuName=="menu_2"){
		location.href="/products/show.asp";	
	}else if(menuName=="menu_3"){
		location.href="/products/review.asp";
	}else if(menuName=="menu_3_2"){
		location.href="/products/review2.asp";
	}else if(menuName=="menu_4"){
		location.href="/shop/shop_list.asp";
	}else if(menuName=="menu_4_1"){
		location.href="/shop/cart.asp";
	}else if(menuName=="menu_4_2"){
		location.href="/shop/use_infor.asp";
	}else if(menuName=="menu_4_3"){
		location.href="/shop/shop_list.asp?C_TYPE1=101";
	}else if(menuName=="menu_4_4"){
		location.href="/shop/shop_list.asp?C_TYPE1=105";
	}
}
function sub_2(menuName){
	if(menuName=="menu_1"){
		location.href="/community/board_list.asp?B_KIND=14";
	}else if(menuName=="menu_2"){
		location.href="/news/event.asp";
	}
}
function sub_3(menuName){
	if(menuName=="menu_1"){
		location.href="/community/board_list.asp?B_KIND=17";
	}else if(menuName=="menu_2"){
		location.href="/community/board_list.asp?B_KIND=15";
	}else if(menuName=="menu_3"){
		location.href="/community/board_list.asp?B_KIND=16";
	}
}
function sub_4(menuName){
	if(menuName=="menu_1"){
		location.href="/support/as.asp";
	}else if(menuName=="menu_2"){
		location.href="/community/board_list.asp?B_KIND=18";	
	}
}
function sub_5(menuName){
	if(menuName=="menu_1"){
		location.href="/mypage/mypage.asp";
	}else if(menuName=="menu_2"){
		location.href="/mypage/mycart.asp";
	}else if(menuName=="menu_3"){
		location.href="/mypage/out.asp";
	}
}
function sub_6(menuName){
	if(menuName=="menu_1"){
		location.href="/join/join_1.asp";
	}else if(menuName=="menu_2"){
		location.href="/join/login.asp";
	}else if(menuName=="menu_3"){
		location.href="/join/id_pw.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 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('/join/search_id.asp?M_ID='+fmvalue,'ID_CHECK','width=310,height=200,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('/join/search_ad.asp','POST1_SEARCH','width=310,height=300,scrollbars=0,status=0,resizable=0');
}

/* ¿ìÆí¹øÈ£ Ã£±â2 */
function post_check2(kind){
    	window.open('/shop/search_ad.asp?kind='+kind,'POST1_SEARCH','width=310,height=300,scrollbars=0,status=0,resizable=0');
}
/* ¿ìÆí¹øÈ£ Ã£±â3 */
function post_check3(kind){
    	window.open('/support/search_ad.asp','POST1_SEARCH','width=310,height=300,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;
}

/*±Û»óÀÚ¾ÈÀÇ Ã·ºÎ ÀÌ¹ÌÁö »èÁ¦ */
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_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_Add_d(a,b,c,e,f) {     //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_Add_d.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.localAdd_d.A_PWD.focus();
   	document.localAdd_d.A_ANUMBER.value = f;
}

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();
	
}		
