

//ÀÌ¹ÌÁö ·Ñ¿À¹ö
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];}
}

// av µ¿¿µ»ó ÀÚ·á½Ç ÇÃ·¹ÀÌ¾î °ü·Ã ½ºÅ©¸³Æ®
function viewActiveObject(html){
	document.write(html);
}


//½ºÅ©·Ñ¹Ù¾øÀ½,¸®»çÀÌÁî¾ÈµÅ´Â »õÃ¢¿­±â
	function noScroll(width,height,url,name) {
	var stLEFT = (window.screen.width - width) / 2;
	var stTOP = (window.screen.height - height) / 2;

	msgWindow=window.open(url,name,'statusbar=no,scrollbars=no,status=no,resizable=no,width='+width+',height='+height+',left='+stLEFT+',top='+stTOP);
	}


	function yesScroll(width,height,url,name) {
	var stLEFT = (window.screen.width - width) / 2;
	var stTOP = (window.screen.height - height) / 2;

	msgWindow=window.open(url,name,'statusbar=no,scrollbars=yes,status=no,resizable=no,width='+width+',height='+height+',left='+stLEFT+',top='+stTOP);
	}
// ÆË¾÷
<!-- 
 function open_win(url)
 { 
  window.open(url,"new_win","top=0,left=0,width=617,height=500,scrollbars=yes") 
 }
//-->

//ÇÃ·¡½Ã »õÃ¢Á¦¾î
function openWinFlash(url,Width,Height,Center) {
   if (Center==true){
      window.open(url, "", "toolbar=no,resizable=no,scrollbars=no,width=" + Width + ",height=" + Height + ",left=" + (window.screen.width/2-Width) + ",top=" + (window.screen.height/2-Height));
   }
   else {
      window.open(url, "", "toolbar=no,resizable=no,scrollbars=yes,width=" + Width + ",height=" + Height + ",left=0,top=0");
   }
}



function newWindow(url, target, l, t, w, h, s, r)
{
	opt = "left=" + l + ", top=" + t + ", width=" + w + ", height=" + h;
	opt = opt + ", toolbar=no,location=no,directories=no,status=no,menubar=no";
	opt = opt + ",scrollbars=" + s;
	opt = opt + ",resizable=" + r;
	window.open(url, target, opt);
}


function popupCenter(url, target, w, h, s, r) 
{
	width=screen.width;
	height=screen.height;

	x=(width/2)-(w/2);
	y=(height/2)-(h/2);

	opt = "left=" + x + ", top=" + y + ", width=" + w + ", height=" + h;
	opt = opt + ", toolbar=no,location=no,directories=no,status=no,menubar=no";
	opt = opt + ",scrollbars=" + s;
	opt = opt + ",resizable=" + r;
	window.open(url, target, opt);
}

function popupCenter2(url, target, w, h, s, r) 
{
	width=screen.width;
	height=screen.height;

	x=(width/2)-(w/2);
	y=(height/2)-(h/2);

	opt = "left=" + x + ", top=" + y + ", width=" + w + ", height=" + h;
	opt = opt + ", toolbar=no,location=no,directories=no,status=no,menubar=no";
	opt = opt + ",scrollbars=" + s;
	opt = opt + ",resizable=" + r;
	window.open(url, target, opt);
}

function logout(){
	location.href='/logout_exe.asp';
}



function ResizePic() // ÀÌ¹ÌÁö»çÀÌÁî Ã¼Å©
{
	if(! imgz.complete)
	{
		setTimeout("ResizePic(imgz)",50);
	}
	else
	{
		if (imgz.width > 680)
		{
			imgz.width = 680;
		}
	}
}





var imgObj = new Image();
function showImgWin(imgName) { //ÀÌ¹ÌÁö »çÀÌÁî Ã¼Å©ÇÏ¿© ÆË¾÷¶ç¿ì±â
	imgObj.src = imgName;
	setTimeout("createImgWin(imgObj)", 100);
}
	
function createImgWin(imgObj) {
	if (! imgObj.complete) {
		setTimeout("createImgWin(imgObj)", 100);
		return;
	}
	var x = window.screen.width;
	var y = window.screen.height;
		
	var ix = imgObj.width;
	var iy = imgObj.height;
		
	if (parseInt(x) < parseInt(ix) && parseInt(y) < parseInt(iy)){
		
		var x = window.screen.width - 10;
		var y = window.screen.height - 55;
		
		imageWin = window.open("", "imageWin","top=0,left=0,scrollbars=yes,width=" + x + ",height=" + y);
		imageWin.document.write("<html><head><title>::KMH::</title></head><body style='margin:0'>");
		imageWin.document.write("<A HREF='javascript:window.close()'>"+"<img src=" + imgObj.src + " border=0 alt=´Ý±â>"+"</A>");
		imageWin.document.write("</body><html>");
		imageWin.document.title = "";
		
	}else if (parseInt(x) > parseInt(ix) && parseInt(y) < parseInt(iy)){
		var x = window.screen.width;
		var y = window.screen.height - 55;
		
		imageWin = window.open("", "imageWin","top=0,left=0,scrollbars=yes,width=" + ix + ",height=" + y);
		imageWin.document.write("<html><head><title>::KMH::</title></head><body style='margin:0'>");
		imageWin.document.write("<A HREF='javascript:window.close()'>"+"<img src=" + imgObj.src + " border=0 alt=´Ý±â>"+"</A>");
		imageWin.document.write("</body><html>");
		imageWin.document.title = "";
		
	}else if (parseInt(x) < parseInt(ix) && parseInt(y) > parseInt(iy)){
		
		var x = window.screen.width - 10;
		var y = window.screen.height;
		
		imageWin = window.open("", "imageWin","top=0,left=0,scrollbars=yes,width=" + x + ",height=" + iy);
		imageWin.document.write("<html><head><title>::KMH::</title></head><body style='margin:0'>");
		imageWin.document.write("<A HREF='javascript:window.close()'>"+"<img src=" + imgObj.src + " border=0 alt=´Ý±â>"+"</A>");
		imageWin.document.write("</body><html>");
		imageWin.document.title = "";
			
	}else{
		
		imageWin = window.open("", "imageWin","top=0,left=0,width=" + ix + ",height=" + iy);
		imageWin.document.write("<html><head><title>::KMH::</title></head><body style='margin:0'>");
		imageWin.document.write("<A HREF='javascript:window.close()'>"+"<img src=" + imgObj.src + " border=0 alt=´Ý±â>"+"</A>");
		imageWin.document.write("</body><html>");
		imageWin.document.title = "";
	}
}
