//======================== ±³À°°úÁ¤ ¹Ù·Î°¡±â =================================
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

//======================== ÆË¾÷Ã¢ °ü·Ã =================================
function getCookie(Name) {
	var search = Name + "="
	if (document.cookie.length > 0) { // ÄíÅ°°¡ ¼³Á¤µÇ¾î ÀÖ´Ù¸é
		offset = document.cookie.indexOf(search)
		if (offset != -1) { // ÄíÅ°°¡ Á¸ÀçÇÏ¸é
			offset += search.length // set index of beginning of value
			end = document.cookie.indexOf(";", offset) // ÄíÅ° °ªÀÇ ¸¶Áö¸· À§Ä¡ ÀÎµ¦½º ¹øÈ£ ¼³Á¤
			if (end == -1)
			end = document.cookie.length
			return unescape(document.cookie.substring(offset, end))
		}
	}
}

function openNotice(URL,title,features) {
	if(getCookie(title)!="done"){//ÆË¾÷Ã¢ Å¸ÀÌÆ²ÀÌ ÄíÅ°¿¡ ¾øÀ¸¸é
		var popup = window.open(URL,title,features); //À©µµ¿ÀÇÂ
		if( navigator.appName.substring(0,8) == "Netscape" ) { popup.location = URL; } 
	}
}

//======================== Ã¤¿ëÁ¤º¸/Ãë¾÷°¡ÀÌµå º¸¿©ÁÖ±â =================================
function ShowNotice(idx){
	HideNotice();
	noticeImg[idx-1].src = "/images/notice0" + idx + "_ov.gif"
	noticeList[idx-1].style.display ="";
}

function HideNotice(){
	for(i = 1; i <= noticeImg.length; i++) {
		noticeImg[i-1].src = "/images/notice0" + (i) + ".gif"
		noticeList[i-1].style.display = "none"
	}
}

showIdx = 0

//======================== ms ¼Ò¼Û ¹®Á¦·Î flash º¸¿©ÁÖ±â =================================

///ÇÃ·¡½Ã º¸±â
//path	: ÇÃ·¡½Ã °æ·Î
//wid	: °¡·Î »çÀÌÁî
//hei	: ¼¼·Î »çÀÌÆ®
function ViewFlash( path , width , height )
{
	var strProtocol = (document.location.protocol.indexOf("https")!=-1)?"https":"http";
	var htmlBody = "";
	htmlBody = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='"+strProtocol+"://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='" + width + "' height='" + height + "'>" ;
	htmlBody = htmlBody + "<param name=movie value='" + path + "'>" ;
	htmlBody = htmlBody + "<param name=quality value=high>" ;
	htmlBody = htmlBody + "<param name=wmode value=transparent>" ;
	htmlBody = htmlBody + "<embed src='" + path + "' quality='high' pluginspage='"+strProtocol+"://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='" + width + "' height='" + height + "'>" ;
	htmlBody = htmlBody + "</embed>" ;
	htmlBody = htmlBody + "</object>" ;

	document.write(htmlBody)	; 
}

///ÇÃ·¡½Ãµ¿È­¿ë º¸±â
//path	: ÇÃ·¡½Ã °æ·Î
//wid	: °¡·Î »çÀÌÁî
//hei	: ¼¼·Î »çÀÌÆ®
function ViewFlashTale( path , width , height )
{
	var strProtocol = (document.location.protocol.indexOf("https")!=-1)?"https":"http";
	var htmlBody = "";
	htmlBody = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='"+strProtocol+"://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='" + width + "' height='" + height + "'>" ;
	htmlBody = htmlBody + "<param name=movie value='" + path + "'>" ;
	htmlBody = htmlBody + "<param name=quality value=high>" ;
	htmlBody = htmlBody + "<embed src='" + path + "' quality='high' pluginspage='"+strProtocol+"://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='" + width + "' height='" + height + "'>" ;
	htmlBody = htmlBody + "</embed>" ;
	htmlBody = htmlBody + "</object>" ;

	document.write(htmlBody)	; 
}

