
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

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_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 open_window(pop,width,height) {

	var url = pop;
	var wd = width;
	var he = height;
	window.open(url,'live','left=300;top=300,toolbar=0,menubar=0,scrollbars=no,resizable=no,width=' + wd + ',height=' + he + ';');
}

function open_view(url) {
	window.open(url,'displayWindow','left=10;top=10,toolbar=0,menubar=0,scrollbars=yes,resizable=no,width=690,height=700;');
}

function India1_Window_Open(url) {
	window.open(url,'India','left=10;top=10,toolbar=0,menubar=0,scrollbars=yes,resizable=no,width=618,height=525;');
}

function webzine_open() {
	var webzine_f = window.open('/webzine/index.html','webzine','left=10;top=10,toolbar=0,menubar=0,scrollbars=no,resizable=yes,width=800,height=820;');
	webzine_f.focus();
}

function checkFrmVerify(tempfrm) {
	if (tempfrm.id.value=="") {
	   alert("Please input your ID.");	
	   tempfrm.id.focus();
	   return false;
	}
	if (tempfrm.pwd.value=="") {
	   alert("Please input your password.");
	   tempfrm.pwd.focus();
	   return false;
	}
	return true;
}

function India2_Window_Open(url) {
	window.open(url,'India_homepage','left=10;top=10,toolbar=0,menubar=0,scrollbars=yes,resizable=no,width=618,height=525;');
}

function view_pictures(pop,width,height) {

	var url = pop;
	var wd = width;
	var he = height;
	window.open(url,'pictures','left=100;top=100,toolbar=0,menubar=0,scrollbars=yes,resizable=yes,width=' + wd + ',height=' + he + ';');
	
}

function allcheck() {
	
	if (document.frmList2.checkyes.value==0) {
		for( var i=0; i<document.frmList.elements.length; i++) {
			var ele = document.frmList.elements[i];
			if(ele.name == 'checkid')
				document.frmList2.checkyes.value=1;
				ele.checked = true;
		}
	} else {
		for( var i=0; i<document.frmList.elements.length; i++) {
			var ele = document.frmList.elements[i];
			if(ele.name == 'checkid')
				ele.checked = false;
				document.frmList2.checkyes.value=0;
		}
	}
	return;
}

function select_play() {
        window.open('','relay','toolbar=no,scrollbars=yes,resize=yes,width=479 height=261');
        document.frmList.action='/english/information/jukebox/player.asp';
        document.frmList.target='relay';
        document.frmList.method='post';
        document.frmList.submit();
}

function Spot_Window_Open(url) {
	window.open(url,'spot','left=10;top=10,toolbar=0,menubar=0,scrollbars=no,resizable=no,width=356,height=420;');
}

function onscroll_1() {

     rb_banner.style.top = document.body.scrollTop + 135;
     rb_banner.style.visibility = "visible";
     CheckUIElements();
     
//   y = document.body.scrollTop + 100
//   rb_banner.style.pixelTop = y;
}
	
function CheckUIElements() {
        var yMenuFrom, yMenuTo, yButtonFrom, yButtonTo, yOffset, timeoutNextCheck;

        yMenuFrom   = parseInt (rb_banner.style.top, 10);
        yMenuTo     = document.body.scrollTop + 130;

        timeoutNextCheck = 500;

        if ( Math.abs (yButtonFrom - (yMenuTo + 152)) < 6 && yButtonTo < yButtonFrom ) {
                setTimeout ("CheckUIElements()", timeoutNextCheck);
                return;
        }

        if ( yMenuFrom != yMenuTo ) {
                yOffset = Math.ceil( Math.abs( yMenuTo - yMenuFrom ) / 20 );
                if ( yMenuTo < yMenuFrom )
                    yOffset = -yOffset;
                    rb_banner.style.top = parseInt (rb_banner.style.top, 10) + yOffset;
                    timeoutNextCheck = 10;
        }

        setTimeout ("CheckUIElements()", timeoutNextCheck);
}	

