function WhereIsHere( url ) {

	var val = '../../';

//	var host_name = location.hostname;
//
//	if ( host_name.indexOf("www.sdk.co.jp")    != -1 ) val  ='http://www.sdk.co.jp/';
//	if ( host_name.indexOf("trial2.sdk.co.jp") != -1 ) val  ='http://trial2.sdk.co.jp/';
//	if ( host_name.indexOf("voyger.hbi.ne.jp") != -1 ) val  ='http://voyger.hbi.ne.jp/demo3/sdk/www/';

	var host_name = location.hostname + location.pathname  ;

	if ( host_name.indexOf("www.sdk.co.jp")    != -1 ) val  ='http://www.sdk.co.jp/';
	if ( host_name.indexOf("trial2.sdk.co.jp") != -1 ) val  ='http://trial2.sdk.co.jp/';
//	if ( host_name.indexOf("voyger.hbi.ne.jp/demo3/sdk/www") != -1 ) val  ='http://voyger.hbi.ne.jp/demo3/sdk/www/';
//	if ( host_name.indexOf("voyger.hbi.ne.jp/demo3/sdk/cms/aa/checkarea") != -1 ) val  ='http://voyger.hbi.ne.jp/demo3/sdk/cms/aa/checkarea/';
//	if ( host_name.indexOf("voyger.hbi.ne.jp/demo3/sdk/cms/aa/transfer") != -1 ) val  ='http://voyger.hbi.ne.jp/demo3/sdk/cms/aa/transfer/';

	return val;

}

function getFlashVersionJS()
{
	if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
		for (var i = 0; i < words.length; ++i){
			if (!isNaN(parseInt(words[i]))){ return words[i]; }
		}
	}
	return 0;
}
function FlashVersionCheck(){
	var intFlashVersion;
	var browser = navigator.userAgent;

	// OSチェック
	var osname = navigator.userAgent.toUpperCase();
	
	// ブラウザチェック
	if(browser.indexOf("MSIE",0)<0 && browser.indexOf("Firefox",0)<0 && browser.indexOf("Netscape",0)<0 && browser.indexOf("Safari",0)<0 || window.opera){
		return 0;
	}

	if (0 <= navigator.appName.indexOf("Microsoft")){
		if (0 <= navigator.appVersion.indexOf("Win")){
			intFlashVersion = parseInt(getFlashVersionVBS());
		}
		else{
			intFlashVersion = parseInt(getFlashVersionJS());
		}
	}
	else{
		intFlashVersion = parseInt(getFlashVersionJS());
	}

/*	if (0 <= navigator.appVersion.indexOf("Mac")){
		intFlashVersion = 0;
	}*/
	
	return intFlashVersion;
}
// document.write('<script language="VBScript"\> \n');
// document.write('Function getFlashVersionVBS() \n');
// document.write('On Error Resume Next \n');
// document.write('getFlashVersionVBS = Left(Hex(Int(CreateObject("ShockwaveFlash.ShockwaveFlash").FlashVersion)), 1) \n');
// document.write('If Not 0 = Err.Number Then \n');
// document.write('getFlashVersionVBS = 0 \n');
// document.write('End If \n');
// document.write('End Function \n');
// document.write('</script\> \n');

var val;
var val_2;
var val_img;
var loc_href;

val   = WhereIsHere (  );
val_2 = WhereIsHere (  );

loc_href=location.href;

