document.write("<script src='/js/default_add.js'></script>");//Ãß°¡ÀûÀÎ ÇÔ¼ö Á¤ÀÇ
document.write("<script src='/js/menu.js'></script>");//Ãß°¡ÀûÀÎ ÇÔ¼ö Á¤ÀÇ

/******************************************************************/
/*							Æû Ã¼Å©¸¦ À§ÇÑ ÇÔ¼ö½ÃÀÛ	   			  */
/******************************************************************/
function writeSubmit(form){
	var arrAttr  = new Array ("required", "trim", "minlength", "email", "nospace");
    wrestMsg = "";
    wrestFld = null;
    var attr = null;

    // ÇØ´çÆû¿¡ ´ëÇÑ ¿ä¼ÒÀÇ °¹¼ö¸¸Å­ µ¹·Á¶ó
    for (var i = 0; i < form.elements.length; i++) {
		// Input tag ÀÇ type ÀÌ text, file, password ÀÏ¶§¸¸
        if (form.elements[i].type == "text" || 
			form.elements[i].type == "file" || 
            form.elements[i].type == "password" ||
			form.elements[i].type == "select-one" || 
            form.elements[i].type == "textarea") {
            // ¹è¿­ÀÇ ±æÀÌ¸¸Å­ µ¹·Á¶ó
            for (var j = 0; j < arrAttr.length; j++) {
				// ¹è¿­¿¡ Á¤ÀÇÇÑ ¼Ó¼º°ú ºñ±³ÇØ¼­ ¼Ó¼ºÀÌ ÀÖ°Å³ª °ªÀÌ ÀÖ´Ù¸é
                if (form.elements[i].getAttribute(arrAttr[j]) != null) {
					switch (arrAttr[j]) {
						case "required"  : wrestRequired(form.elements[i]); break;
                        case "trim"      : wrestRequired(form.elements[i]); break;
                        case "minlength" : wrestMinlength(form.elements[i]); break;
                        case "email"     : wrestEmail(form.elements[i]); break;
                        case "nospace"   : wrestNospace(form.elements[i]); break;
                        default : break;
                    }
                }
            }
        }
	}

    // ÇÊµå°¡ null ÀÌ ¾Æ´Ï¶ó¸é ¿À·ù¸Þ¼¼Áö Ãâ·ÂÈÄ Æ÷Ä¿½º¸¦ ÇØ´ç ¿À·ù ÇÊµå·Î ¿Å±è
    // ¿À·ù ÇÊµå´Â ¹è°æ»ö»óÀ» ¹Ù²Û´Ù.
    if (wrestFld != null) {
		alert(wrestMsg);
//      wrestFld.style.backgroundColor = wrestFldBackColor;
        wrestFld.focus();
        return false;
    }

    if (form.oldsubmit && form.oldsubmit() == false)  {
		return false;
    }

    return true;
}

function wrestItemname(fld){
        var itemname = fld.getAttribute("itemname");
        if (itemname != null && itemname != "")
            return itemname;
        else
            return fld.name;
}

// ¾çÂÊ °ø¹é ¾ø¾Ö±â
function wrestTrim(fld){
	var pattern = /(^\s*)|(\s*$)/g; // \s °ø¹é ¹®ÀÚ
    fld.value = fld.value.replace(pattern, "");
    return fld.value;
}

function wrestRequired(fld){
	if (wrestTrim(fld) == "") {
		if (wrestFld == null) {
			if(fld.type == "select-one"){
				wrestMsg = wrestItemname(fld) + "À»(¸¦) ¼±ÅÃÇØÁÖ¼¼¿ä.\n";
			}else{
				wrestMsg = wrestItemname(fld) + "´Â(Àº) ÇÊ¼ö ÀÔ·Â»çÇ×ÀÔ´Ï´Ù.\n";
			}
			wrestFld = fld;
		}
    }
}

    // ÃÖ¼Ò ±æÀÌ °Ë»ç
