﻿///////////////////////////////////////////////////////////////////////
// Info: ヘッドナビゲーションのメニューを表示する。
///////////////////////////////////////////////////////////////////////
/*@cc_on _d=document;eval('var document=_d')@*/

// ブラウザ別による幅の調整
var menu_width;

if (navigator.userAgent.indexOf("MSIE ") != -1) {
	var s = navigator.userAgent.indexOf("MSIE ",0) + 5;
	var e = navigator.userAgent.indexOf(";",s);
	var ver = eval(navigator.userAgent.substring(s,e));
	if(ver < 7)	menu_width = 106;							// IE7.0未満の時の横幅
	else		menu_width = 103;							// IE7.0以上の時の横幅
} else	{
	menu_width = 103;										// その他の時の横幅
}
var sub_style = ' style="width: ' + menu_width + 'px" ';

// メインカテゴリー選択の判定
menu_width = ' style="width: ' + menu_width + 'px';
var color_s = "#ffffff";									// 選択時の文字色
var color_o = "#1a4185";									// 非選択時の文字色
var color_h = "#c3e0fc";									// ホバー時の文字色
var select_col = menu_width + '; color: ' + color_s + '" '; 
var no_col = menu_width + '; color: ' + color_o + '" ';
var hover_col = " this.style.color='" + color_h + "'";
var out_col = " this.style.color='" + color_o + "'";
var home_over = hover_col; technology_over = hover_col; company_over = hover_col; event_over = hover_col; magazine_over = hover_col; job_over = hover_col; business_over = hover_col;
var home_out = out_col; technology_out = out_col; company_out = out_col; event_out = out_col; magazine_out = out_col; job_out = out_col; business_out = out_col;
var home, technology, company, event, magazine, job, business;

if(document.URL.indexOf("page_") == -1) {
	home = select_col;
	home_out = " this.style.color='" + color_s + "'";
	technology = no_col; company = no_col; event = no_col; magazine = no_col; job = no_col; business = no_col;
} else if(document.URL.indexOf("page_technology") != -1) {
	technology = select_col;
	technology_out = " this.style.color='" + color_s + "'";
	home = no_col; company = no_col; event = no_col; magazine = no_col; job = no_col; business = no_col;
} else if(document.URL.indexOf("page_company") != -1) {
	company = select_col;
	company_out = " this.style.color='" + color_s + "'";
	home = no_col; technology = no_col; event = no_col; magazine = no_col; job = no_col; business = no_col;
} else if(document.URL.indexOf("page_event") != -1) {
	event = select_col;
	event_out = " this.style.color='" + color_s + "'";
	home = no_col; technology = no_col; company = no_col; magazine = no_col; job = no_col; business = no_col;
} else if(document.URL.indexOf("page_magazine") != -1) {
	magazine = select_col;
	magazine_out = " this.style.color='" + color_s + "'";
	home = no_col; technology = no_col; company = no_col; event = no_col; job = no_col; business = no_col;
} else if(document.URL.indexOf("page_job_offer") != -1) {
	job = select_col;
	job_out = " this.style.color='" + color_s + "'";
	home = no_col; technology = no_col; company = no_col; event = no_col; magazine = no_col; business = no_col;
} else if(document.URL.indexOf("page_business") != -1) {
	business = select_col;
	business_out = " this.style.color='" + color_s + "'";
	home = no_col; technology = no_col; company = no_col; event = no_col; magazine = no_col; job = no_col;
} else {
	home = no_col; technology = no_col; company = no_col; event = no_col; magazine = no_col; job = no_col; business = no_col;
}