///ÇÃ·¡½Ã º¸±â ¹Ì¸®º¸±â¿ë
//path	: ÇÃ·¡½Ã °æ·Î
//wid	: °¡·Î »çÀÌÁî
//hei	: ¼¼·Î »çÀÌÆ®
function ViewFlashParam( path , width , height, flashvars )
{
	var strProtocol = (document.location.protocol.indexOf("https")!=-1)?"https":"http";
	var htmlBody = "";
	htmlBody = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='"+strProtocol+"://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='" + width + "' height='" + height + "'>" ;
	htmlBody = htmlBody + "<param name=movie value='" + path + "'>" ;
	htmlBody = htmlBody + "<param name=quality value=high>" ;
	htmlBody = htmlBody + "<param name='flashvars' value='"+flashvars+"'";
	htmlBody = htmlBody + "<param name=wmode value=transparent>" ;
	htmlBody = htmlBody + "<embed src='" + path + "' quality='high' pluginspage='"+strProtocol+"://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='" + width + "' height='" + height + "'>" ;
	htmlBody = htmlBody + "</embed>" ;
	htmlBody = htmlBody + "</object>" ;

	document.write(htmlBody)	; 
}


//======================== Scroll =================================
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 ) { // ³×Ã÷ÄÉÀÌÇÁ ¿ë ¼³Á¤
                //yButtonFrom = document["divLinkButton"].top;
                //yButtonTo   = top.pageYOffset + top.innerHeight - 55;
                yMenu1From   = document["Menu1"].top;
                yMenu1To     = top.pageYOffset + 150;   // À§ÂÊ À§Ä¡
        }
        else if ( bExplorer4plus ) {  // IE ¿ë ¼³Á¤
                //yButtonFrom = parseInt (divLinkButton.style.top, 10);
                //yButtonTo   = document.body.scrollTop + document.body.clientHeight - 55;
				//yMenu1From   = parseInt (document["Menu1"].style.top, 10);
				
				yMenu1From   = parseInt (Menu1.style.top, 10);				
                yMenu1To     = document.body.scrollTop + 360 // À§ÂÊ À§Ä¡
        }

        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 )
						//document["Menu1"].style.top = parseInt (document["Menu1"].style.top, 10) + yOffset;
			            
						Menu1.style.top = parseInt (Menu1.style.top, 10) + yOffset;
						

                timeoutNextCheck = 10;
        }

        setTimeout ("CheckUIElements()", timeoutNextCheck);
}

function MovePosition()
{
        var y;

        // ÇÁ·¹ÀÓ ¿¡¼­ ¹þ¾î³ª°Ô ÇÏ´Â ÇÔ¼öÀÔ´Ï´Ù. ÇÁ·¹ÀÓ¿¡ ³ÖÀ¸·Á¸é »èÁ¦ÇÏ¼¼¿ä
        if ( top.frames.length )
         //       top.location.href = self.location.href;

        // Æä¿¡Áö ·Îµù½Ã Æ÷Áö¼Ç
        if ( bNetscape4plus ) {
                document["Menu1"].top = top.pageYOffset + 410;
                document["Menu1"].visibility = "visible";
                //document["divLinkButton"].top = top.pageYOffset + top.innerHeight - 55;
                //document["divLinkButton"].visibility = "visible";
        }
        else if ( bExplorer4plus ) {
                //document["Menu1"].style.top = document.body.scrollTop + 268;
                //document["Menu1"].style.visibility = "visible";
				
				Menu1.style.top = document.body.scrollTop + 410;
                Menu1.style.visibility = "visible";
				
                //divLinkButton.style.top = document.body.scrollTop + document.body.clientHeight - 55;
                //divLinkButton.style.visibility = "visible";
        }

        // initializing UI update timer
        CheckUIElements();
        //if ( bExplorer4plus )
        //        setTimeout ( "FlashTitleStepIt(255)", 10 );
        return true;
}