function wrestMinlength(fld){
	var len = fld.getAttribute("minlength");
    if (fld.value.length < len) {
		if (wrestFld == null) {
			wrestMsg = wrestItemname(fld) + "´Â(Àº) ÃÖ¼Ò " + len + "ÀÚ ÀÌ»ó ÀÔ·ÂÇÏ¼¼¿ä.\n";
            wrestFld = fld;
        }
    }
}

// ÀüÀÚ¸ÞÀÏÁÖ¼Ò Çü½Ä °Ë»ç
function wrestEmail(fld){
    if (!wrestTrim(fld)) return;
	//var pattern = /(\S+)@(\S+)\.(\S+)/; ÀüÀÚ¸ÞÀÏÁÖ¼Ò¿¡ ÇÑ±Û »ç¿ë½Ã
    var pattern = /([0-9a-zA-Z_-]+)@([0-9a-zA-Z_-]+)\.([0-9a-zA-Z_-]+)/;
		if (!pattern.test(fld.value)) {
			if (wrestFld == null) {
				wrestMsg = wrestItemname(fld) + "´Â(Àº) ÀüÀÚ¸ÞÀÏÁÖ¼Ò Çü½ÄÀÌ ¾Æ´Õ´Ï´Ù.\n";
                wrestFld = fld;
            
        }
    }
}
/******************************************************************/
/*							Æû Ã¼Å©¸¦ À§ÇÑ ÇÔ¼ö ³¡		   		  */
/******************************************************************/

//¼ýÀÚ¸¸ ÀÔ·Â
function int_format(form){
  if(isNaN(form.value)){	
    form.value=parseInt(form.value);
	if(form.value=="NaN")form.value="";
    return;
  }
}

//±Ý¾× ³ªÅ¸³»´Â ÇÔ¼ö
function number_format(form){
	if(event.keyCode!=9){//ÅÜÅ°ÀÏ°æ¿ì »ý·«
		if(!form.value)form.value="";
		var varTotalSize;
		varTotalSize=form.value.replace(/,/gi,"");//,Á¦°Å
		varTotalSize=parseInt(varTotalSize);//¼ýÀÚÇüÅÂ·Î º¯È¯
		varTotalSize=varTotalSize.toLocaleString().split(".")[0];
		form.value=varTotalSize;
		if(form.value=="NaN"){
			form.value="";
		}
	}
}

function engnum_format(form){//¼ýÀÚ ¿µ¹® Ã¼Å©ÇÔ¼ö
    if((/[^(A-Z)^(a-z)^(0-9)]/).test(form.value)){ 
        //alert("¿µ¹®°ú ¼ýÀÚ¸¸ »ç¿ëÇÏ¼¼¿ä"); 
        form.value="";
        return;
    }
}

function company_format(form){//»ç¾÷ÀÚµî·Ï¹øÈ£¸¦ ÀÔ·ÂÇÒ¶§
	if(event.keyCode==9);//ÅÜÅ°ÀÏ°æ¿ì »ý·«
	var date=form.value;
	if(form.value.length==3){
		date=form.value+"-";
	}
	if(form.value.length==6){
		date=form.value+"-";
	}
	/*if(form.value.length < 12){
		for(var i=0;i < 12;i++){
			date+=form.value.charAt(i));
		}
	}else{
		return false;
	}*/
	form.value=date;
}

function date_format(form){//ÀÏÀ» ÀÔ·ÂÇÒ¶§
	if(event.keyCode==9);//ÅÜÅ°ÀÏ°æ¿ì »ý·«
	var date=form.value;
	if(form.value.length==4){
		date=form.value+"-";
	}
	if(form.value.length==7){
		date=form.value+"-";
	}
	form.value=date;
}

function month_format(form){//¿ùÀ» ÀÔ·ÂÇÒ¶§
	if(event.keyCode==9);//ÅÜÅ°ÀÏ°æ¿ì »ý·«
	var date=form.value;
	if(form.value.length==4){
		date=form.value+"-";
	}
	form.value=date;
}

