/****************************************************************
	グローバルナビ　FLASH/JS切り替え
****************************************************************/

function FPCheck(pageName) {
	
		var flashVersion=false;
		var flashVersion_mac=false;
		var nn=(navigator.appName.charAt(0)=="N");
		var n6=(document.getElementById && nn) || false;
		var ie=(document.all && !nn) || false;
		var mac=(navigator.userAgent.indexOf("Mac")!=-1) || false;
		var ver=""+navigator.appVersion;
		var fno=ver.indexOf(" ");
		var macChecked=0;
		ver=eval(ver.substring(0,fno));
		
		
		var plgIn="Shockwave Flash"
		var autoGo=false;
		
		var ok=false;
		document.MM_returnValue = false;
		
		
		with (navigator) if (appName.indexOf('Microsoft')!=-1 && appVersion.indexOf('Mac')==-1) {
			document.write('<scr'+'ipt language="VBScript"> \n');
			document.write('On error resume next \n');
			document.write('MM_dir = IsObject(CreateObject("SWCtl.SWCtl.1")) \n');
			document.write('MM_flash = NOT IsNull(CreateObject("ShockwaveFlash.ShockwaveFlash")) \n');
			document.write('</scr'+'ipt>');
			//alert("document.write : "+window.MM_flash);
		}
		
		with (navigator) if (appName.indexOf('Microsoft')==-1 || (plugins && plugins.length)) {
			ok=(plugins && plugins[plgIn]);
		} else if (appVersion.indexOf('3.1')==-1) { //not Netscape or Win3.1
			if (plgIn.indexOf("Flash")!=-1 && window.MM_flash!=null) ok=window.MM_flash;
			else if (plgIn.indexOf("Director")!=-1 && window.MM_dir!=null) ok=window.MM_dir;
			else ok=false; 
		}
		//alert("ok : "+ok);
		
		
		if(ok){
		if (ie && !mac){
			flashVersion=new ActiveXObject("ShockwaveFlash.ShockwaveFlash").FlashVersion();
			flashVersion=Math.floor(flashVersion / 0x10000);
		}
		}
		
		
		
		if (!flashVersion){
			//alert("plugins="+navigator.plugins["Shockwave Flash"])
			if (nn && !document.plugins) {
				//alert("!flashVersion_stop1");
				flashVersion=false;
			} else if ((nn || n6) && navigator.plugins["Shockwave Flash"]) {
				//alert("!flashVersion_stop2");
				//alert("name : "+navigator.plugins["Shockwave Flash"].description)
				flashVersion=navigator.plugins["Shockwave Flash"].description.charAt(16);
			} else {
				//alert("!flashVersion_stop3");
				flashVersion=false;
			}
		}
		
		
		var plugin = ( navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0 );
		//alert("plugin : "+plugin)
		if(plugin){
			flashVersion_mac=parseInt(plugin.description.match(/\d+\.\d+/));
		}
		
		
		
	if(flashVersion>=6 || flashVersion_mac>=6){
		globalNaviYF(pageName);
	}else{
		globalNaviNF(pageName);
	}
}


function FPCheckOld(pageName)
{
	var strTemp = new String();
	var strArg = new String();
	var nLength;
	strTemp = location.search;
	nLength = strTemp.length;
	strArg = strTemp.substring(1, nLength)
		if(strArg=="js"){
		globalNaviNF(pageName);
		}else{
		globalNaviYF(pageName);
		}
}


/****************************************************************
	サイドナビ　FLASH/noFLASH取得
****************************************************************/
function localSearch(theURL)
{
	var strTemp = new String();
	var strArg = new String();
	var nLength;
	strTemp = location.search;
	nLength = strTemp.length;
	strArg = strTemp.substring(1, nLength)
if(strArg=="js"){
window.location = theURL+"?"+strArg;
}else{
window.location = theURL;
}
}


