//ºê¶ó¿ìÀú Ã¼Å©_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);
		} 	  