function sec_format(form){//½ÃºÐÃÊ ±îÁö ÀÔ·Â
	if(event.keyCode==9);//ÅÜÅ°ÀÏ°æ¿ì »ý·«
	var date=form.value;
	if(form.value.length==4){
		date=form.value+"-";
	}
	if(form.value.length==7){
		date=form.value+"-";
	}
	if(form.value.length==10){
		date=form.value+" ";
	}
	if(form.value.length==13){
		date=form.value+":";
	}
	if(form.value.length==16){
		date=form.value+":";
	}
	form.value=date;
}

//ÁÖ¹Î¹øÈ£ Çü½Ä
function Jumin(jumin1,jumin2){//ÁÖ¹Îµî·Ï¹øÈ£ Çü½Ä
  	juminNo = new Array(13);
		var i;
		var jumin_str = jumin1+jumin2;

		for(i=0;i<13;i++){
			juminNo[i] = jumin_str.substr(i,1);
    }

		var TotNo = juminNo[0]*2 + juminNo[1]*3 + juminNo[2]*4 + juminNo[3]*5 + juminNo[4]*6 + juminNo[5]*7 + juminNo[6]*8 + juminNo[7]*9 + juminNo[8]*2 + juminNo[9]*3 + juminNo[10]*4 + juminNo[11]*5;
		var tempNo = TotNo % 11;
		var resultNo = 11 - tempNo;

		if(resultNo >= 10){
			resultNo = resultNo % 10;
		}
		if(eval(juminNo[12]) != resultNo){
			return false;
		}else{
      return true;
    }
}

function checkBizID( bizID )
{
bizID=bizID.split("-").join("");
if(bizID.length != 10){
		alert("»ç¾÷ÀÚµî·Ï¹øÈ£°¡ Àß¸øµÇ¾ú½À´Ï´Ù.");
		return false;
}
// bizID´Â ¼ýÀÚ¸¸ 10ÀÚ¸®·Î ÇØ¼­ ¹®ÀÚ¿­·Î ³Ñ±ä´Ù.
var checkID = new Array(1, 3, 7, 1, 3, 7, 1, 3, 5, 1);
var tmpBizID, i, chkSum=0, c2, remander;

for (i=0; i<=7; i++) chkSum += checkID[i] * bizID.charAt(i);

c2 = "0" + (checkID[8] * bizID.charAt(8));
c2 = c2.substring(c2.length - 2, c2.length);

chkSum += Math.floor(c2.charAt(0)) + Math.floor(c2.charAt(1));

remander = (10 - (chkSum % 10)) % 10 ;

if (Math.floor(bizID.charAt(9)) == remander) return true; // OK!
alert("»ç¾÷ÀÚµî·Ï¹øÈ£°¡ Àß¸øµÇ¾ú½À´Ï´Ù.");
return false;
} 


/*
function setCookie(name, value, expire) {
  document.cookie = name + "=" + escape(value) + ((expire == null) ? "" : ("; expires=" + expire.toGMTString()));
}
*/

function setCookie(name,value,expiredays) 
{ 
        var todayDate = new Date(); 
        todayDate.setDate(todayDate.getDate() + expiredays); 
        document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" 
} 


function getCookie(Name) {	
  var search = Name + "=";
  if (document.cookie.length > 0) {                    // if there are any cookies
     offset = document.cookie.indexOf(search);
     if (offset != -1){                                               // if cookie exists
        offset += search.length;                             // set index of beginning of value
        end = document.cookie.indexOf(";", offset);   // set index of end of cookie value
        if (end == -1) 
           end = document.cookie.length;
        return unescape(document.cookie.substring(offset, end));
     } 
  }
}


