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; ia.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&&id.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_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_popupMsg(msg) { //v1.0
  alert(msg);
}
//-->

<!--  ÇÃ·¡½¬ ¹Ú½º¶óÀÎ ¼û±â±â
function __ws__(id){

document.write(id.text);id.id='';

}

function getFlash(swfName,wt,ht,id,t){
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+wt+'" height="'+ht+'" id="'+id+'">');
    document.write('<param name="movie" value="'+swfName+'">');
    document.write('<param name="quality" value="high">');
    if (t != 0)    {
        document.write('<param name="wmode" value="transparent">');
    }
    document.write('<param name="allowScriptAccess" value="always">');
    document.write('<embed src="'+swfName+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" width="'+wt+'" height="'+ht+'" allowScriptAccess="sameDomain" id="'+id+'"></embed></object>');
}
//-->


/**************************
	Right Wing Start
**************************/
var stmnBASE = -200;
var stmnGAP = 90;
var stmnRIGHT = -200;
var stmnBTTM = 50;
var stmnActivateSpeed = 100;
var stmnScrollSpeed = 5;
var stmnTimer;
var bMove = 1;


function RefreshRightWing() {

	if (!bMove) return

	var stmnStartPoint, stmnEndPoint, stmnRefreshTimer;
	stmnStartPoint = parseInt(rightWing.style.top, 10);
	stmnEndPoint = document.body.scrollTop + stmnGAP;

	if (stmnEndPoint < stmnBASE) stmnEndPoint = stmnBASE;
	stmnRefreshTimer = stmnActivateSpeed;
	if ( stmnStartPoint != stmnEndPoint && stmnEndPoint <= (document.body.scrollHeight - stmnBTTM) ) {
		stmnScrollAmount = Math.ceil( Math.abs( stmnEndPoint - stmnStartPoint ) / 15 );
		rightWing.style.top = parseInt(rightWing.style.top, 10) + ( ( stmnEndPoint<stmnStartPoint ) ? -stmnScrollAmount : stmnScrollAmount );
		stmnRefreshTimer = stmnScrollSpeed;
	}
	stmnTimer = setTimeout ("RefreshRightWing();", stmnRefreshTimer);
}


function InitializerightWing() {
	if ( document.body.scrollHeight < 500 ) return;
	//rightWing.style.display = "inline";
	rightWing.style.display = "inline";
	if ( stmnBASE = -200 ) stmnBASE = rightWing.offsetTop;
	if ( stmnBASE <= 0 ) stmnBASE = 115;
	rightWing.style.top = stmnBASE;
	rightWing.style.RIGHT = stmnRIGHT;
	RefreshRightWing();
}

/********************************************************************************************************
	ÆË¾÷Ã¢ ¿ÀÇÂ
********************************************************************************************************/
function popupOpen(url) {
	var positionX = 0;
	var positionY = 0;
//	var positionX = (screen.width-450)/2;
//	var positionY = (screen.height-250)/2;
	// FireFoxÀÏ °æ¿ì
	if ( window.navigator.userAgent.indexOf("Firefox") != -1 ) {
		window.open(url,"","left="+positionX+",top="+positionY+",width=500,height=500,menubar=no,location=no,resizable=no,scrollbars=yes,status=no" );
	}
	
	// IE 6, 7 ÀÏ °æ¿ì
	if ( window.navigator.userAgent.indexOf("MSIE 6") != -1 || window.navigator.userAgent.indexOf("MSIE 7") != -1 ) {
		window.open(url,"","left="+positionX+",top="+positionY+",width=656,height=445,menubar=no,location=no,resizable=no,scrollbars=no,status=no" );
	}
}

// ÆË¾÷Ã¢ ¸®»çÀÌÁî **************************************
function popupResize() {
	// FireFoxÀÏ °æ¿ì
	if ( window.navigator.userAgent.indexOf("Firefox") != -1 ) {
		popFF();
	}
	
	// IE 6, 7 ÀÏ °æ¿ì
	if ( window.navigator.userAgent.indexOf("MSIE 6") != -1 || window.navigator.userAgent.indexOf("MSIE 7") != -1 ) {
		popIE();
	}
}

function popFF() {
	var thisX = document.getElementById("offsetPopup").offsetWidth;
	var thisY = document.getElementById("offsetPopup").offsetHeight;
	
	var maxThisX = screen.width - 50;
	var maxThisY = screen.height - 80;
	
	// Å¬¶óÀÌ¾ðÆ® width, height¸¦ Á¦¿ÜÇÑ FrameÀÇ °ªÀ» Ãß°¡ÇØÁà¾ß Á¦´ë·Î Ç¥ÇöµÊ.
	var marginY = 50;
	var marginX = 6;

/*	°¡·Î·Î ±æ¾îÁú °æ¿ì
	if( thisX > maxThisX ) {
		window.scrollbars.visible = true;
		thisX = maxThisX;
	} else {
		window.scrollbars.visible = false;
//		document.getElementsByTagName("body")[0].style.overflow = "hidden";
	}
*/
	
	if( thisY > maxThisY - marginY ) {
		window.scrollbars.visible = true;
		
		thisX += 16;
		thisY = maxThisY - marginY;
	} else {
		window.scrollbars.visible = false;
	}
	
	window.resizeTo( thisX+marginX, thisY+marginY );
}

function popIE() {
	var thisX = document.getElementById("offsetPopup").offsetWidth;
	var thisY = document.getElementById("offsetPopup").offsetHeight;
	
	var maxThisX = screen.width - 50;
	var maxThisY = screen.height - 80;

	if ( window.navigator.userAgent.indexOf("MSIE 6") != -1 ) { // 6.0
		var marginY = 27; //
		var marginX = 10;

	} else if ( window.navigator.userAgent.indexOf("MSIE 7") != -1 ) {	// 7.0
		var marginY = 71;	//
		var marginX = 10;
	}
	
/*	°¡·Î·Î ±æ¾îÁú °æ¿ì
	if( thisX > maxThisX ) {
		window.document.body.scroll = "yes";
		thisX = maxThisX;
	} else {
		window.document.body.scroll = "no";
	}
*/
	
	if( thisY > maxThisY - marginY ) {
		window.document.body.scroll = "yes";
		thisX += 16;
		thisY = maxThisY - marginY;
	} else {
		window.document.body.scroll = "no";
	}
	
	window.resizeTo( thisX+marginX, thisY+marginY );
}