/****************************************************************
	グローバルナビ　FLASHナビ
****************************************************************/
function globalNaviYF(pageName)
{
document.writeln('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="800" height="275"><param name="movie" value="/flash/en_loadingIMG_2008.swf?inMypage='+pageName+'"><param name="quality" value="high"><embed src="/flash/en_loadingIMG_2008.swf?inMypage='+pageName+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="800" height="275"></embed></object>');
}


/****************************************************************
	グローバルナビ　JSナビ
****************************************************************/
function globalNaviNF(pageName)
{
document.writeln('<div id="Lay1" class="navigation"><a href="/en_topics/index.html"><img src="/jsNavigation/top_01.gif" width="31" height="15" border="0" alt="Topics"></a></div>');
document.writeln('<div id="Lay2" class="navigation"><a href="/en_corporateProfile/index.html"><img src="/jsNavigation/cor_01.gif" width="83" height="15" border="0" alt="Company Outline"></a><img src="/jsNavigation/oth_01.gif" width="13" height="15" alt=""><a href="/en_corporateProfile/history.html"><img src="/jsNavigation/cor_02.gif" width="84" height="15" border="0" alt="Company History"></a><img src="/jsNavigation/oth_01.gif" width="13" height="15" alt=""><a href="/en_corporateProfile/group/index.html"><img src="/jsNavigation/cor_03.gif" width="84" height="15" border="0" alt="Group Companies"></a><img src="/jsNavigation/oth_01.gif" width="13" height="15" alt=""><a href="/en_corporateProfile/productsInfo.html"><img src="/jsNavigation/cor_04.gif" width="86" height="15" border="0" alt="Prodution Items"></a></div>');
document.writeln('<div id="Lay3" class="navigation"><a href="/en_disclosure/report.html"><img src="/jsNavigation/dis_02.gif" width="82" height="15" border="0" alt="Business Report"></a><img src="/jsNavigation/oth_01.gif" width="13" height="15" alt=""><a href="/en_disclosure/geMeeting.html"><img src="/jsNavigation/dis_03.gif" width="168" height="15" border="0" alt="General Meeting of Shareholders"></a></div>');
document.writeln('<div id="Lay4" class="navigation"><a href="/en_purchase/index.html"><img src="/jsNavigation/pur_01.gif" width="131" height="15" border="0" alt="Guidelines for applications"></a><img src="/jsNavigation/oth_01.gif" width="13" height="15" alt=""><a href="/en_purchase/basic.html"><img src="/jsNavigation/pur_02.gif" width="126" height="15" border="0" alt="Basic purchasing policies"></a><img src="/jsNavigation/oth_01.gif" width="13" height="15" alt=""><a href="/en_purchase/details.html"><img src="/jsNavigation/pur_03.gif" width="85" height="15" border="0" alt="Items of interest"></a><img src="/jsNavigation/oth_01.gif" width="13" height="15" alt=""><a href="/en_purchase/process.html"><img src="/jsNavigation/pur_04.gif" width="59" height="15" border="0" alt="Procedures"></a><img src="/jsNavigation/oth_01.gif" width="13" height="15" alt=""><a href="/en_purchase/reference_point.html"><img src="/jsNavigation/pur_05.gif" width="137" height="15" border="0" alt="Contacts/Production Sites"></a></div>');
document.writeln('<div><img src="/common/heder_en_'+pageName+'.jpg" width="800" height="275" border="0" usemap="#Map"><map name="Map"><area shape="rect" coords="60,65,200,95" href="http://www.foster-electric.com/" target="_blank" alt="FOSTER ELECTRIC"><area shape="rect" coords="60,96,200,126" href="/index.htm" alt="JAPANES"><area shape="rect" coords="60,127,200,157" href="/en_sitemap/index.html" alt="SITE MAP"><area shape="rect" coords="60,158,200,250" href="/en_index.html" alt="HOME"><area shape="rect" coords="200,219,351,250" href="/en_topics/index.html" alt="Topics" onMouseOver="ShowHide(0)"><area shape="rect" coords="350,219,501,250" href="/en_corporateProfile/index.html" alt="Corporate profile" onMouseOver="ShowHide(1)"><area shape="rect" coords="500,219,650,250" href="/en_disclosure/report.html" alt="Investors" onMouseOver="ShowHide(2)"><area shape="rect" coords="649,219,798,250" href="/en_purchase/index.html" alt="Purchasing Activities" onMouseOver="ShowHide(3)"></map></div>');
}

/****************************************************************
	グローバル JSナビ　表示非表示SCRIPT
****************************************************************/

Lay = new Array("Lay1","Lay2","Lay3","Lay4")//レイヤーの数
function ShowHide(n) {//レイヤー表示非表示
for(i=0; i<4; i++){
	if (document.all) document.all(Lay[i]).style.visibility = "hidden"
	else if ( document.getElementById ) 
	document.getElementById(Lay[i]).style.visibility = "hidden"
	}
if (document.all) document.all(Lay[n]).style.visibility = "visible"
else if ( document.getElementById ) 
document.getElementById(Lay[n]).style.visibility = "visible"
}

//----●for Netscape4
function NcReload(){window.document.location.reload()}
if(document.layers) window.onresize = NcReload


/****************************************************************
	サイドナビゲーション　アクティブ切り替え
****************************************************************/
var the_count = 0;
var the_timeout;
function changImg(dName,iNum){
directoryName = dName;
imgName = iNum;
the_count += 2;
if(document.images){
	document["Img00"+imgName].src = "/"+directoryName+"/sideNaviImages/00"+imgName+"on.gif";
}
if(the_count>=4){
clearTimeout(the_timeout);
}else{
the_timeout = setTimeout('changImg("'+dName+'",'+iNum+')',2000);
}
}


/****************************************************************
	サイドナビゲーション　製品情報　個人情報
****************************************************************/
function sideNavigation()
{
document.writeln('<a href="javascript:void(0);" onclick="openWindowPro(&#x27;/en_products/index.html&#x27;);reSize(w,h);return false;" onmouseover="swapImage(&#x27;Img011&#x27;,&#x27;&#x27;,&#x27;/common/sideNaviImages/en_productsOn.gif&#x27;,1)" onmouseout="swapImgRestore()"><img src="/common/sideNaviImages/en_products.gif" width="140" height="40" border="0" name="Img011" id="Img011" alt="Products"></a><br><img src="/common/sideNaviImages/back_sNavi.jpg" width="140" height="120" alt="">');
}