function LODING(){//·Îµù¹Ù¸¦ À§ÇÑ ÇÔ¼ö
  var width=50;
  var height=50;
  var ModalHeight="";
  if(document.body.clientHeight <= document.body.scrollHeight){
	ModalHeight = "";
  }else{
	ModalHeight = document.body.scrollHeight;
  }

  var s_y=document.body.scrollTop;//½ºÅ©·Ñ ÇßÀ»°æ¿ì¿¡µµ °è»êÇÑ´Ù
  var windowHeight=document.body.clientHeight;
  var top=(windowHeight/2)-100+s_y;
  var IMG="";
  IMG+="<div id='_MODAL'>";
  IMG+="  <div id='_BACK' style='position:absolute;left:0;top:0;background:000000;filter: Alpha(Opacity=50);'></div>";
  IMG+="  <div id='_LODING' style='position:absolute;left:0;top:"+top+";width:100%;height:"+ModalHeight+";z-index:10;' align=center>";
  IMG+="    <div id='_LODING1' style='background:#EEEEEE;padding:5;width:40;height:40;'>";
  IMG+="		<div id='_FRAMESHOW1' style=background:FFFFFF;width:"+width+";height:"+height+";display:'none';overflow:;>";
  IMG+="			<div style='background:FFFFFF;width:50;height:50'><br><img src='/images/public/statebar.gif'></div>";
  IMG+="		</div>";
  IMG+="      <div id='_FRAMESHOW2' style='display:block;background:FFFFFF;width:30;height:30;padding:10' align=left><img src='/images/public/statebar.gif'></div>";
  IMG+="    </div>";
  IMG+="  </div>";
  IMG+="</div>";
  document.body.lastChild.insertAdjacentHTML("afterEnd",IMG);
  document.getElementById("_BACK").style.height=document.body.scrollHeight;
  document.getElementById("_BACK").style.width=document.body.scrollWidth;
}


//¸ð´Þ·Î ¾ÆÀÌÇÁ·¹ÀÓ Ã³¸® ÇÏ´Â ÇÔ¼ö ½ÃÀÛ
function MODALIFRAME(src,width,height){//·Îµù¹Ù¸¦ À§ÇÑ ÇÔ¼ö
  var ModalHeight="";
  if(document.body.clientHeight <= document.body.scrollHeight){
	ModalHeight = "";
  }else{
	ModalHeight = document.body.scrollHeight;
  }

  var s_y=document.body.scrollTop;//½ºÅ©·Ñ ÇßÀ»°æ¿ì¿¡µµ °è»êÇÑ´Ù
  var windowHeight=document.body.clientHeight;
  var top=(windowHeight/2)-100+s_y;
  var IMG="";
  IMG+="<div id='_MODAL'>";
  IMG+="  <div id='_BACK' style='z-index:1000' style='position:absolute;left:0;top:0;background:000000;filter: Alpha(Opacity=50);'></div>";
  IMG+="  <div id='_LODING' style='position:absolute;left:0;top:"+top+";width:100%;height:"+ModalHeight+";z-index:1001;' align=center>";
  IMG+="    <div id='_LODING1' style='background:#EEEEEE;padding:10;width:40;height:40;'>";
  IMG+="		<div id='_FRAMESHOW1' style=background:FFFFFF;width:"+width+";height:"+height+";display:'none';overflow:;>";
  IMG+="      <table cellpadding=0 cellspacing=0 width=100% border=0>";
  IMG+="		<tr><td align=right><table width=16 cellpadding=0 border=0 cellspacing=0><td><img src='/images/public/modal_close.gif' style='position:absolute' onclick=MODALDEL() style='cursor:hand'></td></tr></table></td></tr></table>";
  IMG+="		<tr><td> ";
  IMG+="			<iframe name='_SRCIFRAME' onload='MODALSHOW();' src='"+src+"' scrolling=no frameborder=0 style='width:"+width+";height:"+height+"'></iframe>";
  IMG+="		</td></tr>";
  IMG+="      </table>";
  IMG+="		</div>";
  IMG+="      <div id='_FRAMESHOW2' style='display:block;background:FFFFFF;width:30;height:30;padding:10' align=left><img src='/images/public/statebar.gif'></div>";
  IMG+="    </div>";
  IMG+="  </div>";
  IMG+="</div>";
  document.body.lastChild.insertAdjacentHTML("afterEnd",IMG);
  document.getElementById("_BACK").style.height=document.body.scrollHeight;
  document.getElementById("_BACK").style.width=document.body.scrollWidth;
}

