function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.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 MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.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='hide')?'hidden':v; }
    obj.visibility=v; }
}


	//ÀÌ¹ÌÁö Å×·¯ ¹æÁö ½ÃÀÛ - ÀÌ¹ÌÁö ¸®»çÀÌÁî °¡·Î 500ÀÌ»óÀº 500À¸·Î ÁÙÀÓ
	function resize(img) { 
		if(img.width > 500)
		{
			var realwidth=img.width;
			var realwidth2=(500/(img.width))*100;
			var height=parseInt(realwidth2*(img.height)/100);
			img.width = 500;
			img.height = height;
		}
	}
	//ÀÌ¹ÌÁö Å×·¯ ¹æÁö ³¡


	// ¼ýÀÚ¸¸ ÀÔ·Â ½ÃÀÛ
	function onlyNumber()
	{
		if( (event.keyCode<48) || (event.keyCode>57) )
		event.returnValue=false;
	}
	// ¼ýÀÚ¸¸ ÀÔ·Â ³¡


	//textarea Àâ¾Æ²ø±â ½ÃÀÛ
	function RCdragstart(obj) 
	{
		RCobjX = enple.style.pixelWidth;
		RCobjY = enple.style.pixelHeight;
		RCeventX = event.x;
		RCeventY = event.y;
	}
	function RCdrag(obj) 
	{
		obj.style.pixelLeft = event.x - 5;
		obj.style.pixelTop = event.y - 5;
		enple.style.pixelWidth = RCobjX - RCeventX + event.x;
		enple.style.pixelHeight = RCobjY - RCeventY + event.y;
	}
	//textarea Àâ¾Æ²ø±â ³¡


	// °¡¿îµ¥ Ã¢ ¶ç¿ì±â ½ÃÀÛ
	function center_pop(url, name, w, h) 
	{
		var popw = (screen.width - w) / 2; 
		var poph = (screen.height - h) / 2; 
		pop_op = 'height='+h+',width='+w+',top='+poph+',left='+popw;
		window.open(url, name, pop_op);
	}
	function center_pop_s(url, name, w, h) 
	{
		var popw = (screen.width - w) / 2; 
		var poph = (screen.height - h) / 2; 
		pop_op = 'height='+h+',width='+w+',top='+poph+',left='+popw+',scrollbars=yes';
		window.open(url, name, pop_op);
	}
	function center_pop_s2(url, name, w, h) 
	{
		var popw = (screen.width - w) / 2; 
		var poph = (screen.height - h) / 2; 
		pop_op = 'height='+h+',width='+w+',top='+poph+',left='+popw+',scrollbars=no';
		window.open(url, name, pop_op);
	}
	// °¡¿îµ¥ Ã¢ ¶ç¿ì±â ³¡


