// ·Ñ¿À¹ö ½ºÅ©¸³Æ®

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() { //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; }
}

	
//Á¡¼±¾È»ý±â´Â ½ºÅ©¸³Æ®

	function  bluring(){
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG")  document.body.focus();
}
document.onfocusin=bluring;




var layerHeight = 180; // È­¸é»óÀÇ ·¹ÀÌ¾î ³ôÀÌ.

function CheckUIElements(){
	var yMenuFrom, yMenuTo, yOffset, timeoutNextCheck;

	yMenuFrom   = parseInt (divMenu.style.top, 10);
	yMenuTo     = document.body.scrollTop + layerHeight; // ·¹ÀÌ¾î Y ÁÂÇ¥

	timeoutNextCheck = 500;

	if ( yMenuFrom != yMenuTo ) {
		yOffset = Math.ceil( Math.abs( yMenuTo - yMenuFrom ) / 20 );

		if ( yMenuTo < yMenuFrom ) {
			yOffset = -yOffset;
		}

		divMenu.style.top = parseInt (divMenu.style.top, 10) + yOffset;

		timeoutNextCheck = 10;
	}

	setTimeout ("CheckUIElements()", timeoutNextCheck);
}

function stalkerLayerFromTop(stalkerLayer, stalkerLayerHeight) {
	if (stalkerLayer == "" || stalkerLayer == null) {
		return false;
	}

	stalkerLayerHeight = stalkerLayerHeight;
	divMenu = stalkerLayer;
	divMenu.style.top = document.body.scrollTop + layerHeight;  //ÀÍ½ºÇÃ·Î·¯¿ë ·¹ÀÌ¾î Y ÁÂÇ¥
	divMenu.style.visibility = "visible";
	CheckUIElements();
	return true;
}

function allblur() {
	for (i = 0; i < document.links.length; i++)
		document.links[i].onfocus = document.links[i].blur;
}


////»õÃ¢


function view(what) { 
var imgwin = window.open("",'WIN','scrollbars=no,status=no,toolbar=no,resizable=no,location=no,menu=no,width=500,height=700,left=0,top=0'); 
imgwin.focus(); 
imgwin.document.open(); 
imgwin.document.write("<html>\n"); 
imgwin.document.write("<head>\n"); 
imgwin.document.write("<title>ÀÌ¹ÌÁö</title>\n"); //¿ÀÇÂÃ¢ Å¸ÀÌÆ² ÀÌ¸§ ÁöÁ¤ÇÏ´Â ºÎºÐ 

imgwin.document.write("<sc"+"ript>\n"); 
imgwin.document.write("function resize() {\n"); 
imgwin.document.write("pic = document.il;\n"); 
//imgwin.document.write("alert(eval(pic).height);\n"); 
imgwin.document.write("if (eval(pic).height) { var name = navigator.appName\n"); 
imgwin.document.write(" if (name == 'Microsoft Internet Explorer') { myHeight = eval(pic).height + 0; myWidth = eval(pic).width + 0;\n"); 
imgwin.document.write(" } else { myHeight = 700; myWidth = 500; }\n"); 
imgwin.document.write(" clearTimeout();\n"); 
imgwin.document.write(" var height = 700;\n"); 
imgwin.document.write(" var width = 600;\n"); 
imgwin.document.write(" var leftpos = 0;\n"); 
imgwin.document.write(" var toppos = 0; \n"); 
imgwin.document.write(" self.moveTo(0, 0);\n"); 
imgwin.document.write(" self.resizeTo(500, 700);\n"); 
imgwin.document.write("}else setTimeOut(resize(), 100);}\n"); 
imgwin.document.write("</sc"+"ript>\n"); 

imgwin.document.write("</head>\n"); 
imgwin.document.write('<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" bgcolor="#FFFFFF">\n'); 

imgwin.document.write("<img border=0 onclick=self.close() style=cursor:hand src="+what+" xwidth=100 xheight=9 name=il onload='resize();'>\n"); 
imgwin.document.write("</body>\n"); 
imgwin.document.close(); 
}


//ÇÁ¸°Æ®ÇÏ±â


function print_page() {
window.print();
}
function q_print() {

       var qt = confirm('ÇÁ¸°Æ® ÇÏ½Ã°Ú½À´Ï±î?')
       
       if (qt == 1) {
       print_page();
       }
}