document.write('<ul>',
'<li><a' + home + 'class="top_menu" id="mmenu1" href="' + URL_TOP + 'index.html" onmouseover="mopen(1);' + home_over + '" onmouseout="mclosetime();' + home_out + '" title="トップページ">ホーム</a>',
'<div' + sub_style + 'class="sub_menu" id="menu1" onmouseover="mcancelclosetime()" onmouseout="mclosetime();">',
'<a' + sub_style + 'href="' + URL_TOP + 'update_more.html" title="ホームページの更新履歴">更新情報</a>',
'<a' + sub_style + 'href="' + URL_TOP + 'information/index.html" title="当社からのお知らせの履歴">お知らせ</a>',
'</div></li>',
'<li><a' + technology + 'class="top_menu" id="mmenu2" href="' + URL_TOP + 'page_technology/index.html" onmouseover="mopen(2);' + technology_over + '" onmouseout="mclosetime();' + technology_out + '" title="生産技術のアピールポイント">技術情報</a>',
'<div' + sub_style + 'class="sub_menu" id="menu2" onmouseover="mcancelclosetime()" onmouseout="mclosetime();">',
'<a' + sub_style + 'href="' + URL_TOP + 'page_technology/equipment.html" title="主要生産設備の紹介">設備案内</a>',
'<a' + sub_style + 'href="' + URL_TOP + 'page_technology/product.html" title="当社製品の紹介">製品案内</a>',
'<a' + sub_style + 'href="' + URL_TOP + 'page_technology/training.html" title="各種資格の取得状況">人材育成</a>',
'</div></li>',
'<li><a' + company + 'class="top_menu" id="mmenu3" href="' + URL_TOP + 'page_company/index.html" onmouseover="mopen(3);' + company_over + '" onmouseout="mclosetime();' + company_out + '" title="会社の概要">会社情報</a>',
'<div' + sub_style + 'class="sub_menu" id="menu3" onmouseover="mcancelclosetime()" onmouseout="mclosetime();">',
'<a' + sub_style + 'href="' + URL_TOP + 'page_company/company_history.html" title="会社の歩み">企業沿革</a>',
'<a' + sub_style + 'href="' + URL_TOP + 'page_company/client_list.html" title="主要取引先の紹介">主要取引先</a>',
'<a' + sub_style + 'href="' + URL_TOP + 'page_company/president_greeting.html" title="代表取締役社長の挨拶">社長の挨拶</a>',
'<a' + sub_style + 'href="' + URL_TOP + 'page_company/access_map.html" title="本社と保有工場の地図情報">アクセスマップ</a>',
'</div></li>',
'<li><a' + event + 'class="top_menu" id="mmenu4" href="' + URL_TOP + 'page_event/index.html" onmouseover="mopen(4);' + event_over + '" onmouseout="mclosetime();' + event_out + '" title="社内行事の目録">社内行事</a>',
'<div' + sub_style + 'class="sub_menu" id="menu4" onmouseover="mcancelclosetime()" onmouseout="mclosetime();">',
'<a' + sub_style + 'href="' + URL_TOP + 'page_event/activity_5s/index.html" title="社内清掃の活動内容">５Ｓ活動</a>',
'<a' + sub_style + 'href="' + URL_TOP + 'page_event/activity_qc/index.html" title="品質改善会の活動内容">QC活動</a>',
'<a' + sub_style + 'href="' + URL_TOP + 'page_event/iso_promotion/index.html" title="環境品質保全会の活動内容">ISO推進室</a>',
'<a' + sub_style + 'href="' + URL_TOP + 'page_event/seihuukai/index.html" title="懇親会の開催内容">清風会</a>',
'<a' + sub_style + 'href="' + URL_TOP + 'page_event/theme_talk/index.html" title="交流会の開催内容">テーマトーク</a>',
'<a' + sub_style + 'href="' + URL_TOP + 'page_event/other/index.html" title="上記項目外の行事">その他の行事</a>',
'<a' + sub_style + 'href="' + URL_TOP + 'page_event/report/index.html" title="各種レポートの紹介">レポート</a>',
'</div></li>',
'<li><a' + magazine + 'class="top_menu" id="mmenu5" href="' + URL_TOP + 'page_magazine/index.html" onmouseover="' + magazine_over + '" onmouseout="' + magazine_out + '" title="社内報のバックナンバー">社内報</a></li>',
'<li><a' + job + 'class="top_menu" id="mmenu6" href="' + URL_TOP + 'page_job_offer/index.html" onmouseover="' + job_over + '" onmouseout="' + job_out + '" title="求人募集要項">求人案内</a></li>',
'<li><a' + business + 'class="top_menu" id="mmenu7" href="' + URL_TOP + 'page_business/index.html" onmouseover="' + business_over + '" onmouseout="' + business_out + '" title="ご商談申し込み">ご商談窓口</a></li>',
'</ul>');
