<!--
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_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_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_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 MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->

/****************************************************
 *
 *  Active X °ü·Ã IE ¼³°èº¯°æÀ¸·Î....
 *
 *  @@ ÀÛ¼ºÀÏ : 2006. 03. 16.
 *  @@ ÀÛ¼ºÀÚ : dizfeel
 *
 *****************************************************/

/* ÅÂ±×¸¦ ÀÔ·Â ¹Þ¾Æ¼­ Á÷Á¢ Ãâ·Â */
function docwrite(str) {
	document.write(str);
}

/****************************************************
 ÇÃ·¡½Ã Ãâ·Â ÇÔ¼ö
 ¾ÆÀÌµð, URL, Æø, ³ôÀÌ¸¸ ÀÔ·Â¹Þ¾Æ¼­ Ãâ·Â
 »ç¿ë¹ý :
 <script language="javascript"> FlashCommon( "idF1", "main_flash.swf", "370", "236" ); </script>
*****************************************************/
function FlashCommon( id, ObjUri, vWidth, vHeight ) {

	var str = "";
	str  = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + vWidth + '" height="' + vHeight + ' id="' + id + '" align="middle">';
	str += '<param name="movie" value="' + ObjUri + '">';
	str += '<param name="quality" value="high">';
	str += '<param name="wmode" value="transparent">';
	str += '<param name="bgcolor" value="#ffffff">';
	str += '<embed src="' + ObjUri + '" quality="high" wmode="transparent" bgcolor="#ffffff" width="' + vWidth + '" height="' + vHeight + '" id="' + id + '" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>';
	str += '</object>';

	document.writeln(str);
}



//ºê¶ó¿ìÀú Ã¼Å©_1
function BrowserCheck() {
	var b = navigator.appName
	if (b=="Netscape") this.b = "ns"
	else if (b=="Microsoft Internet Explorer") this.b = "ie"
	else this.b = b
	this.version = navigator.appVersion
	this.v = parseInt(this.version)
	this.ns = (this.b=="ns" && this.v>=4)
	this.ns4 = (this.b=="ns" && this.v==4)
	this.ns5 = (this.b=="ns" && this.v==5)
	this.ie = (this.b=="ie" && this.v>=4)
	this.ie4 = (this.version.indexOf('MSIE 4')>0)
	this.ie5 = (this.version.indexOf('MSIE 5')>0)
	this.min = (this.ns||this.ie)
}
is = new BrowserCheck()

//ºê¶ó¿ìÀú Ã¼Å©_2
if (navigator.appVersion.indexOf("2.") != -1){
	check = false;
	}
if ((navigator.appVersion.indexOf("3.") != -1) && (navigator.appName.indexOf("Explorer") != -1)){
	check = false;
	}
else {
	check = true;
	}

/*
====================================================================
//		ÀÌ ½ºÅ©¸³Æ®¸¦ ¾µ·Á¸é ÀÌ¹ÌÁöÀÇ °æ·Î°¡ ÀüºÎ °°¾Æ¾ß ÇÑ´Ù.
//		ÀÌ¹ÌÁöÀÇ ÀÌ¸§µµ ¼ýÀÚº°·Î ¼øÂ÷ÀûÀ¸·Î ÁöÁ¤µÇ¾î ÀÖ¾î¾ß ÇÑ´Ù.
//		°æ·Î¿Í ÀÌ¹ÌÁö°¡ ÀÏÄ¡ÇÏÁö ¾Ê´Â°æ¿ì ÇöÀç »óÅÂ ±×´ë·Î ¾´´Ù.
====================================================================
//ÀÌ¹ÌÁö »óÅÂ
if (check == true){
	//rollover ÀÌ¹ÌÁöÀÇ °¹¼ö¸¦ ³ªÅ¸³½´Ù.(ÀÌ¹ÌÁöÀÇ °æ·Î¿Í ÀÌ¹ÌÁö ÀÌ¸§)
	for (var i=1; i<=15; i++)
	{
		eval('image'+i+' = new Image();');
		eval('image'+i+'.src = "./images/topm_'+i+'a.gif";');			//¸¶¿ì½º out(º¸Åë»óÅÂÀÇ ÀÌ¹ÌÁö)
		eval('image'+i+'on = new Image();');
		eval('image'+i+'on.src = "./images/topm_'+i+'b.gif";');			//¸¶¿ì½º over
		eval('image'+i+'stay = new Image();');
		eval('image'+i+'stay.src = "./images/topm_'+i+'b.gif";');		//ÀÌ¹ÌÁö Click
	}

}
*/

imageStay = ""
imageStay_img = ""


