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.01
	var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_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_showHideLayers() { //v6.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; }
}

function f_resize_iframe(w, h, t) {
	document.getElementById(t).style.width  = w ;
	document.getElementById(t).style.height = h ;
}

function clickshow(num, url) {
	var menu="";
	var menu_1="";

	 for (i=1;i<=4;i++)
	 {
			menu=eval("document.all.menu"+i+".style");
			menu.display="block";
			/*if (num==i)  
			{								
				if (menu.display=="block"){		
					menu.display="none";		
				}else{							
					menu.display="block";		
				}								
			}else{								
				menu.display="none";			
			}*/
	}	

	if (url != "") {
		parent.ifrmBody.location.href = url;
	}
}

function nextFocus(str,order,size) { // ÀÚµ¿ ´ÙÀ½ Æû ÀÌµ¿
	num = str;
	siz = num.length;
	numFlag = Number(num);
	if(!numFlag) return false;
	
	if(siz == size) {
		order.focus();
		return true;
	}
}

// ÀÍ½ºÇÃ·Î·¯ ¿À·ù¿¡ µû¸¥ ½ºÅ©¸³Æ®(OBJECT µî)
function __ws__(id) {
	document.write(id.text); id.id="";
}

// ÀÌ¹ÌÁö º¸±â
function imageView(path) {
	var imgwin = window.open("",'ÀÌ¹ÌÁöº¸±â','scrollbars=yes,status=yes,toolbar=no,resizable=yes,location=no,menu=no,width=10,height=10');
	imgwin.focus();
	imgwin.document.open();
	imgwin.document.write("<html><head><title>ÀÌ¹ÌÁöº¸±â</title></head>"); 
	imgwin.document.write("<sc"+"ript language='javascript'>\n");
	imgwin.document.write("function resize() {\n");
	imgwin.document.write("pic = document.image;\n");
	imgwin.document.write("if (eval(pic).height) {\n");
	imgwin.document.write("var name = navigator.appName;\n");
	imgwin.document.write("if (name == 'Microsoft Internet Explorer') {\n");
	imgwin.document.write("myHeight = eval(pic).height + 40;\n");
	imgwin.document.write("myWidth = eval(pic).width+ 10;\n");
	imgwin.document.write("} else {\n");
	imgwin.document.write("myHeight = eval(pic).height + 9;\n");
	imgwin.document.write("myWidth = eval(pic).width;\n");
	imgwin.document.write("}\n");
	imgwin.document.write("var heightPic = pic.height;\n");
	imgwin.document.write("var widthPic = pic.width;\n");
	imgwin.document.write("if (widthPic <= 1024 && heightPic <= 768){\n");
	imgwin.document.write("self.resizeTo(myWidth, myHeight+20);\n");
	imgwin.document.write("self.moveTo(80,80);\n");
	imgwin.document.write("document.body.style.overflow='hidden';\n");
	imgwin.document.write("} else {\n");
	imgwin.document.write("if (widthPic > 1024 && heightPic <= 768) {\n");
	imgwin.document.write("self.resizeTo(1024, myHeight+20);\n");
	imgwin.document.write("self.moveTo(80,80);\n");
	imgwin.document.write("} else if (widthPic <= 1024 && heightPic > 768) {\n");
	imgwin.document.write("self.resizeTo(myWidth+20, 768);\n");
	imgwin.document.write("self.moveTo(80,80);\n");
	imgwin.document.write("} else {\n");
	imgwin.document.write("self.resizeTo(1024, 768);\n");
	imgwin.document.write("self.moveTo(80,80);\n");
	imgwin.document.write("}\n");
	imgwin.document.write("}\n");
	imgwin.document.write("} else setTimeOut(resize(), 100);\n");
	imgwin.document.write("}\n");
	imgwin.document.write("</sc"+"ript>\n");
	imgwin.document.write("</head>\n");
	imgwin.document.write("<body bgcolor='#FFFFFF' style='margin:0'>\n");
	imgwin.document.write("<div align='center' valign='middle'><a href='javascript:self.close()' onfocus='this.blur()'><img border='0' src='"+path+"' xwidth='10' xheight='9' name='image' onload='resize();'></a></div>\n");
	imgwin.document.write("</body>\n");
	imgwin.document.write("</html>\n");
	imgwin.document.close();
}