/* 昭和電工グループについて */
if(loc_href.match('/html/group/')){
	val_img=val_2+'html/group/img/visual.jpg';
}
/* ニュースリリース */
else if(loc_href.match('/aa/news/')){
	val_img=val_2+'html/news/img/visual.jpg';
}
/* 投資家・株主のみなさまへ */
else if(loc_href.match('/html/ir/')){
	val_img=val_2+'html/ir/img/visual.jpg';
}
/* 投資家・株主のみなさまへ */
else if(loc_href.match('/aa/ir/')){
	val_img=val_2+'html/ir/img/visual.jpg';
}
/* 投資家・株主のみなさまへ */
else if(loc_href.match('/contents/investment_info/')){
	val_img=val_2+'html/ir/img/visual.jpg';
}
/* 製品のご紹介 */
else if(loc_href.match('/html/products/')){
	val_img=val_2+'html/products/img/visual.jpg';
}
/* 製品のご紹介 */
else if(loc_href.match('http://www.products.sdk.co.jp/')){
	val_img=val_2+'html/products/img/visual.jpg';
}
/* 研究・技術開発への取り組み */
else if(loc_href.match('/html/rd/')){
	val_img=val_2+'html/rd/img/visual.jpg';
}
/* 研究・技術開発への取り組み */
else if(loc_href.match('http://www.patents.sdk.co.jp/')){
	val_img=val_2+'html/rd/img/visual.jpg';
}
/* 社会・環境への取り組み */
else if(loc_href.match('/html/csr/')){
	val_img=val_2+'html/csr/img/visual.jpg';
}
/* 購買情報 */
else if(loc_href.match('/html/purchase/')){
	val_img=val_2+'html/purchase/img/visual.jpg';
}
/* 購買情報 */
else if(loc_href.match('/aa/purchase/')){
	val_img=val_2+'html/purchase/img/visual.jpg';
}
/* 購買情報 */
else if(loc_href.match('/aa/buyer/')){
	val_img=val_2+'html/purchase/img/visual.jpg';
}
/* お知らせ */
else if(loc_href.match('/aa/whatsnew/')){
	val_img=val_2+'html/whats_new/img/visual.jpg';
}
/* お問い合せ */
else if(loc_href.match('/aa/inquiry/')){
	val_img=val_2+'html/inquiry/img/visual.jpg';
}
/* リンク集 */
else if(loc_href.match('/html/link/')){
	val_img=val_2+'html/link/img/visual.jpg';
}
/* サイトご利用にあたって */
else if(loc_href.match('/html/utility/')){
	val_img=val_2+'html/utility/img/visual.jpg';
}
/* 個人情報の取り扱い */
else if(loc_href.match('/html/privacy/')){
	val_img=val_2+'html/privacy/img/visual.jpg';
}
/* サイトマップ */
else if(loc_href.match('/html/sitemap/')){
	val_img=val_2+'html/sitemap/img/visual.jpg';
}
/* こんなところに昭和電工 */
else if(loc_href.match('/html/konnatokoroni/')){
	val_img=val_2+'html/konnatokoroni/img/visual.jpg';
}
/* バーチャル工場見学 */
else if(loc_href.match('/html/tour/')){
	val_img=val_2+'html/tour/img/visual.jpg';
}
else{
	val_img=val_2+'html/group/img/visual.jpg';
}