/*
	//¸¶¿ì½º ¿À¸¥ÂÊ ¸Þ´º ½ÃÀÛ
	var isie=0;
	if(window.navigator.appName=="Microsoft Internet Explorer"&&window.navigator.appVersion.substring(window.navigator.appVersion.indexOf("MSIE")+5,window.navigator.appVersion.indexOf("MSIE")+8)>=5.5){isie=1;}
	else {isie=0;}

	if(isie)
	{
		var html="";
		html+='<TABLE width="100" height="130" style="border:1pt solid #999999" cellspacing="0" cellpadding="3">';
		html+='<SC'+'RIPT LANGUAGE="JavaScript">window.onerror=null;</'+'SCRIPT>\n';
		html+='<TR><TD></TD></TR>';
		html+='<TR height="15"><TD align="right" style="cursor: hand" ONCLICK="window.history.go(-1);"><img src="../images/right_menu_01.gif"></TD></TR>';
		html+='<TR height="15"><TD align="right" style="cursor: hand" ONCLICK="window.history.go(1);"><img src="../images/right_menu_02.gif"></TD></TR>';
		html+='<TR height="15"><TD align="right" style="cursor: hand" ONCLICK="window.parent.location.href=window.parent.location.href;"><img src="../images/right_menu_03.gif"></TD></TR>';
		html+='<TR height="15"><TD align="right" style="cursor: hand" ONCLICK="if(window.parent.document.body.style.zoom!=0) window.parent.document.body.style.zoom*=1.6; else window.parent.document.body.style.zoom=1.6;"><img src="../images/right_menu_04.gif"></TD></TR>';
		html+='<TR height="15"><TD align="right" style="cursor: hand" ONCLICK="if(window.parent.document.body.style.zoom!=0) window.parent.document.body.style.zoom*=0.625; else window.parent.document.body.style.zoom=0.625;"><img src="../images/right_menu_05.gif"></TD></TR>';
		html+='</TABLE>';

		var oPopup = window.createPopup();
	}

	function dopopup(x,y) 
	{
		if(isie) 
		{
			var oPopupBody = oPopup.document.body;
			oPopupBody.innerHTML = html;
			oPopup.show(x, y, 100, 130, document.body);
		}
	}

	function click(e) 
	{
		if(isie) 
		{
			if(document.all) 
			{
				if(event.button==2||event.button==3){dopopup(event.x-1,event.y-1);}
			}
		}
	}

	if(isie) 
	{
		document.oncontextmenu = function() { dopopup(event.x,event.y);return false; }
		document.onmousedown = click;
	}
	//¸¶¿ì½º ¿À¸¥ÂÊ ¸Þ´º ³¡
	*/



	/**
* embed ÆÐÄ¡ Àû¿ë ÄÁÅ×ÀÌ³Ê
* nullÀÎ°æ¿ì document °ªÀ» ±âº»À¸·Î ÇÕ´Ï´Ù
* id°ªÀ» ¼³Á¤ÇÑ°æ¿ì ¼³Á¤¹üÀ§ ³»¿¡¸¸ Àû¿ëÀÌ µË´Ï´Ù
* 
* º»¹®ÀÌ³ª ÀÏºÎ ³ëµå¿¡¸¸ Àû¿ëÇÒ°æ¿ì ÇØ´ç ³ëµåÀÇ id °ªÀ» ÀÔ·ÂÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù
* ¿¹)
* var __embed_target_id = "contents";
* ·Î Ã³¸®ÇÑ°æ¿ì body ³»¿¡ <ÅÂ±× id="contents">ÇÃ·¡½¬,µ¿¿µ»ó...</ÅÂ±×>
* ¾È¿¡ ³»¿ë¿¡¸¸ ÆÐÄ¡°¡ Àû¿ëµË´Ï´Ù
*/
var __embed_target_id = null;

/**
* embed ÆÐÄ¡¸¦ Àû¿ëÇÒ ÅÂ±×¸¦ ¼³Á¤ÇÕ´Ï´Ù
* ±âº»°ªÀº object,eembed,appelt ÅÂ±×ÀÔ´Ï´Ù
* false °ªÀÎ°æ¿ì ÆÐÄ¡¿¡¼­ Á¦¿ÜµË´Ï´Ù
*/
var __embed_tags = {object:true,embed:true,applet:true}


if(document.attachEvent){
	document.write('<style type="text/css">');
	document.write('object,embed{display:none;}');
	document.write('</style>');
	document.attachEvent('onreadystatechange',
		function embed_patch(){
			if(__embed_target_id===null){
				var __target = document;
			}else{
				var __target = document.getElementById(__embed_target_id);
			}
			if (document.readyState == "complete"){
				function _replace(obj){
					var obj_re = document.createElement(obj.outerHTML);					
					obj_re.style.display='inline';
					obj.parentNode.replaceChild(obj_re,obj);
				}
				function _inner(obj){
					obj.style.display='inline';					
					obj.insertAdjacentHTML('beforeBegin',obj.outerHTML);
					obj.parentNode.removeChild(obj);
				}

				if(__embed_tags.object===true){
					var objs = __target.getElementsByTagName('object');
					var i = objs.length;
					while(i-->0){
						_inner(objs[i]);
					}
				}
				if(__embed_tags.embed===true){
					var objs = __target.getElementsByTagName('embed');
					var i = objs.length;
					while(i-->0){
						_replace(objs[i])
					}
				}

				if(__embed_tags.applet===true){
					var objs = __target.getElementsByTagName('applet');
					var i = objs.length;
					while(i-->0){
						_replace(objs[i])
					}
				}
			}
		}
	);
}
