var main_lang=document.location.href;
if (main_lang.indexOf("_eng.")!=-1){main_lang="eng";}
else if (main_lang.indexOf("_kor.")!=-1){main_lang="kor";}
else if (main_lang.indexOf("_jpn.")!=-1){main_lang="jpn";}
else if (main_lang.indexOf("_fre.")!=-1){main_lang="fre";}
else if (main_lang.indexOf("_ger.")!=-1){main_lang="ger";}
else if (main_lang.indexOf("_rus.")!=-1){main_lang="rus";}
else if (main_lang.indexOf("_chn.")!=-1||main_lang.indexOf("_sch.")!=-1){main_lang="sch";}
else if (main_lang.indexOf("_hk.")!=-1||main_lang.indexOf("_tch.")!=-1){main_lang="tch";}
function loginbox(mode){
	if (mode=="1"){
		document.all.signin.username.style.backgroundImage="";
		if (document.all.signin.password.value==""){
			document.all.signin.password.style.backgroundImage="url('http://www.koreanair.com/etc/img/main/"+main_lang+"/input_bgimg_pw_"+main_lang+".gif')";
/*			
			if(main_lang=="eng")
			{
				document.all.signin.password.style.backgroundImage="url('http://www.koreanair.com/etc/img/main/"+main_lang+"/input_bgimg_pw_"+main_lang+".gif')";
			}
			else if(main_lang=="kor")
			{
				document.all.signin.password.style.backgroundImage="url('http://www.koreanair.com/etc/img/main/kor/input_bgimg_pw_kor.gif')";
			}
			else if(main_lang=="jpn")
			{
				document.all.signin.password.style.backgroundImage="url('http://www.koreanair.com/etc/img/main/jpn/input_bgimg_pw_jpn.gif')";
			}
*/
		}
	}
	else if(mode=="2"){
		document.all.signin.password.style.backgroundImage="";
		if (document.all.signin.username.value==""){
			if(document.all.signin.loginselect[1].checked){
				document.all.signin.username.style.backgroundImage="url('http://www.koreanair.com/etc/img/main/"+main_lang+"/input_bgimg_sp_"+main_lang+".gif')";
/*
				if(main_lang=="eng")
				{
					document.all.signin.username.style.backgroundImage="url('http://www.koreanair.com/etc/img/main/"+main_lang+"/input_bgimg_sp_"+main_lang+".gif')";
				}
				else if(main_lang=="kor")
				{
					document.all.signin.username.style.backgroundImage="url('http://www.koreanair.com/etc/img/main/kor/input_bgimg_sp_kor.gif')";
				}
				else if(main_lang=="jpn")
				{
					document.all.signin.username.style.backgroundImage="url('http://www.koreanair.com/etc/img/main/jpn/input_bgimg_sp_jpn.gif')";
				}
*/
			}
			else{
				if(main_lang=="kor"){
					document.all.signin.username.style.backgroundImage="url('http://www.koreanair.com/etc/img/main/kor/input_bgimg_id_kor.gif')";
				}
				else if(main_lang=="rus"){
					document.all.signin.username.style.backgroundImage="url('http://www.koreanair.com/etc/img/main/rus/input_bgimg_id_rus.gif')";
				}
				else{
					document.all.signin.username.style.backgroundImage="url('http://www.koreanair.com/etc/img/main/eng/input_bgimg_id_eng.gif')";
				}
			}
		}
	}
	else if(mode=="3"){
		if (document.all.signin.password.value==""){
			document.all.signin.password.style.backgroundImage="url('http://www.koreanair.com/etc/img/main/"+main_lang+"/input_bgimg_pw_"+main_lang+".gif')";
/*
			if(main_lang=="eng")
			{
				document.all.signin.password.style.backgroundImage="url('http://www.koreanair.com/etc/img/main/"+main_lang+"/input_bgimg_pw_"+main_lang+".gif')";
			}
			else if(main_lang=="kor")
			{
				document.all.signin.password.style.backgroundImage="url('http://www.koreanair.com/etc/img/main/kor/input_bgimg_pw_kor.gif')";
			}
			else if(main_lang=="jpn")
			{
				document.all.signin.password.style.backgroundImage="url('http://www.koreanair.com/etc/img/main/jpn/input_bgimg_pw_jpn.gif')";
			}
*/
		}
		if (document.all.signin.username.value==""){
			if(document.all.signin.loginselect[1].checked){
				document.all.signin.username.style.backgroundImage="url('http://www.koreanair.com/etc/img/main/"+main_lang+"/input_bgimg_sp_"+main_lang+".gif')";
/*
				if(main_lang=="eng")
				{
					document.all.signin.username.style.backgroundImage="url('http://www.koreanair.com/etc/img/main/"+main_lang+"/input_bgimg_sp_"+main_lang+".gif')";
				}
				else if(main_lang=="kor")
				{
					document.all.signin.username.style.backgroundImage="url('http://www.koreanair.com/etc/img/main/kor/input_bgimg_sp_kor.gif')";
				}
				else if(main_lang=="jpn")
				{
					document.all.signin.username.style.backgroundImage="url('http://www.koreanair.com/etc/img/main/jpn/input_bgimg_sp_jpn.gif')";
				}
*/
			}
			else{
				if(main_lang=="kor"){
					document.all.signin.username.style.backgroundImage="url('http://www.koreanair.com/etc/img/main/kor/input_bgimg_id_kor.gif')";
				}
				else if(main_lang=="rus"){
					document.all.signin.username.style.backgroundImage="url('http://www.koreanair.com/etc/img/main/rus/input_bgimg_id_rus.gif')";
				}
				else{
					document.all.signin.username.style.backgroundImage="url('http://www.koreanair.com/etc/img/main/eng/input_bgimg_id_eng.gif')";
				}
			}
		}
	}
	return true;
}
function doLogin() {
	if( document.signin.username.value == "" ) {
		alert("Check User ID Field.");
        document.signin.username.focus();
        return false;
	}
	if( document.signin.password.value == "" ) {
    	alert("Check Password Field.");
		document.signin.password.focus();
		return false;
	}
	return true;
}
function dispObj(isite, ilang, svrPath){
document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0' width='240' height='204'>");
document.write("<param name='movie' value='"+svrPath+"main/img/banner/kal_global.swf'>");
document.write("<param name='quality' value='high'>");
document.write("<param name='FlashVars' value='xmlPath=http://image.koreanair.com/Main/index/xml/global_config.xml&amp;forKR="+isite+"&amp;lang="+ilang+"&amp;todayUrl=http://kr.koreanair.com/kalmain/etcasp/webutil/flashtimechk.asp'>");
document.write("<param name='base' value='"+svrPath+"main/img/banner/index.htm'>");
document.write("<param name='wmode' value='transparent'>");
document.write("<embed src='"+svrPath+"main/img/banner/kal_global.swf' width='240' height='204' quality='high' pluginspage='http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' flashvars='xmlPath=http://image.koreanair.com/Main/index/xml/global_config.xml&amp;forKR="+isite+"&amp;lang="+ilang+"&amp;todayUrl=http://kr.koreanair.com/kalmain/etcasp/webutil/flashtimechk.asp' base='"+svrPath+"main/img/banner/index.htm' wmode='transparent'></embed>");
document.write("</object>");
}
//QUICK
function dispObjMenu(isite, ilang, svrPath){
document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0' width='495' height='61'>");
document.write("          <param name='movie' value='http://image.koreanair.com/Main/index/XML/kal_quick.swf'>");
document.write("          <param name='quality' value='high'>");
document.write("          <param name='FlashVars' value='xmlPath=http://image.koreanair.com/Main/index/XML/quick_config.xml&amp;forKR="+isite+"&amp;lang="+ilang+"'>");
document.write("          <param name='base' value='http://image.koreanair.com/Main/index/XML/'>");
document.write("<param name='wmode' value='transparent'>");
document.write("<param name='allowScriptAccess' value='always'>");
document.write("<embed src='http://image.koreanair.com/Main/index/XML/kal_quick.swf' width='495' height='61' quality='high' pluginspage='http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' flashvars='xmlPath=http://image.koreanair.com/Main/index/XML/quick_config.xml&amp;forKR="+isite+"&amp;lang="+ilang+"' base='http://image.koreanair.com/Main/index/XML/' wmode='transparent' allowScriptAccess='always' wmode='transparent'></embed>");
document.write("        </object>");
}
//QUICK
function dispObjMain(isite, ilang, svrPath){
document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='"+svrPath+"://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0' width='514' height='330'>");
document.write("          <param name='movie' value='"+svrPath+"main/img/pmp/kal_pmp.swf'>");
document.write("          <param name='quality' value='high'>");
document.write("          <param name='FlashVars' value='xmlPath=http://image.koreanair.com/Main/index/xml/PMP_config.xml&amp;forKR="+isite+"&amp;lang="+ilang+"&amp;todayUrl=http://kr.koreanair.com/kalmain/etcasp/webutil/flashtimechk.asp'>");
document.write("          <param name='base' value='"+svrPath+"main/img/pmp/index.htm'>");
document.write("<param name='wmode' value='transparent'>");
document.write("          <embed src='"+svrPath+"main/img/pmp/kal_pmp.swf' width='514' height='330' quality='high' ");
document.write("pluginspage='"+svrPath+"://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' ");
document.write("flashvars='xmlPath=http://image.koreanair.com/Main/index/xml/PMP_config.xml&amp;forKR="+isite+"&amp;lang="+ilang+"&amp;todayUrl=http://kr.koreanair.com/kalmain/etcasp/webutil/flashtimechk.asp' ");
document.write("base='"+svrPath+"main/img/pmp/index.htm' wmode='transparent'></embed>");
document.write("        </object>");
}
function callClickEvt(clickName) {	
eval('try{ _trk_clickTrace( \'EVT\', \''+clickName+'\'); }catch(_e){ }');
}
//신기재 배너 링크 변경
function tmp()
{
}