//////////////////////////////////////////////////
// JAMA 左メニュー 一元管理 javascript ver 1.0
// http://www.jama.or.jp/
// charset="Shift_JIS"
//////////////////////////////////////////////////

//メニューリストを格納
function introList(){ //「自工会の概要」http://www.jama.or.jp/intro/
menuArray = new Array("概要<+>/intro/summary.html","沿革<+>/intro/history.html","役員<+>/intro/officer/index.html","組織<+>/intro/organize/index.html","事業内容<+>/intro/business_domain/index.html","業務および財務に関する資料<+>/intro/materials/index.html","採用情報<+>/intro/employ.html","地図<+>/intro/officeMap.html");
}

function statsList(){ //「データファイル」http://www.jama.or.jp/stats/
menuArray = new Array("統計速報<+>/stats/stats_news.html","生産・輸出発表予定日<+>/stats/schedule.html","需要見通し<+>/stats/outlook/index.html","統計月報<+>/stats/m_report/index.html","データベース<+>http://jamaserv.jama.or.jp/newdb/index.html\" target=\"_blank");
}

function libList(){ //「ライブラリー」http://www.jama.or.jp/lib/
menuArray = new Array("主要刊行物のご案内<+>/lib/publish/index.html","JAMAGAZINE<+>/lib/jamagazine/index.html","JAMAレポート<+>/lib/jamareport/index.html","調査分析<+>/lib/invest_analysis/index.html","自動車図書館<+>/lib/car_library/index.html");
}

//メインコンテンツ

function industryList(){ //「日本の自動車産業」http://www.jama.or.jp/industry/
menuArray = new Array("自動車産業<+>/industry/industry/index.html","四輪車<+>/industry/four_wheeled/index.html","二輪車<+>/industry/two_wheeled/index.html","日本の自動車メーカー等<+>/industry/maker/index.html");
}

function worldList(){ //「クルマと世界」http://www.jama.or.jp/world/
menuArray = new Array("海外生産<+>/world/foreign_prdct/index.html","資本・業務提携<+>/world/tieup/index.html","世界生産・販売・保有<+>/world/world/index.html");
}

function ecoList(){ //「クルマと環境」http://www.jama.or.jp/eco/
menuArray = new Array("排出ガス基準<+>/eco/exhaust/index.html","騒音基準<+>/eco/noise/index.html","リサイクル<+>/eco/recycle/index.html","クリーンエネルギー<+>/eco/energy/index.html","低燃費・低排出ガス車認定制度<+>/eco/epvc/index.html","地球環境<+>/eco/earth/index.html","燃料品質に関する提言<+>/eco/wwfc/index.html","ディーゼル車規制に対する自動車メーカーの対応<+>/eco/diesel/index.html","自工会の取り組み<+>/eco/wrestle/index.html","ASR基準重量の算出手順の基本的な考え方<+>/eco/asr_sw/index.html","破砕業者を対象とした自動車リサイクル説明会資料<+>/eco/asr/pamphlet.html","乗用車・貨物車の2015年度燃費基準<+>/eco/fuel2015/index.html","重量車（トラック・バス）の燃費基準<+>/eco/weight/index.html","車室内ＶＯＣ（揮発性有機化合物）低減に対する自主取り組み<+>/eco/voc/index.html","自動車環境情報<+>/eco/eco_car/index.html");
}

function safeList(){ //「クルマと安全」http://www.jama.or.jp/safe/
menuArray = new Array("安全対策<+>/safe/wrestle/index.html","ITS/ASV<+>/safe/future/index.html","交通事故<+>/safe/accident/index.html","盗難防止対策<+>/safe/theft_prevention/index.html","自動車の分類・基準認証<+>/safe/class/index.html","高校生の交通安全教育<+>/safe/safety/index.html","効果的な交通安全対策の実現のために（提言）<+>/safe/measure/index.html","安全と環境への取り組み<+>/safe/safe_eco_digest/index.html","画像表示装置ガイドライン<+>/safe/guideline/index.html","自転車との安全な共存のために<+>/safe/bicycle/index.html");
}

function taxList(){ //「クルマと税金」http://www.jama.or.jp/tax/
menuArray = new Array("自動車関係諸税<+>/tax/outline/index.html","ユーザーの負担<+>/tax/responsibility/index.html","環境対応車に対する軽減<+>/tax/tax_green/index.html","環境対応車の自動車重量税・自動車取得税の減免措置<+>/tax/exemption/index.html","環境対応車への買い換え･購入に対する補助制度<+>/tax/incentive/index.html","道路特定財源<+>/tax/revenue/index.html");
}

function itList(){ //「クルマと情報化」http://www.jama.or.jp/it/
menuArray = new Array(
"クルマと情報通信化<+>/it/info_communication/index.html",
"自動車産業の設計・製造段階における電子情報標準化<+>/it/info_standard/index.html",
"PDQに関わる活動<+>/cgi-bin/pdq/download_pdq.cgi",
"JAMA-JAPIA EDI標準<+>/it/edi/index.html",
"JNXにおける通信アプリケーション PC/WEBガイドライン<+>/cgi-bin/download_jnx.cgi",
"3D図面の標準化に関わる活動<+>/cgi-bin/it/download_01.cgi",
"データ交換運用関連情報<+>/cgi-bin/data_exc/download_data_exc.cgi"
);
}

