/*******************************************************************************
	¿ÀÇÂ ºê¶ó¿ìÀú À©µµ
*******************************************************************************/
/*** ¿ÀÇÂ ºê¶ó¿ìÀú À©µµ ***/
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


/*******************************************************************************
	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)	; 
}

/*******************************************************************************
	top ½ºÅ©·Ñ
*******************************************************************************/
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 + 455 // À§ÂÊ À§Ä¡
        }

        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;
}

/*******************************************************************************
	°øÁö»çÇ× ¸¶¿ì½º ¿À¹ö½Ã ¼±ÅÃº° º¸¿©ÁÖ±â
*******************************************************************************/
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

function rotationBanner() {
	pshowIdx = showIdx - 1
	if (pshowIdx < 0) pshowIdx = rProfBanner.length - 1
	rProfBanner[pshowIdx].style.display = "none"
	rProfBanner[showIdx].style.display = ""
	showIdx++
	if (showIdx > rProfBanner.length - 1) showIdx = 0
	setTimeout("rotationBanner()", 3000)
}