function Notice_Window_Open(url) {
	window.open(url,'korean_notice','left=20;top=20,toolbar=0,menubar=0,scrollbars=no,resizable=no,width=388,height=221;');
}
	
function window_dubai(url) {
	window.open(url,'dubai','left=10;top=10,toolbar=0,menubar=0,scrollbars=yes,resizable=yes,width=850,height=700;');
}
	
function photogallery_window(pop,width,height) {

	var url = pop;
	var wd = width;
	var he = height;
	window.open(url,'photogallery','left=300;top=300,toolbar=0,menubar=0,scrollbars=no,resizable=yes,width=' + wd + ',height=' + he + ';');
}
	
function MemberRegistration_Window_Open(url) {
        window.open(url,'reg','left=10;top=10,toolbar=0,menubar=0,scrollbars=no,resizable=no,width=650,height=580;');
}	

function makeWin(tempURL) {
    var winOpts = "width=550,height=400,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes";
    var win1 = open(tempURL,"view_pic",winOpts);
}

function Cross_Window_Open(url) {
	window.open(url,'cross','left=10;top=10,toolbar=0,menubar=0,scrollbars=yes,resizable=no,width=650,height=550;');
}

var open_flag2 = 0;
function open_menu2() {
	if (open_flag2 == 0) {
	    document.all('s_menu4').style.visibility = 'visible';
	    open_flag2 = 1;
	} else {
	    document.all('s_menu4').style.visibility = 'hidden';
	    open_flag2 = 0;
	}
	
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function gourl(selObj) {

    var m_value = selObj.options[selObj.selectedIndex].value;
	
	if (m_value == 'b') {
		location.href = '/ko_vision_s_main_en';
	} else if (m_value == 'c') {
		location.href = '/ko_vision_s_main_cn';
	} else if (m_value == 'd') {
		location.href = '/ko_vision_s_main_jp';
	} else if (m_value == 'e') {
		location.href = '/ko_vision_s_main_sp';
	} else if (m_value == 'f') {
		location.href = '/ko_vision_s_main_ru';
	} else if (m_value == 'g') {
		location.href = '/ko_vision_s_main_fr';
	} else if (m_value == 'h') {
		location.href = '/ko_vision_s_main_etc';
	}
	
}

function convert_update_img(t_gubun) {
	
	if (t_gubun==1) {

		document.update_img1.src = "./images/ko/tab01_on.gif";
		document.update_img2.src = "./images/ko/tab02_off.gif";
		document.update_img3.src = "./images/ko/tab03_off.gif";
     	layerMainTitle1.style.display = "block";
     	layerMainTitle2.style.display = "none";
		layerMainTitle3.style.display = "none";
	
	} else if (t_gubun==2) {
		
		document.update_img1.src = "./images/ko/tab01_off.gif";
		document.update_img2.src = "./images/ko/tab02_on.gif";
		document.update_img3.src = "./images/ko/tab03_off.gif";		
     	layerMainTitle1.style.display = "none";
     	layerMainTitle2.style.display = "block";
		layerMainTitle3.style.display = "none";		
		
	} else if (t_gubun==3) {
	
		document.update_img1.src = "./images/ko/tab01_off.gif";
		document.update_img2.src = "./images/ko/tab02_off.gif";
		document.update_img3.src = "./images/ko/tab03_on.gif";			
     	layerMainTitle1.style.display = "none";
     	layerMainTitle2.style.display = "none";
		layerMainTitle3.style.display = "block";		
		
	}
	
	//convert_show(t_gubun);

}

function convert_show(t_gubun) {
    /*
	for (i=1;i<=3;i++) {
		var d = $("layerMainTitle"+i);
		d.hide();
	}
	
	var d = $("layerMainTitle"+t_gubun);
	
	document.getElementById("layerMainTitle2").filters[0].apply();
	d.show();
	document.getElementById("layerMainTitle2").filters[0].play();
	*/
}