//ÀÌ¹ÌÁö¿¡ ¸¶¿ì½º over ½Ã...
//½ºÅ¸ÀÏÀÇ filterÀ» Ãß°¡ÇØ¼­ ·Ñ¿À¹ö ÀÌ¹ÌÁö°¡ ÃµÃµÈ÷ ¶ßµµ·Ï ÇÏ¿´´Ù.
function imageon(name,img_name) {
	if (imageStay != name){
		if ((screen.colorDepth >= 24) && (is.ie4))
		{
		//	eval('document.images.'+name+'.src = '+name+'on.src;');
			eval('document.images.'+name+'.src = "' + img_name + '";');
		}

		else
		{
			eval('document.images.'+name + '.filters.blendTrans.stop();');
			eval('document.images.'+name + '.filters.blendTrans.Apply();');
		//	eval('document.images.'+name + '.src = ' + name + 'on.src;');
			eval('document.images.'+name + '.src = "' + img_name + '";');
			eval('document.images.'+name + '.filters.blendTrans.Play();');
		}
	}
}

//ÀÌ¹ÌÁö¿¡¼­ ¸¶¿ì½º¸¦ out ½Ã...
function imageoff(name,img_name){
	if (imageStay != name){
//        	document[name].src = eval(name + ".src");
			eval('document.images.'+name+'.src = "' + img_name + '";');
	}
}

//ÀÌ¹ÌÁö¿¡ ¸¶¿ì½º over ½Ã...
function on(name,img_name){
	if (check == true){
		imageon(name,img_name);
	}
}

//ÀÌ¹ÌÁö¿¡¼­ ¸¶¿ì½º¸¦ out ½Ã...
function off(name,img_name){
	if (check == true){
		imageoff(name,img_name);
	}
}

//ÀÌ¹ÌÁö¸¦ ClickÇÒ °æ¿ì...
function stay(name,img_name,back_img){
	if (check == true){
	//	document[name].src = eval(name + "stay.src");
		eval('document.images.'+name+'.src = "' + img_name + '";');

	if (imageStay != name){
		if (imageStay != ""){
		//	document[imageStay].src = eval(imageStay + ".src");
			eval('document.images.'+imageStay+'.src = "' + imageStay_img + '";');
		}
	}

	//´Ù¸¥ÀÌ¹ÌÁö¸¦ Å¬¸¯ÇÒ°æ¿ì ±×Àü¿¡ Å¬¸¯ÇÑ ÀÌ¹ÌÁö¸¦ µÇµ¹·Á¾ß ÇÏ±â ¶§¹®¿¡ Á¤º¸¸¦ °¡Áö°í ÀÖ¾î¾ß ÇÑ´Ù.
	imageStay = name				//imgÀÇ name À» °¡Áö°í ÀÖ´Â´Ù.
	imageStay_img = back_img	//µÇµ¹·Á¾ßÇÒ back_img ¸¦ °¡Áö°í ÀÖ´Â´Ù.
	}
}

//=======================================================================================================

// ¼³ ¸í : ·Ñ¿À¹ö ½ºÅ©¸³Æ®
//
function ImgView(obj,mode,key)
{
	// ¸¶¿ì½º ¿À¹ö½Ã ¿ø·¡ÀÇ ÀÌ¹ÌÁö¿¡ key ¹®ÀÚ¿­À» ´õÇÏ¸é overÀÌ¹ÌÁö ¸íÀÌ µÈ´Ù.
	// obj : ÀÌ¹ÌÁö °´Ã¼ ÀÚ½Å obj.src¸¦ ¹Þ¾Æ¿Í¼­ Ã³¸®ÇÕ´Ï´Ù.
	// mode : ['over': ¸¶¿ì½º ¿À¹ö½Ã ÀÔ·Â,'out':¸¶¿ì½º ¾Æ¿ô½Ã ÀÔ·Â]
	// key : ONMOUSEOUT½ÃÀÇ ÀÌ¹ÌÁö¸íÀÌ 'abc.gif' ÀÏ °æ¿ì ONMOUSEOVER½Ã ÀÌ¹ÌÁö¸íÀº 'abc_ov.gif'¶ó¸é  over½Ã¿¡ Ãß°¡µÇ´Â ¹®ÀÚ¿­['_ov']¸¦ ÀÔ·ÂÇÕ´Ï´Ù.


	//¿¹)<IMG SRC='abc.gif' ONMOUSEOUT="ImgView(this,'out','_ov');" ONMOUSEOVER="ImgView(this,'over','_ov');">
	//		=> ÀÌ¶§ ¿À¹ö½ÃÀÇ ÀÌ¹ÌÁö¸íÀº 'abc_ov.gif'°¡ µÇ¾î¾ß ÇÕ´Ï´Ù.

	// ¸¶¿ì½º ¾Æ¿ô½Ã key°ªÀ» 'out'À¸·Î ÀÔ·ÂÇÕ´Ï´Ù.
	if(mode == "out")
	{
		obj.src = ParseNm(obj.src,key,'out');
	}
	// ¸¶¿ì½º ¿À¹ö½Ã
	else if(mode == "over")
	{
		obj.src = ParseNm(obj.src,key,'over');

	}



}