function MODALSHOW(){//º¸ÀÌ±â
	_FRAMESHOW2.style.display='none';
	_FRAMESHOW1.style.display='block';
}

function MODALRESIZETO(width,height){
  resizeTo(width,height);//»çÀÌÁî¸¦ ¸®»çÀÌÁîÇÑ´Ù
  document.onLoad=LocationTop(width,height);//¸ð´ÞÀÌ ¸ðµÎ È£Ãâ µÇ¾úÀ»¶§ ÇÔ¼ö¸¦ È£Ãâ
  function LocationTop(width,height){
	var s_y=parent.document.body.scrollTop;//½ºÅ©·Ñ ÇßÀ»°æ¿ì¿¡µµ °è»êÇÑ´Ù
	var windowHeight=parent.document.body.clientHeight;
	var top=(windowHeight/2)-(height/2)+s_y;
	var maxHeight=parent.document.body.clientHeight;//·¹ÀÌ¾î ÆË¾÷ÀÇ ÃÖ´ë Å©±â

	parent.MODALSHOW();//³»¿ëÆäÀÌÁö º¸ÀÌ°ÔÇÔ
	parent._LODING.style.top=top;//À§Ä¡¸¦ Ç¥½Ã

	parent._FRAMESHOW1.style.height=height;
	parent._FRAMESHOW1.style.width=width
	
	if(height>=maxHeight){//³ôÀÌ°¡ ³Ê¹« Å¬°æ¿ì ½ºÅ©·Ñ »ý¼º
		parent._LODING.style.top=50;//·¹ÀÌ¾î ÆË¾÷ÀÌ ±æ°æ¿ì °íÁ¤À¸·Î º¸¿©ÁØ´Ù
		parent._FRAMESHOW1.style.height=maxHeight;
		parent._FRAMESHOW1.style.width=width+30;
		parent._FRAMESHOW1.style.overflow="auto";
	}

  }
}


function MODALDEL(){//¸ð´Þ»èÁ¦
	document.getElementById("_FRAMESHOW1").innerHTML="";//Å¬¸¯ÀÌ ¾ÈµÇ´Â ¹®Á¦¸¦ À§ÇØ ³»¿ëÀ» Á¦°Å
	document.getElementById("_FRAMESHOW2").innerHTML="";//Å¬¸¯ÀÌ ¾ÈµÇ´Â ¹®Á¦¸¦ À§ÇØ ³»¿ëÀ» Á¦°Å
	document.getElementById("_MODAL").removeNode(true);
}


//¸ð´Þ·Î ¾ÆÀÌÇÁ·¹ÀÓ Ã³¸® ÇÏ´Â ÇÔ¼ö ³¡


function NOMODALIFRAME(src,width,height){//·Îµù¹Ù¸¦ À§ÇÑ ÇÔ¼ö
  var ModalHeight="";
  if(document.body.clientHeight <= document.body.scrollHeight){
	ModalHeight = "";
  }else{
	ModalHeight = document.body.scrollHeight;
  }

  var s_y=document.body.scrollTop;//½ºÅ©·Ñ ÇßÀ»°æ¿ì¿¡µµ °è»êÇÑ´Ù
  var windowHeight=document.body.clientHeight;
  var top=(windowHeight/2)-100+s_y;
  var IMG="";
  IMG+="<div id='_MODAL'>";

  IMG+="  <div id='_LODING' style='position:absolute;left:0;top:"+top+";width:100%;height:"+ModalHeight+";z-index:1001;' align=center>";
  IMG+="    <div id='_LODING1' style='background:#EEEEEE;padding:10;width:40;height:40;'>";
  IMG+="		<div id='_FRAMESHOW1' style=background:FFFFFF;width:"+width+";height:"+height+";display:'none';overflow:;>";
  IMG+="      <table cellpadding=0 cellspacing=0 width=100% border=0>";
  IMG+="		<tr><td align=right><table width=16 cellpadding=0 border=0 cellspacing=0><td><img src='/images/public/modal_close.gif' style='position:absolute' onclick=MODALDEL() style='cursor:hand'></td></tr></table></td></tr></table>";
  IMG+="		<tr><td> ";
  IMG+="			<iframe name='_SRCIFRAME' onload='MODALSHOW();' src='"+src+"' scrolling=no frameborder=0 style='width:"+width+";height:"+height+"'></iframe>";
  IMG+="		</td></tr>";
  IMG+="      </table>";
  IMG+="		</div>";
  IMG+="      <div id='_FRAMESHOW2' style='display:block;background:FFFFFF;width:30;height:30;padding:10' align=left><img src='/images/public/statebar.gif'></div>";
  IMG+="    </div>";

  IMG+="</div>";
  document.body.lastChild.insertAdjacentHTML("afterEnd",IMG);
  document.getElementById("_BACK").style.height=document.body.scrollHeight;
  document.getElementById("_BACK").style.width=document.body.scrollWidth;
}


