/****************************************************************
	グローバルナビ　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);
		//alert("flashVersion : "+flashVersion);
		//alert("flashVersion_mac : "+flashVersion_mac)
	}else{
		//alert("noFlash")
		if(pageName=="ch_purchase"){
			globalNaviNFCH(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/loadingIMG_2008.swf?inMypage='+pageName+'"><param name="quality" value="high"><embed src="/flash/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="/corporateProfile/index.html">会社概要</a>｜<a href="/corporateProfile/history.html">フォスターのあゆみ</a>｜<a href="/corporateProfile/group/index.html">グループ会社</a>｜<a href="/corporateProfile/access/index.html">交通のご案内</a>｜<a href="/corporateProfile/productsInfo.html">生産品目のご紹介</a></div>');
document.writeln('<div id="Lay2" class="navigation"><a href="/disclosure/index.html">プレスリリース</a>｜<a href="/disclosure/business.html">決算短信・四半期業績</a>｜<a href="/disclosure/report.html">報告書</a>｜<a href="/disclosure/geMeeting.html">株主総会</a>｜<a href="/disclosure/information.html">お知らせ</a>｜<a href="/disclosure/disclosure.html">ディスクロージャー・ポリシー</a>｜<a href="http://quote.yahoo.co.jp/q?s=6794.t&d=c&k=c3&z=m&h=on"　target="_blank">株価情報</a></div>');
document.writeln('<div id="Lay3" class="navigation"><a href="/csr/index.html">CSRレポート</a></div>');
document.writeln('<div id="Lay4" class="navigation"><a href="/employment/index.html">新卒者</a>｜<a href="/employment/experience.html">経験者</a>｜<a href="/employment/treatment.html">待遇・福利厚生</a>｜<a href="/employment/QandA.html">よくあるご質問</a>｜<a href="/employment/reference.html">お問い合わせ</a></div>');
document.writeln('<div id="Lay5" class="navigation"><a href="/purchase/index.html">ご応募の手引き</a>｜<a href="/purchase/basic.html">購買基本方針</a>｜<a href="/purchase/details.html">募集内容</a>｜<a href="/purchase/process.html">お取引開始の手順</a>｜<a href="/purchase/reference_point.html">お問い合せ・購買拠点</a></div>');
document.writeln('<div id="Lay6" class="navigation"><a href="/topics/index.html">トピックス</a></div>');
document.writeln('<div><img src="/common/heder_'+pageName+'.jpg" width="800" height="275" border="0" usemap="#Map"><map name="Map"><area shape="rect" coords="60,95,200,125" href="/en_index.html" alt="ENGLISH"><area shape="rect" coords="60,64,200,94" href="http://www.foster-electric.com/" target="_blank" alt="FOSTER ELECTRIC"><area shape="rect" coords="60,127,200,157" href="/sitemap/index.html" alt="SITE MAP"><area shape="rect" coords="60,158,200,250" href="/index.htm" alt="HOME"><area shape="rect" coords="200,219,301,251" href="/topics/index.html" alt="トピックス" onMouseOver="ShowHide(5)"><area shape="rect" coords="300,219,401,251" href="/corporateProfile/index.html" alt="会社案内" onMouseOver="ShowHide(0)"><area shape="rect" coords="400,219,501,251" href="/disclosure/index.html" alt="投資家情報" onMouseOver="ShowHide(1)"><area shape="rect" coords="500,219,601,251" href="/csr/index.html" alt="CSRレポート" onMouseOver="ShowHide(2)"><area shape="rect" coords="600,219,701,251" href="/employment/index.html" alt="採用情報" onMouseOver="ShowHide(3)"><area shape="rect" coords="700,219,799,251" href="/purchase/index.html" alt="資材購買活動" onMouseOver="ShowHide(4)"></map></div>');
}

/****************************************************************
	グローバルナビ　JSナビ中国
****************************************************************/
function globalNaviNFCH(pageName)
{
document.writeln('<div id="Lay1"></div>');
document.writeln('<div id="Lay2"></div>');
document.writeln('<div id="Lay3"></div>');
document.writeln('<div id="Lay4"></div>');
document.writeln('<div id="Lay5></div>');
document.writeln('<div id="Lay6"></div>');
document.writeln('<div><img src="/common/heder_'+pageName+'.jpg" width="800" height="275" border="0" usemap="#Map"><map name="Map"><area shape="rect" coords="60,95,200,125" href="/en_index.html" alt="ENGLISH"><area shape="rect" coords="60,64,200,94" href="http://www.foster-electric.com/" target="_blank" alt="FOSTER ELECTRIC WORLD WIDE SITE"><area shape="rect" coords="60,127,200,157" href="/sitemap/index.html" alt="SITE MAP"><area shape="rect" coords="60,158,200,250" href="/index.htm" alt="HOME"></map></div>');
}

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

Lay = new Array("Lay1","Lay2","Lay3","Lay4","Lay5","Lay6")//レイヤーの数
function ShowHide(n) {//レイヤー表示非表示
for(i=0; i<6; 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;/products/index.html&#x27;);reSize(w,h);return false;" onmouseover="swapImage(&#x27;Img011&#x27;,&#x27;&#x27;,&#x27;/common/sideNaviImages/productsOn.gif&#x27;,1)" onmouseout="swapImgRestore()"><img src="/common/sideNaviImages/products.gif" width="140" height="40" border="0" name="Img011" id="Img011" alt="製品情報"></a><br><a href="/personal/index.html" onmouseover="swapImage(&#x27;Img009&#x27;,&#x27;&#x27;,&#x27;/common/sideNaviImages/009on.gif&#x27;,1)" onmouseout="swapImgRestore()"><img src="/common/sideNaviImages/009.gif" width="140" height="25" border="0" name="Img009" id="Img009" alt="個人情報保護方針"></a><br><img src="/common/sideNaviImages/back_sNavi.jpg" width="140" height="120" alt="">');
document.writeln('<div class="googleSerch"><form method=get action="http://www.google.co.jp/search"><a href="http://www.google.co.jp/"><img src="http://www.google.com/logos/Logo_40wht.gif" border="0" alt="Google"></a><input type=text name=q size=31 maxlength=255 value="" style="width:120px;"><input type=hidden name=ie value=Shift_JIS><input type=hidden name=oe value=Shift_JIS><input type=hidden name=hl value="ja"><input type=submit name=btnG value="Google 検索"><input type=hidden name=domains value=""foster.co.jp"><br><input type=radio name=sitesearch value="foster.co.jp" checked> FOSTER.CO.JPを検索</form></div>');
}