///// popup
function pWin(){
	if(arguments[0]){
		var url = arguments[0];
		var tgt = (arguments[1] ? arguments[1] : '_self');
		var prp = (arguments[2] ? arguments[2] : '');
		var nWin = new Object();
		if(prp) nWin = window.open(url,tgt,prp);
		else if(tgt=='map') nWin = window.open(url,tgt,'width=600,height=600,scrollbars=1,resizable=1');
		else if(tgt=='policy') nWin = window.open(url,tgt,'width=600,height=600,scrollbars=1,resizable=1');
		else if(tgt=='security') nWin = window.open(url,tgt,'width=600,height=600,scrollbars=1,resizable=1');
		else nWin = window.open(url,tgt);
		nWin.focus();
	}
}

///// navigation current markup
function mn(id) {
	if(!document.layers) {
		img =" /img/mn" + id + "_on.gif";
		styleStr = "<style type='text/css'>\n";
		styleStr+= "#menu a.mn" + id + " { background-image:url(" + img + ");}\n";
		styleStr+= "</style>";
		document.write(styleStr);
	}
}
function nav(id) {
	if(!document.layers) {
		if(id.length>1) img = "/img/nav2_on.gif";
		else img = "/img/nav_on.gif";
		styleStr = "<style type='text/css'>\n";
		styleStr+= "#navigation #" + id + " a { background-image:url(" + img + ");background-color:#DDD;}\n";
		styleStr+= "</style>";
		document.write(styleStr);
	}
}

///// flash detector
var MM_contentVersion = 6;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if (plugin) {
	var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	for (var i = 0; i < words.length; ++i) {
		if (isNaN(parseInt(words[i])))
		continue;
		var MM_PluginVersion = words[i]; 
	}
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE") >= 0
	&& (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}

///// language change
function chgLang(form) {
	var country = form.elements[0].options[form.elements[0].options.selectedIndex].value;
	switch (country) {
		case "ja" : location.href = "../ja/index.html";break;
		case "en" : location.href = "../en/index.html";break;
		case "de" : location.href = "../de/index.html";break;
		case "zh" : location.href = "../zh/index.html";break;
		case "ko" : location.href = "../ko/index.html";break;
		case "th" : location.href = "../th/index.html";break;
	}
}

///// parent Window Link
var URL = new Array();
function winDisp(URL){ 

if(!window.opener || window.opener.closed){
open(URL);
} 
else{ 
window.opener.location.href = URL;
window.opener.focus();
} 

}