	menuData = new Array()
	for (i=0; i < 7; i++) {
	menuData[i] = new Array(40)
	for (j=0; j < 20; j++) {
		menuData[i][j] = new Array(2)}}
	
var br
if(navigator.appName == 'Netscape' && document.layers != null){br="N";}
else if(navigator.appName == 'Microsoft Internet Explorer' && document.all != null){br="IE";}
else{br=null}

function linkTo(form) {
    var myindex=form.nav_menu.selectedIndex
	location=(form.nav_menu.options[myindex].value);
}


function arrmOn(imgName)
{if (document.images) {document[imgName].src=eval(imgName+"on.src");}}
//
function arrmOff(imgName)
{if (document.images) {document[imgName].src=eval(imgName+"off.src");}}
//
if (document.images)
{


//top_snew
top01on=new Image(); top01on.src="../images/common/top_m01_on.gif";
top01off=new Image(); top01off.src="../images/common/top_m01_off.gif";

top02on=new Image(); top02on.src="../images/common/top_m02_on.gif";
top02off=new Image(); top02off.src="../images/common/top_m02_off.gif";

top03on=new Image(); top03on.src="../images/common/top_m03_on.gif";
top03off=new Image(); top03off.src="../images/common/top_m03_off.gif";

top04on=new Image(); top04on.src="../images/common/top_m04_on.gif";
top04off=new Image(); top04off.src="../images/common/top_m04_off.gif";

korean_icoon=new Image(); korean_icoon.src="../images/main/korean_on.gif";
korean_icooff=new Image(); korean_icooff.src="../images/main/korean_off.gif";

english_icoon=new Image(); english_icoon.src="../images/main/english_on.gif";
english_icooff=new Image(); english_icooff.src="../images/main/english_off.gif";

//bu
topon=new Image(); topon.src="../images/common/top_on.gif";
topoff=new Image(); topoff.src="../images/common/top_off.gif";
}



//

ns = (document.layers)? true:false
ie = (document.all)? true:false

function show(id) {
	if (ns) document.layers[id].visibility = "visible"
	else if (ie) document.all[id].style.visibility = "visible"
}

function hide(id) {
	if (ns) document.layers[id].visibility = "hidden"
	else if (ie) document.all[id].style.visibility = "hidden"
}


//



function link(url)
{
	window.open("http://"+url+"","url");
}

var sRepeat=null;
function doScrollerIE(dir, src, amount) {
if (amount==null) amount=10;
if (dir=="up")
document.all[src].scrollTop-=amount;
else
document.all[src].scrollTop+=amount;
if (sRepeat==null)
sRepeat = setInterval("doScrollerIE('" + dir + "','" + src + "'," + amount + ")",100);
return false
}
window.document.onmouseout = new Function("clearInterval(sRepeat);sRepeat=null");
window.document.ondragstart = new Function("return false");


//
function bt(id,after)
{
eval(id+'.filters.blendTrans.stop();');
eval(id+'.filters.blendTrans.Apply();');
eval(id+'.src="'+after+'";');
eval(id+'.filters.blendTrans.Play();');
}


//
function toggle(el) { 
if (el.style.display == 'none'){ 
el.filters.blendTrans.Apply(); 
el.style.display = ''; 
el.filters.blendTrans.Play() 
} 
else { 
el.filters.blendTrans.Apply(); 
el.style.display = 'none'; 
el.filters.blendTrans.Play() 
} 
} 
//

/************************************************
***************************************************/
//sliding bu
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 yMenuFrom, yMenuTo, yButtonFrom, yButtonTo, yOffset, timeoutNextCheck;

        if ( bNetscape4plus ) {
                //yButtonFrom = document["divLinkButton"].top;
                //yButtonTo   = top.pageYOffset + top.innerHeight - 55;
                yMenuFrom   = document["divMenu"].top;
                yMenuTo     = top.pageYOffset + 276;
        }
        else if ( bExplorer4plus ) {
                //yButtonFrom = parseInt (divLinkButton.style.top, 10);
                //yButtonTo   = document.body.scrollTop + document.body.clientHeight - 55;
                yMenuFrom   = parseInt (divMenu.style.top, 10);
                yMenuTo     = document.body.scrollTop + 276;
        }

        timeoutNextCheck = 500;

        if ( Math.abs (yButtonFrom - (yMenuTo + 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 ( yMenuFrom != yMenuTo ) {
                yOffset = Math.ceil( Math.abs( yMenuTo - yMenuFrom ) / 20 );
                if ( yMenuTo < yMenuFrom )
                        yOffset = -yOffset;

                if ( bNetscape4plus )
                        document["divMenu"].top += yOffset;
                else if ( bExplorer4plus )
                        divMenu.style.top = parseInt (divMenu.style.top, 10) + yOffset;

                timeoutNextCheck = 10;
        }

        setTimeout ("CheckUIElements()", timeoutNextCheck);
}

function OnLoad()
{
        var y;

        // we're not gonna be loaded in frames
        if ( top.frames.length )
                top.location.href = self.location.href;

        // setting initial UI elements positions
        if ( bNetscape4plus ) {
                document["divMenu"].top = top.pageYOffset + 276;
                document["divMenu"].visibility = "visible";
                //document["divLinkButton"].top = top.pageYOffset + top.innerHeight - 55;
                //document["divLinkButton"].visibility = "visible";
        }
        else if ( bExplorer4plus ) {
                divMenu.style.top = document.body.scrollTop + 276;
                divMenu.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 funcSwapImage(imageName, bHilite) {
// DUMB Netscape doesn't see img names if they're inside a <div which has an id
// if they're just in <div></div> - it's okay, but that's not the case :\
// Workaround (using layers) was provided by Kostya. Tnx man :)
        if ( bExplorer4plus ) {
                document.images[imageName].src = "images/" + imageName + (bHilite == 1 ? "_hi.gif" : "_lo.gif");
        }
        else if ( bNetscape4plus ) {
                document.layers["divMenu"].document.images[imageName].src = "images/" + imageName + (bHilite == 1 ? "_hi.gif" : "_lo.gif");
        }
        return false;
}

