var Flash_Version = 8;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;

var url = new String(document.location);
var directory = url.split('/');
//directory.toString();


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 Plugin_Version = words[i];
	}

	var Version_Check_ok = Plugin_Version >= Flash_Version;
	} else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<scr' + 'IPT LANGUAGE=VBScript\>\n');
	document.write('on error resume next \n');
	document.write('Version_Check_ok = ( Isobject(Createobject("ShockwaveFlash.ShockwaveFlash." & Flash_Version)))\n');
	document.write('</scr' + 'IPT\>\n');
}



function writeGlobalNavswf() {

	if (Version_Check_ok) {
		document.write('<div>');
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="589" height="108" id="globalNav" align="middle">');
		document.write('<param name="allowScriptAccess" value="sameDomain">');
		document.write('<param name="movie" value="/globalNav.swf">');
		document.write('<param name="FlashVars" value="v_seen=' + directory[3] + '" />');
		document.write('<param name="quality" value="high">');
		document.write('<param name="bgcolor" value="#ffffff">');
		document.write('<embed src="/globalNav.swf" quality="high" bgcolor="#ffffff" width="589" height="108" swLiveConnect=true id="globalNav" name="globalNav" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" FlashVars="v_seen=' + directory[3] + '">');
		document.write('</object>');
		document.write('</div>');
		document.close();
	} else {
	
		document.writeln('<div id="altFlashBlock">');
		document.writeln('<p id="toMCW"><a href="/mycarweb/index.html" title="”MyCarWebサービス”へのリンク">MyCarWebサービス</a></p>');
		document.writeln('<br class="clear" />');
		document.writeln('<ul id="siteUtility01">');
		document.writeln('<li class="first"><a href="/faq/index.html" title="”よくあるご質問”へのリンク">よくあるご質問</a></li>');
		document.writeln('<li><a href="https://secure.nac-town.co.jp/contact/index.php" title="”お問い合わせ”へのリンク">お問い合わせ</a></li>');
		document.writeln('<li><a href="/sitemap/index.html" title="”サイトマップ”へのリンク">サイトマップ</a></li>');
		document.writeln('</ul>');
		document.writeln('<br class="clear" />');

		document.writeln('<ul id="globalNav">');
		document.writeln('<li><a id="gnavService" name="gnavService" href="./service/index.html" title="”ナカジマ自動車とは”へのリンク">ナカジマ自動車とは</a></li>');
		document.writeln('<li><a id="gnavSearch" name="gnavSearch" href="./search/index.php" title="”ナカジマで車を探す”へのリンク">ナカジマで車を探す</a></li>');
		document.writeln('<li><a id="gnavSell" name="gnavSell" href="https://secure.nac-town.co.jp/sell/index.php" title="”ナカジマで車を売る”へのリンク">ナカジマで車を売る</a></li>');
		document.writeln('<li><a id="gnavInsurance" name="gnavInsurance" href="./insurance/index.html" title="”自動車保険”へのリンク">自動車保険</a></li>');
		document.writeln('<li><a id="gnavMaintenance" name="gnavMaintenance" href="/maintenance/index.html" title="”車検・点検・キズ修理”へのリンク">車検・点検・キズ修理</a></li>');
		document.writeln('<li><a id="gnavUseful" name="gnavUseful" href="./useful/car_news.php" title="”カーライフお役立ち情報”へのリンク">カーライフお役立ち情報</a></li>');
		document.writeln('<li><a id="gnavShopinfo" name="gnavShopinfo" href="./shopinfo/index.html" title="”店舗情報”へのリンク">店舗情報</a></li>');
		document.writeln('</ul>');
		document.writeln('<br class="clear" />');
		document.writeln('</div>');
		document.close();
	}
}