function userList(){ //「クルマとユーザー」http://www.jama.or.jp/user/
menuArray = new Array("運転席フロアマットの正しい使い方<+>/user/floor_mat/index.html","大型トラック・バスの新・ISO方式ホイールについて<+>/user/iso_wheel/index.html","クルマの健康診断してますか？<+>/user/mainte/index.html\" target=\"_blank","エコ・ドライブ<+>/user/eco_drive/index.html","車輪脱落防止のための正しい車輪の取扱いについて<+>/user/fall_off_wheel/index.html","安全運転.com<+>http://www.anzen-unten.com/\" target=\"_blank","環境にやさしい超低硫黄軽油をご使用の皆様へ<+>/user/s10ppm/index.html","これからの交通社会資本整備のあり方について（提言）<+>/user/traffic_capital/index.html","自動車旅行の活性化に向けて（提言）<+>/user/car_travel/index.html","高齢社会と道路交通環境のあり方について（提言）<+>/user/senior_traffic/index.html");
}

function welfareList(){ //「福祉車両」http://www.jama.or.jp/welfare/
menuArray = new Array("福祉車両と社会環境<+>/welfare/social_milieu/index.html","行政・公的機関による支援<+>/welfare/support/index.html","海外事例レポート<+>/welfare/report/index.html","福祉車両の種類と特徴<+>/welfare/type_feature/index.html","福祉車両Q&A<+>/welfare/qanda/index.html","日本自動車工業会の取り組み<+>/welfare/jama_wrestle/index.html","問い合わせ先一覧<+>/welfare/reference/index.html");
}

function motorcycleList(){ //「モーターサイクル」http://www.jama.or.jp/motorcycle/
menuArray = new Array("くらしの中の二輪車<+>/motorcycle/living/index.html\" target\=\"_blank","二輪車を取り巻く環境<+>/motorcycle/environment/index.html","二輪免許の取り方<+>/motorcycle/license/index.html\" target\=\"_blank","高速道路も二人乗りOK！<+>/motorcycle/highway/index.html","安全とマナー向上のために<+>/motorcycle/manner/ridership.html");
}

function childrenList(){ //「こどものページ」http://www.jama.or.jp/children/
menuArray = new Array("ワクエコ・モーターランド<+>/children/wakueco/index.html","よくわかる自動車百科<+>/children/encyclopedia/index.html\" target\=\"_blank");
}


//メニューリストの生成 +++++++++++++++++++++++++++//
function menuList(cat,current){

//カテゴリー分岐
if(cat == "intro"){          //「自工会の概要」
	introList();
}else if(cat == "stats"){   //「データファイル」
	statsList();
}else if(cat == "lib"){     //「ライブラリー」
	libList();
}else if(cat == "industry"){     //「日本の自動車産業」
	industryList();
}else if(cat == "world"){       //「クルマと世界」
	worldList();
}else if(cat == "eco"){         //「クルマと環境」
	ecoList();
}else if(cat == "safe"){        //「クルマと安全」
	safeList();
}else if(cat == "tax"){         //「クルマと税金」
	taxList();
}else if(cat == "it"){          //「クルマと情報化」
	itList();
}else if(cat == "user"){        //「クルマとユーザー」
	userList();
}else if(cat == "welfare"){     //「福祉車両」
	welfareList();
}else if(cat == "motorcycle"){  //「モーターサイクル」
	motorcycleList();
}else if(cat == "children"){  //「こどものページ」
	childrenList();
}

	//リスト生成
	var menuNum = menuArray.length;

		var listLoop;

		for (listLoop = 0; listLoop < menuNum; listLoop++){
		
			var menuDataArray = menuArray[listLoop].split("<+>");//項目名とURLを分割
			var menuName = menuDataArray[0];//項目名
			var menuURL = menuDataArray[1];//URL
			
			//左メニューを出力
			if(menuName == current){
			document.write('<li>'+menuName+'</li>');//カレント処理
			}else{
			
			document.write('<li><a href="'+menuURL+'">'+menuName+'</a></li>');
			}
		}
		
}

//www.jama.or.jp外のサイト用 メニューリストの生成 +++++++++++++++++++++++++++//
function menuList_out(cat,current){

//カテゴリー分岐
if(cat == "intro"){          //「自工会の概要」
	introList();
}else if(cat == "stats"){   //「データファイル」
	statsList();
}else if(cat == "lib"){     //「ライブラリー」
	libList();
}else if(cat == "industry"){     //「日本の自動車産業」
	industryList();
}else if(cat == "world"){       //「クルマと世界」
	worldList();
}else if(cat == "eco"){         //「クルマと環境」
	ecoList();
}else if(cat == "safe"){        //「クルマと安全」
	safeList();
}else if(cat == "tax"){         //「クルマと税金」
	taxList();
}else if(cat == "it"){          //「クルマと情報化」
	itList();
}else if(cat == "user"){        //「クルマとユーザー」
	userList();
}else if(cat == "welfare"){     //「福祉車両」
	welfareList();
}else if(cat == "motorcycle"){  //「モーターサイクル」
	motorcycleList();
}else if(cat == "children"){  //「チルドレン」
	childrenList();
}

	//リスト生成
	var menuNum = menuArray.length;

		var listLoop;

		for (listLoop = 0; listLoop < menuNum; listLoop++){
		
			var menuDataArray = menuArray[listLoop].split("<+>");//項目名とURLを分割
			var menuName = menuDataArray[0];//項目名
			var menuURL = menuDataArray[1];//URL
			
			//左メニューを出力
			if(menuName == current){
			document.write('<li>'+menuName+'</li>');//カレント処理
			}else if(menuURL.charAt(0) == "/"){
			
			document.write('<li><a href="http://www.jama.or.jp'+menuURL+'">'+menuName+'</a></li>');
			}else{
			
			document.write('<li><a href="'+menuURL+'">'+menuName+'</a></li>');
			}
		}
		
}