function fileFilter( obj , ext){//ÆÄÀÏÀ» °É·¯ÁÖ´Â ÇÔ¼ö fileFilter(this,'jpg&png&gif')
 var filterStr = new Array();
 ext=ext.toUpperCase();
 filterStr=ext.split("&");
 var str = obj.value.substring(obj.value.lastIndexOf(".")+1).toUpperCase();
 for(i=0; i<filterStr.length; i++){
  if(str==filterStr[i]){
   return true;
  }
 }
 if(obj.value){
	 alert("È®ÀåÀÚ "+str+"Àº(´Â) »ç¿ëÇÏ½Ç¼ö ¾ø½À´Ï´Ù.");
	 obj.select();
	 document.selection.clear();
	 return false;
 }
}


function Flash(Ftrans,wid,hei) {//Ç®´Ù¿î¸Þ´º
	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0' width='"+wid+"' height='"+hei+"'>");
	document.write("<param name='movie' value='"+Ftrans+"'>");
	document.write("<param name='quality' value='high'>");
	document.write("<param name='wmode' value='transparent'>");
	document.write("<param name='FlashVars' value='mainNo=<?=$left?>'>");
	document.write("<param name='allowScriptAccess' value='always' />");
	document.write("<embed src='"+Ftrans+"' quality='high' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash' allowScriptAccess='always' type='application/x-shockwave-flash' width='"+wid+"' height='"+hei+"'>");
	document.write("</embed>");
	document.write("</object>");
}

function Flash2(Ftrans,wid,hei,flashvar) {//Ç®´Ù¿î¸Þ´º
	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0' width='"+wid+"' height='"+hei+"' FlashVars='"+flashvar+"'>");
	document.write("<param name='movie' value='"+Ftrans+"'>");
	document.write("<param name='quality' value='high'>");
	document.write("<param name='wmode' value='transparent'>");
	document.write("<param name='FlashVars' value='"+flashvar+"'>");
	document.write("<param name='allowScriptAccess' value='always' />");
	document.write("<embed src='"+Ftrans+"' quality='high' wmode='transparent' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash' allowScriptAccess='always' type='application/x-shockwave-flash' width='"+wid+"' height='"+hei+"' FlashVars='"+flashvar+"'>");
	document.write("</embed>");
	document.write("</object>");
}

function setUCC(text){//ucc°ü·Ã Å×±×
	document.write(text);
}


//¾ÆÀÌÇÁ·¹ÀÓ ¸®»çÀÌÁî
function RESIZETO(width){
  var height=document.body.scrollHeight;
  resizeTo(width,height)
}

function RESIZE(){//¼¼·Î°ª¾øÀÌ ¸®»çÀÌÁîÇÏ±â
  var height=document.body.scrollHeight;
  var width=document.body.scrollWidth;
  resizeTo(width,height)
}