var status = 0;
if ( status == 1 ) {
//if(FlashVersionCheck() >= 7){
//if(0){
	document.write('<div id="flashGnavi">');
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="360" height="1000" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="'+val+'html/navi/ja/navi.swf" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="bgcolor" value="#ffffff" />');
	document.write('<param name="flashvars" value="bnr_file='+val_2+'html/navi/ja/bnr.csv&amp;img_file='+val_img+'" />');
	document.write('<embed src="'+val+'html/navi/ja/navi.swf" flashvars="bnr_file='+val_2+'html/navi/ja/bnr.csv&amp;img_file='+val_img+'" quality="high" width="360" height="1000" align="middle" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></embed>');
	document.write('</object>');
	document.write('</div>');
}
else{
	document.write('<div id="htmlGnavi">');
	document.write('<!-- LEFT -->');
	document.write('<div id="left">');
	document.write('<div class="logo"><a href="'+val+'index.html" target="_top"><img src="'+val+'html/common_img/logo_sdk.gif" width="180" height="105" alt="昭和電工"></a></div>');
	document.write('<div class="menu">');
	document.write('<a href="'+val+'html/group/index.html" target="_top"><img src="'+val+'html/common_img/gnavi_group.gif" width="180" height="54" alt="昭和電工グループについて"></a>');
	document.write('<a href="'+val+'aa/news/index.html" target="_top"><img src="'+val+'html/common_img/gnavi_news.gif" width="180" height="35" alt="ニュースリリース"></a>');
	document.write('<a href="'+val+'aa/whatsnew/index.html" target="_top"><img src="'+val+'html/common_img/gnavi_info.gif" width="180" height="35" alt="お知らせ"></a>');
	document.write('<a href="'+val+'contents/investment_info/index.htm" target="_top"><img src="'+val+'html/common_img/gnavi_ir.gif" width="180" height="54" alt="投資家・株主のみなさまへ"></a>');
	document.write('<a href="http://www.products.sdk.co.jp/top_j.html" target="_top"><img src="'+val+'html/common_img/gnavi_products.gif" width="180" height="35" alt="製品のご紹介"></a>');
	document.write('<a href="'+val+'html/rd/index.html" target="_top"><img src="'+val+'html/common_img/gnavi_rd.gif" width="180" height="54" alt="研究・技術開発への取り組み"></a>');
	document.write('<a href="'+val+'html/csr/index.html" target="_top"><img src="'+val+'html/common_img/gnavi_csr.gif" width="180" height="54" alt="社会・環境への取り組み (CSR)"></a>');
	document.write('<a href="'+val+'contents/recruit/index.htm" target="_top"><img src="'+val+'html/common_img/gnavi_recruit.gif" width="180" height="35" alt="採用情報"></a>');
	document.write('<a href="'+val+'html/purchase/index.html" target="_top"><img src="'+val+'html/common_img/gnavi_purchase.gif" width="180" height="35" alt="購買情報"></a>');
	document.write('</div>');
	document.write('<div class="smallmenu">');
	document.write('<a href="https://www.sdk.co.jp/aa/inquiry/aafm_iq_minp.php?id=1" target="_blank">メールお問い合せフォーム</a>');
	document.write('<a href="'+val+'html/link/index.html" target="_top">リンク集</a>');
	document.write('<a href="'+val+'html/utility/index.html" target="_top">サイトご利用にあたって</a>');
	document.write('<a href="'+val+'html/privacy/index.html" target="_top">個人情報の取り扱い</a>');
	document.write('</div>');
	document.write('<div class="group">');
	document.write('<select name="group" onChange="menuLink(this.options[this.selectedIndex].value)">');
	document.write('<option value="">昭和電工グループ</option>');
	document.write('<option value="http://www.shoko.co.jp/">昭光通商</option>');
	document.write('<option value="http://www.secl.co.jp/">昭和エンジニアリング</option>');
	document.write('<option value="http://www.showacan.co.jp/">昭和アルミニウム缶</option>');
	document.write('<option value="http://www.sdat.co.jp/">昭和電工アルミ販売</option>');
	document.write('<option value="http://www.sdk.co.jp/kenzai/">昭和電工建材</option>');
	document.write('<option value="http://www.fuyo-p.co.jp/">芙蓉パーライト</option>');
	document.write('<option value="http://www.uskk.co.jp/">ユニオン昭和</option>');
	document.write('</select>');
	document.write('</div>');

// -- QRコード追加 -- 20080602 -- start
	document.write('<div class="qrcord">');
	document.write('<p class="qr1">昭和電工モバイルサイト</p>');
	document.write('<p class="qr2"><img src="'+val+'html/common_img/qr_sdk.jpg" width="100" height="100" alt=""></p>');
	document.write('<p class="qr1">QRコード未対応の方は<br>URLを直接入力ください<br>http://www.sdk.co.jp/mb/</p>');
	document.write('</div>');
// -- QRコード追加 -- 20080602 -- end

	document.write('</div>');

	document.write('<!-- CENTER -->');
	document.write('<div id="center">');
	document.write('<!-- Search Google -->');
	document.write('<div class="google">');
	document.write('<div class="keyword"><img src="'+val+'html/common_img/searchkeyword.gif" width="129" height="9" alt="グループ内キーワード検索"></div>');
	document.write('<form method="get" action="http://www.google.co.jp/search" name="googleForm" id="googleForm" target="_top">');
	document.write('<table cellspacing="0" width="151"><tr><td>');
	document.write('<input type="text" name="q" size="32" maxlength="255" value="">');
	document.write('</td></tr></table>');
	document.write('<table cellspacing="0" width="151"><tr valign="top"><td>');
	document.write('<a href="http://www.google.co.jp/" target="_blank"><img src="http://www.google.com/logos/Logo_25wht.gif" width="75" height="32" alt="Google" align="absmiddle"></a></td><td align="right">');
	document.write('<input type="image" src="'+val+'html/common_img/btn_search.gif" name="btnG" alt="Search" width="40" height="32" value="Google 検索" class="btn">');
	document.write('<input type="hidden" name="ie" value="euc-jp">');
	document.write('<input type="hidden" name="oe" value="euc-jp">');
	document.write('<input type="hidden" name="hl" value="ja">');
	document.write('<input type="hidden" name="lr" value="ja" checked="checked">');
	// -- 2008/10/28 （08.10.31 HP サイト内検索の改訂作業依頼について）-- start
	document.write('<input type="hidden" name="hq" value="site:www.sdk.co.jp OR site:www.shoko.co.jp OR site:www.secl.co.jp OR site:www.shp.co.jp OR site:www.sdat.co.jp OR site:www.fuyo-p.co.jp OR site:www.karenz.jp OR site:www.autoprep.jp OR site:www.shodex.com OR site:www.showacan.co.jp OR site:www.alumi-shisaku.sdk.co.jp OR site:www.products.sdk.co.jp OR site:www.nptcorp.com OR site:www.uskk.co.jp OR site:www.pochem.co.jp OR site:www.sunallomer.co.jp OR site:www.showa-tansan.co.jp " >');
	// -- 2008/10/28 （08.10.31 HP サイト内検索の改訂作業依頼について）-- end
	document.write('</td></tr></table>');
	document.write('</form>');
	document.write('</div>');
	document.write('<!-- // Search Google -->');
	document.write('<div class="banner">');
	document.write('<!-- 共通バナー -->');
	document.write('<a href="http://www.c-hotline.net/?module=Viewer&codeAcc=SDKC8099755dd12a5365ff968bd8aaaa9896" target="_blank"><img src="'+val+'html/navi/ja/img/banner_conference.gif" width="151" height="42" alt="2010年第1四半期決算説明windows mediaによる音声配信"></a>');
	document.write('<a href="'+val+'contents/recruit/index.htm" target="_top"><img src="'+val+'html/navi/ja/img/banner_recruit.jpg" width="151" height="42" alt="採用情報"></a>');
	document.write('<a href="http://www.karenz.jp/" target="_top"><img src="'+val+'html/navi/ja/img/karenz.jpg" width="151" height="42" alt="カレンズ"></a>');
	document.write('<a href="'+val+'html/ir/index_angel.html" target="_top"><img src="'+val+'html/navi/ja/img/banner_angel.jpg" width="151" height="42" alt="個人投資家のみなさまへ"></a>');
	document.write('<a href="http://www.tuvalu-forest.jp/event/irforum2010tokyo/" target="_blank"><img src="'+val+'html/navi/ja/img/151_42_showadenko.gif" width="151" height="42" alt="IRフォーラム2010東京 8月28日（土）当社出展"></a>');
	document.write('<a href="'+val+'html/konnatokoroni/index.html" target="_top"><img src="'+val+'html/navi/ja/img/banner_konna.jpg" width="151" height="42" alt="こんなところにSHOWA DENKO!"></a>');
	document.write('<a href="'+val+'html/tour/index.html" target="_top"><img src="'+val+'html/navi/ja/img/banner_virtual.jpg" width="151" height="42" alt="バーチャル工場見学"></a>');
	document.write('</div>');
	document.write('</div>');
	document.write('</div>');
}