function ParseNm(nm,sKey,sMode)
{
	p_dot = nm.lastIndexOf(".");
	af_nm = nm.substring(p_dot+1,nm.length);


	if(sMode == "out")
	{
		p_temp = nm.lastIndexOf(sKey+'.');
		bf_nm = nm.substring(0,p_temp);
		return bf_nm+'.'+af_nm;

	}
	else if(sMode == "over")
	{

		bf_nm = nm.substring(0,p_dot);
		return bf_nm+sKey+'.'+af_nm;
	}


}



function GrpMenu(grpObj)
{
	for(var i=0; i < document.all.GRP.length;i++)
	{
		if(document.all.GRP[i] == grpObj)
		{
			if(document.all.GRP[i].style.display == "")
			{
				document.all.GRP[i].style.display = 'none';
			}
			else
			{
				document.all.GRP[i].style.display = '';
			}
		}
		else
		{
			document.all.GRP[i].style.display = 'none';
		}
	}
}



function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
//  window.open(theURL,winName,'status=no,width=300,height=200');
}

function MM_openBrWindow2(theURL,winName,features) { //v2.0
  window.open(theURL,winName,'status=no,width=300,height=200');
}


function openMovie(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function mp(src)
{
	document.all.mm.src="blank.asp?m_url="+src;
}


var bNetscape4plus = (navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) >= "4");
var bExplorer4plus = (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.substring(0,1) >= "4");

function CheckUIElements()
{
        var yMenu1From, yMenu1To, yButtonFrom, yButtonTo, yOffset, timeoutNextCheck;

        if ( bNetscape4plus ) { // ³×Ã÷ÄÉÀÌÇÁ ¿ë ¼³Á¤

                yMenu1From   = document["Menu1"].top;
                yMenu1To     = top.pageYOffset + 10;   // À§ÂÊ À§Ä¡
        }
        else if ( bExplorer4plus ) {  // IE ¿ë ¼³Á¤

                yMenu1From   = parseInt (Menu1.style.top, 10);
                yMenu1To     = document.body.scrollTop + 180; // À§ÂÊ À§Ä¡
        }

        timeoutNextCheck = 500;

        if ( Math.abs (yButtonFrom - (yMenu1To + 152)) < 6 && yButtonTo < yButtonFrom ) {
                setTimeout ("CheckUIElements()", timeoutNextCheck);
                return;
        }


        if ( yButtonFrom != yButtonTo ) {
                yOffset = Math.ceil( Math.abs( yButtonTo - yButtonFrom ) / 10 );
                if ( yButtonTo < yButtonFrom )
                        yOffset = -yOffset;

                if ( bNetscape4plus )
                        document["divLinkButton"].top += yOffset;
                else if ( bExplorer4plus )
                        divLinkButton.style.top = parseInt (divLinkButton.style.top, 10) + yOffset;

                timeoutNextCheck = 10;
        }

        if ( yMenu1From != yMenu1To ) {
                yOffset = Math.ceil( Math.abs( yMenu1To - yMenu1From ) / 20 );
                if ( yMenu1To < yMenu1From )
                        yOffset = -yOffset;

                if ( bNetscape4plus )
                        document["Menu1"].top += yOffset;
                else if ( bExplorer4plus )
                        Menu1.style.top = parseInt (Menu1.style.top, 10) + yOffset;

                timeoutNextCheck = 10;
        }

        setTimeout ("CheckUIElements()", timeoutNextCheck);
}

function MovePosition()
{
        var y;


        // Æä¿¡Áö ·Îµù½Ã Æ÷Áö¼Ç
        if ( bNetscape4plus ) {
                document["Menu1"].top = top.pageYOffset + 150;
                document["Menu1"].visibility = "visible";

        }
        else if ( bExplorer4plus ) {
                Menu1.style.top = document.body.scrollTop + 150
                Menu1.style.visibility = "visible";

        }


        CheckUIElements();

        return true;
}



//  ÀÚ°¡Áø´Ü
  function SelfTest() {
		LaunchCenter("/webModule/SelfTest/TestMain.asp", 'SelfTest','489', '800');
  }

//	È­¸é Áß¾Ó¿¡ Ã¢ ¶ç¿ì±â
		function LaunchCenter(url, name, height, width) {

			var win_height = height;
			var win_width = width;
			var win_top = window.screen.height/2 - win_height/2;
			var win_left = window.screen.width/2 - win_width/2;
			var wintype="width=" +win_width+ ",height="+win_height+", top="+win_top+",left="+win_left+", menubar=no, scrollbars=yes, resizable=no, status=no, toolbar=no";

			return window.open(url, name, wintype);
		}