function modal_zip(frm_name, dir, frm_zip1, frm_zip2, frm_addr1, frm_addr2){//¿ìÆí¹øÈ£ °Ë»ö
	url = dir+'default/zip_search.php?frm_name='+frm_name+'&frm_zip1='+frm_zip1+'&frm_zip2='+frm_zip2+'&frm_addr1='+frm_addr1+'&frm_addr2='+frm_addr2;
	MODALIFRAME(url,505,330);
//	window.open(url, "mbzip", opt);
}

function modal_search(frm_name, dir, frm_zip1, frm_zip2, frm_addr1, frm_addr2){//Áö¿ª°Ë»ö ÇÊµå °ª
	url = dir+'default/zip_search1.php?frm_name='+frm_name+'&frm_zip1='+frm_zip1+'&frm_zip2='+frm_zip2+'&frm_addr1='+frm_addr1+'&frm_addr2='+frm_addr2;
	MODALIFRAME(url,505,330);
//	window.open(url, "mbzip", opt);
}


document.onclick=SUBMENUNULL

function SUBMENUNULL(){
	setTimeout(NULL,300); 
	function NULL(){
		try{
			_SUBMENU.innerHTML="";
		}catch (e){
		}
	}
}

function inFocus1(i) {
	(i).style.border='2px solid #F96032';
}
function outFocus1(i) {
	(i).style.border='2px solid #cccccc';
}

//»ç¿ë¹ý nextFocus(this,maxlength°¹¼ö) nextFocus(this,1)
function nextFocus(field,max) {//Ä¿¼­ ÀÚµ¿ÀÌµ¿ 
  var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;		
  if (keyCode == 13||max==field.value.length) {
  var i;
	for (i = 0; i < field.form.elements.length; i++){
	  if (field == field.form.elements[i])break;
 	}
    i = (i + 1) % field.form.elements.length;
    field.form.elements[i].focus();//Æ÷Ä¿½ºÀÌµ¿
    return false;
  }else{
    return true;
  }
}

function getDirectSelect(num,select,son){//´ÙÀÌ·ºÆ® ¼¿·ºÆ®¸¦ À§ÇÑ ÇÔ¼ö
  var getPost="post";
  var urlFileAppl="/DCATEGORY/?p=directSelect&v=n";//½ÇÇàµÇ´Â ÆäÀÌÁö
  var trueFalse=true;
  var sendData="num="+encodeURIComponent(num)+"&select="+encodeURIComponent(select)+"&son="+encodeURIComponent(son);	
  openSendStatus(getPost, urlFileAppl, trueFalse, sendData,"DirectmainControl(xmlHttp)")
}
function DirectmainControl(xmlHttp){//µ¥ÀÌÅÍ¸¦ ¹Þ¾Æ¼­ Ã³¸®ÇÏ´ÂºÎºÐ
  var xmlHttpData = xmlHttp.responseText;
  eval(xmlHttpData);
}




