function MM_reImg() { //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_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}


function MM_onImg() { //v3.0
  var i,j=0,x,a=MM_onImg.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 TranExample(Lng, Sec)
{
	location.href = "TranExample.aspx?L=" + Lng + "&S=" + Sec;
}

function NoticeWin(val)
{
	NWin = window.open("/korea/Asp/NoticeView.aspx?P=noticeview&idx=" + val, "LniNotice", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=520,height=400");
	NWin.focus();
}

function SiteTran(nValue)
{
	TranWin = window.open("/Korea/Service/WebTranslation/WebTran/SiteTran.aspx?u="+nValue+"&p=toandto_news", "ToAndToDom", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=1000,height=700");
	TranWin.focus();
}

function KESiteTran(nValue)
{
	TranWin = window.open("/Korea/Service/WebTranslation/WebTran/siteTran.aspx?T=ktran&slang=KO-KR&tlang=EN-US&U=" + nValue, "LniMain", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=yes,width=850,height=730");

	TranWin.focus();
}

function KCSiteTran(nValue)
{
	TranWin = window.open("/Korea/Service/WebTranslation/WebTran/siteTran.aspx?T=ktran&slang=KO-KR&tlang=ZH-CHS&U=" + nValue, "LniMain", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=yes,width=850,height=730");

	TranWin.focus();
}


function SiteInfo(nValue)
{
	winForm = window.open("/korea/service/webtranslation/ek/siteinfo.aspx?T=siteinfo&X=" + nValue, "SiteInfo", "width=500,height=420,toolbar=no,scrollbars=no,resizable=no,status=no");
	winForm.focus();
}

function OnCashWin(requestURL, popupName)
{
	var popupWinType="toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no";
	switch(popupName)
	{
		case "buytotocash":
			popupWinType += ",scrollbars=no,width=500,height=600,left=0,top=0";
			break;
		default:
			break;
	}
	winForm = window.open(requestURL, popupName, popupWinType);
	winForm.focus();

}
ServerUrl = "http://www.solru.net/songfile/"
function OnRefresh()
{
	self.location.reload();
}

function OnPopUpWin(requestURL, popupName)
{
	var popupWinType="toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no";
	switch(popupName)
	{
		case "buytotocash":
			popupWinType += ",scrollbars=no,width=500,height=600,left=0,top=0";
			break;
		default:
			break;
	}
	winForm = window.open(requestURL, popupName, popupWinType);
	winForm.focus();
}

function NoticeEvent()
{
	var objCookie = new _Cookie();
	var todaydate = new Date();

	objCookie.Read();
	
	var strValue=objCookie.FindName("ToAndToEvent");

	objCookie.Close();
	delete objCookie;
	var strdate = todaydate.getYear() + "/" + (todaydate.getMonth()+1) + "/" + todaydate.getDate();	

	if (strValue!=strdate)
	{
		window.open("/Korea/Event/Event20050722.aspx","ToAndToEvent","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=520");
	}
}

function WinTran(vUrl)
{
	nWin = window.open("/korea/service/yuhak/webtran.aspx?U=" + vUrl, "LniMain", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=yes,width=820,height=820");
	nWin.focus();
}

function ImeSetup(requestURL)
{
	winForm = window.open("/Korea/Service/WebTranslation/Jk/ImeDownload/" + requestURL, "ImeSetup", "width=600,height=500,toolbar=no,scrollbars=yes,resizable=no,status=no");
	winForm.focus();
}




function HumanTranHelp()
{
	winForm = window.open("/Korea/Service/HumanTran/HumanTranHelp.aspx", "HumanHelp", "width=600,height=600,toolbar=no,scrollbars=yes,resizable=no,status=no");
	winForm.focus();
}

function ServicePromise()
{
	winForm = window.open("/Korea/popupwin/popup/service_notice01.htm", "ServicePromise", "width=500,height=580,toolbar=no,scrollbars=no,resizable=no,status=no");
	winForm.focus();

}

function TranUpdate(val)
{
	winForm = window.open("/Korea/popupwin/popup/tranupdate0120.htm" + val, "TranUpdate", "width=620,height=600,toolbar=no,scrollbars=yes,resizable=no,status=no");
	winForm.focus();

}

function HeadImageDisplay()
{
		var headcode = "";  
		var arrImages = Array();
		var index = 0;
		
		/*
		arrImages[0] = "new_mobile";
		arrImages[1] = "new_chanese";
		arrImages[2] = "new_maln";
		arrImages[3] = "winter_maln";
		index = Math.floor(Math.random()*arrImages.length);
		*/

		arrImages[0] = "spring";
		
		headcode += '<OBJECT id="main_flash" codeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" height="100" width="700" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" VIEWASTEXT>';
		headcode += '<PARAM NAME="_cx" VALUE="18521">';
		headcode += '<PARAM NAME="_cy" VALUE="2646">';
		headcode += '<PARAM NAME="FlashVars" VALUE="18521">';
		headcode += '<PARAM NAME="Movie" VALUE="/korea/images/' + arrImages[index] + '.swf">';
		headcode += '<PARAM NAME="Src" VALUE="/korea/images/' + arrImages[index] + '.swf">';
		headcode += '<PARAM NAME="WMode" VALUE="Window">';
		headcode += '<PARAM NAME="Play" VALUE="-1">';
		headcode += '<PARAM NAME="Loop" VALUE="-1">';
		headcode += '<PARAM NAME="Quality" VALUE="High">';
		headcode += '<PARAM NAME="SAlign" VALUE="">';
		headcode += '<PARAM NAME="Menu" VALUE="0">';
		headcode += '<PARAM NAME="Base" VALUE="">';
		headcode += '<PARAM NAME="AllowScriptAccess" VALUE="always">';
		headcode += '<PARAM NAME="Scale" VALUE="ShowAll">';
		headcode += '<PARAM NAME="DeviceFont" VALUE="0">';
		headcode += '<PARAM NAME="EmbedMovie" VALUE="0">';
		headcode += '<PARAM NAME="BGColor" VALUE="FFFFFF">';
		headcode += '<PARAM NAME="SWRemote" VALUE="">';
		headcode += '<EMBED src="/korea/images/' + arrImages[index] + '.swf menu="false" quality="high" bgcolor="#FFFFFF" WIDTH="700" HEIGHT="100" NAME="main_flash" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">';
		headcode += '</EMBED>';
		headcode += '</OBJECT>';
		
		document.all.item("HeadImage").innerHTML = headcode;
}