//####################################################################################################
// ·Ñ¿À¹ö ¸Þ´º ¹× ¿À¹öÀÌ¹ÌÁö Ç¥½Ã ÇÏ±â.

function preload() {
	if( !document.images ) return;

	var arguments = preload.arguments;

	for (var i = 0; i < arguments.length; i++) {
		ar[i] = new Image();
		ar[i].src = arguments[i];
	}
}

function getImg(obj,status) {
	imgName = obj.src
	imgName = imgName.replace("_on","");
	imgName = imgName.replace("_off","");

	no1  = imgName.length;
	no2  = no1 - 4;

	tmp = imgName.substr(0,no2);
	ext = imgName.substr(no2+1,3);

	img_off = tmp + "_off." + ext;
	img_on = tmp+"_on." + ext ;

	if ( status==0 ) { return img_off}
	if ( status==1 ) { return img_on }

}

function chgImg(obj,flag) {

	imgID = obj.name
	imgID = imgID.replace("navimain","");

	if ( flag == 1)
	{
		obj.src= getImg(obj,1);
	}
	else if ( flag==0 )
	{
		obj.src= getImg(obj,0);
	}

	if( main_menu > 0  )
	{
		document.images["navimain"+main_menu].src = getImg( document.images["navimain"+main_menu] , 1 );
	}
	if( sub_menu > 0  )
	{
		document.images["navimain"+main_menu+"_"+sub_menu].src = getImg( document.images["navimain"+main_menu+"_"+sub_menu] , 1 );
	}

}

function init_image() {

	imgID = "navimain" + main_menu;

	obj = document.images[imgID]
	obj.src = getImg(obj,1)

	if ( sub_menu > 0 ){ imgID = imgID + "_" + sub_menu;

		obj = document.images[imgID]
		obj.src = getImg(obj,1)
	}
	if ( main_menu > 0 && sub_menu > 0 ) {
		document.getElementById("menu"+main_menu).style.display="block";
	}
}


function roll_menu(showNo) {
	menuTotal = 9
 	for(i=1;i<=menuTotal;i++) {
		menu = "menu"+i;
		obj = document.getElementById(menu);

		if(showNo != i) { obj.style.display='none'; }
		if(showNo == i) {
			if(obj.style.display=="none") {
				obj.style.display='block';
				//mainFlag=1;
			}
			else { obj.style.display='none';  } //mainFlag=0 }
		}
	}
}

function bluring(){
	if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}
//document.onfocusin=bluring;
//##########################################################################################################




// Top ¹öÆ° ±¸Çö ½ºÅ©¸³Æ®
function GoTop() {
	window.scrollTo(0,0);
}

function GoTop_Call() {
	document.body.ondblclick = Top;
}

var Xpos = 0;
var Ypos = 0;
var Ygravity = 0.85;
var scrollPos = 0;
var oldScrollPos = 0;

function FloatMenu() {
docWidth = document.body.clientWidth; // Update document width
docHeight = document.body.clientHeight; // Update document height
oldScrollPos = scrollPos;
scrollPos = document.body.scrollTop; // Update scrollbar position

Xpos = 976; // ÁÂÃø¿©¹é
//Xpos = (docWidth - floater.offsetWidth) - 10; //¿À¸¥ÂÊ ¿©¹é ¹è³Ê°¡ ¿À¸¥ÂÊ¿¡ ºÙÀ»°æ¿ì
//Xpos = (docWidth / 2) + 430; // Áß¾ÓÁ¤·ÄÀÏ°æ¿ì. " + 410 Àº Å×ÀÌºí Å©±â / 2 "
Yboundary = scrollPos + 400; //»ó´Ü¿©¹é
//Yboundary = ((scrollPos + docHeight) - floater.offsetHeight) - 150; //ÇÏ´Ü¿©¹é

if (floater.offsetTop < Yboundary - 1) // Object is behind boundary
Ypos += 2;

if (floater.offsetTop > Yboundary + 1) // Object is past boundary
Ypos -= 1;

Ypos *= Ygravity; // Slow object down

floater.style.pixelLeft = Xpos;
floater.style.pixelTop += Ypos; // Make object bounce
}

window.setInterval("FloatMenu()", 1); //¸Å°³º¯¼öÁß µÞÂÊ ¼ýÀÚ´Â ³»·Á¿À´Â ¼Óµµ

document.write("\
<div id='floater' style='z-index:1; top:470px; position:absolute; visibility:visible;'>\
<table width='60' cellpadding='0' cellspacing='0' border='0'>\
  <tr>\
    <td><a href='#' alt='À§·Î°¡±â' onFocus='blur()'><img src='http://211.47.69.97/~pivotpoint/korean/include/images/btn_top.gif' border='0'></a></td>\
  </tr>\
</table>\
</div>\
");