//½½¶óÀÌµåµÇ´Â ÇÔ¼ö ºÎºÐ ½ÃÀÛ
TextSlider = function(className) {
    document.write("<div id='TextSliderPLayer_"+ className +"'><div id='TextSliderLayer_"+ className +"'></div></div>");

    this.item = [];
    this.width = this.height = this.speed = this.pixel = this.interval =
        this.size = this.moveCount = this.X = this.Y = 0;
    this.direction = "";
    this.pLayer = document.getElementById("TextSliderPLayer_"+ className);
    this.layer = document.getElementById("TextSliderLayer_"+ className);
    this.align = "left";
    this.intervalId = null;
    this.className = className;
    this.isPause = false;
}
TextSlider.prototype.init = function() {
    with (this.pLayer.style) {
        width = this.width+"px";
        height = this.height+"px";
        overflow = "hidden";
    }
    with (this.layer.style) {
        width = this.direction=='up' || this.direction=='down' ? this.width+"px" : this.size*(this.item.length+1)+"px";
        height = this.direction=='up' || this.direction=='down' ? this.size*(this.item.length+1)+"px" : this.height+"px";
        top = 0;
        left = 0;
        position = "relative";
    }
    for (var i=0; i<parseInt(this.height / this.size, 10)+1; i++)
        this.item[this.item.length] = this.item[i];
    switch (this.direction) {
        case "up": this.X = this.Y = 0; break;
        case "down": this.X = 0; this.layer.style.top = this.Y = -this.size*(this.item.length-1); break;
        case "left": this.X = this.Y = 0; break;
        case "right": this.Y = 0; this.layer.style.left = this.X = -this.size*(this.item.length-1); break;
    }
    var __html = "<div onmouseover='"+this.className+".pause()' onmouseout='"+this.className+".unpause()'>";
    if (this.direction=='up' || this.direction=='down') {
        __html += "<table width='"+ this.layer.style.width +"' cellspacing='0' cellpadding='0' border='0'>";
        for (var i in this.item)
            __html += "<tr><td height='"+this.size+"' style='overflow:hidden' align='"+this.align+"' valign='top'>"+this.item[i]+"</td></tr>";
        __html += "</table>";
    } else {
        __html += "<table cellspacing='0' cellpadding='0' border='0'><tr>";
        for (var i in this.item)
            __html += "<td width='"+this.size+"' height='"+ this.layer.style.height +"' align='"+this.align+"' \
                valign='top' style='overflow:hidden;'>"+this.item[i]+"</td>";
        __html += "</tr></table>";
    }
    __html += "</div>";
    this.layer.innerHTML = __html;
    this.start();
}
TextSlider.prototype.start = function() {
    this.intervalId = setInterval(this.className+".move()", this.speed);
}
TextSlider.prototype.move = function() {
    if (this.isPause) return;
    switch (this.direction) {
        case "up": this.Y -= this.pixel; break;
        case "down": this.Y += this.pixel; break;
        case "left": this.X -= this.pixel; break;
        case "right": this.X += this.pixel; break;
    }
    if (this.direction=='up' || this.direction=='down') {
        if (Math.abs(this.Y)%this.size==0) this.stop();
        this.layer.style.top = this.Y;
    } else {
        if (Math.abs(this.X)%this.size==0) this.stop();
        this.layer.style.left = this.X;
    }
}
TextSlider.prototype.stop = function() {
    clearInterval(this.intervalId);
    switch (this.direction) {
    case "up":
        if (Math.abs(this.Y) >= parseInt(this.layer.style.height,10)-this.size) this.Y = this.layer.style.top = 0;
        break;

    case "down":
        if (Math.abs(this.Y) <= 0) this.Y = this.layer.style.top = -this.size*(this.item.length-1);
        break;

    case "left":
        if (Math.abs(this.X) >= parseInt(this.layer.style.width,10)-this.size) this.X = this.layer.style.left = 0;
        break;

    case "right":
        if (Math.abs(this.X) <= 0) this.X = this.layer.style.left = -this.size*(this.item.length-1);
        break;
    }
    setTimeout(this.className+".start()", this.interval);
}
TextSlider.prototype.pause = function() {this.isPause = true;}
TextSlider.prototype.unpause = function() {this.isPause = false;}

//½½¶óÀÌµåµÇ´Â ÇÔ¼ö ºÎºÐ ³¡


function SWFTITLE(text){//ÇÃ·¡½Ã Å¸ÀÌÆ²
	Flash("/flash/title_bar.swf?str="+text,300,32);
}

//ÇÁ¸°Æ®¸¦ À§ÇÑ ºÎºÐ
var initBody;
var PrintName;
function beforePrint(){ 
	try{
	 initBody = document.body.innerHTML; 
	 document.body.innerHTML = PrintName.innerHTML;
	}catch(e){}
} 

function afterPrint(){ 
 document.body.innerHTML = initBody; 
} 


function printArea(name) {
 var PrintName=name
 var ret = window.print();
}

window.onbeforeprint = beforePrint; 
window.onafterprint = afterPrint; 
//ÇÁ¸°Æ®¸¦ À§ÇÑ ºÎºÐ ³¡ºÎºÐ