// :: 変数 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

// HTMLファイルの位置判定
	
	// ルート直下にあるHTMLのBODYタグID
	var root_html_id = ['home', 'sitemap'];
	// ルート直下判定
	var root_html_flg = 0;
	// 相対パス記述
	var root_html_dir = '../';



// :: 初期化 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

document.observe('dom:loaded',function(){
	
	// 階層判定
	root_html_id.each(function(value){
		if(value==document.getElementsByTagName('body')[0].id){
			root_html_flg += 1;
		}
	});
	root_html_dir = (root_html_flg==1)? './':'../';
	
	// バックリンク表示
	ShowBackLink();
	
	// ローカルナビ表示
	ShowLocalNavi();
	
	// 関連サイト表示
	ShowSite();
	
});


// -- バックリンク表示 -------------------------------------------------------------------

function ShowBackLink() {
	
	// ページの先頭に戻る
	var page_top_html = '<p><a href=\"#a-top\" onclick=\"BackToTop(); return false;\" onkeypress=\"BackToTop(); return false;\">ページの先頭に戻る↑</a></p>';
	if($('page-top')){ $('page-top').insert(page_top_html); }
	
	// 前のページに戻る
	var page_back_html = '<p><a href=\"#\" onclick=\"window.history.back(); return false;\" onkeypress=\"window.history.back();; return false;\">前のページに戻る←</a></p>';
	if($('page-back')){ $('page-back').insert(page_back_html); }
	
}


// -- ローカルナビ表示 -------------------------------------------------------------------

function ShowLocalNavi() {
	
	// サービス
	var local_navi_service = '';
	local_navi_service += '<h2>メニュー</h2><ul>';
	local_navi_service += '<li class=\"home\"><a href=\"../index.html\" hidefocus=\"true\">ホーム</a></li>';
	local_navi_service += '<li class=\"service\"><a href=\"../service/index.html\" hidefocus=\"true\">サービス</a></li>';
	local_navi_service += '<li><h4>（分ける／調べる）</h4><ul>';
	local_navi_service += '<li class=\"solution-scene\"><a href=\"../service/solution_scene.html\" hidefocus=\"true\">ユーザの利用シーンを深く知りたい</a></li>';
	local_navi_service += '<li class=\"solution-sensitivity\"><a href=\"../service/solution_sensitivity.html\" hidefocus=\"true\">「感性」「感覚」の仕組みを探りたい</a></li>';
	local_navi_service += '<li class=\"solution-market-research\"><a href=\"../service/solution_market_research.html\" hidefocus=\"true\">市場や競合の動向を知りたい</a></li>';
	local_navi_service += '<li class=\"solution-user-type\"><a href=\"../service/solution_user_type.html\" hidefocus=\"true\">態度や心理的傾向によってユーザをタイプ分けしたい</a></li>';
	local_navi_service += '</ul></li>';
	local_navi_service += '<li><h4>（企画する）</h4><ul>';
	local_navi_service += '<li class=\"solution-target\"><a href=\"../service/solution_target.html\" hidefocus=\"true\">ターゲットを明確にしたい</a></li>';
	local_navi_service += '<li class=\"solution-scenario\"><a href=\"../service/solution_scenario.html\" hidefocus=\"true\">ユーザの「感動シナリオ」を作りたい</a></li>';
	local_navi_service += '<li class=\"solution-acceptability\"><a href=\"../service/solution_acceptability.html\" hidefocus=\"true\">企画・コンセプトの受容性を確認したい</a></li>';
	local_navi_service += '</ul></li>';
	local_navi_service += '<li><h4>（設計する／つくる）</h4><ul>';
	local_navi_service += '<li class=\"solution-flow\"><a href=\"../service/solution_flow.html\" hidefocus=\"true\">「思った通りに使える」操作フローを作りたい</a></li>';
	local_navi_service += '<li class=\"solution-design\"><a href=\"../service/solution_design.html\" hidefocus=\"true\">仕様に沿った、提案性の高いデザイン案が欲しい</a></li>';
	local_navi_service += '<li class=\"solution-ui-guideline\"><a href=\"../service/solution_ui_guideline.html\" hidefocus=\"true\">UIのガイドラインを作りたい</a></li>';
	local_navi_service += '<li class=\"solution-simulator\"><a href=\"../service/solution_simulator.html\" hidefocus=\"true\">実際に動くシミュレータを制作したい</a></li>';
	local_navi_service += '</ul></li>';
	local_navi_service += '<li><h4>（確かめる）</h4><ul>';
	local_navi_service += '<li class=\"solution-usability-guideline\"><a href=\"../service/solution_usability_guideline.html\" hidefocus=\"true\">ユーザビリティ評価指標を作りたい</a></li>';
	local_navi_service += '<li class=\"solution-usability-test\"><a href=\"../service/solution_usability_test.html\" hidefocus=\"true\">できた製品は問題なく使えるか、確認したい</a></li>';
	local_navi_service += '<li class=\"solution-expert-review\"><a href=\"../service/solution_expert_review.html\" hidefocus=\"true\">ユーザビリティ専門家に評価して欲しい</a></li>';
	local_navi_service += '<li class=\"solution-labo\"><a href=\"../service/solution_labo.html\" hidefocus=\"true\">ユーザビリティラボに興味がある</a></li>';
	local_navi_service += '</ul></li>';
	local_navi_service += '<li><h4>（学ぶ）</h4><ul>';
	local_navi_service += '<li class=\"solution-ucd-seminar\"><a href=\"../service/solution_ucd_seminar.html\" hidefocus=\"true\">セミナーやコンサルを依頼したい</a></li>';
	local_navi_service += '</ul></li>';
	local_navi_service += '</ul><hr class=\"css\" />';
	if($$('body.service')[0]){$('local-navi').insert(local_navi_service);}
	
	// 研究開発
	var local_navi_rd = '';
	local_navi_rd += '<h2>メニュー</h2><ul>';
	local_navi_rd += '<li class=\"home\"><a href=\"../index.html\" hidefocus=\"true\">ホーム</a></li>';
	local_navi_rd += '<li class=\"rd\"><a href=\"../rd/index.html\" hidefocus=\"true\">研究開発</a></li>';
	local_navi_rd += '<li><ul>';
	local_navi_rd += '<li class=\"ceatec2009\"><a href=\"../rd/ceatec2009.html\" hidefocus=\"true\">CEATEC JAPAN 2009 出展情報</a></li>';
	local_navi_rd += '<li class=\"ceatec2008\"><a href=\"../rd/ceatec2008.html\" hidefocus=\"true\">CEATEC JAPAN 2008 出展情報</a></li>';
	local_navi_rd += '<li class=\"ceatec2007\"><a href=\"../rd/ceatec2007.html\" hidefocus=\"true\">CEATEC JAPAN 2007 出展情報</a></li>';
	local_navi_rd += '<li class=\"ceatec2006\"><a href=\"../rd/ceatec2006.html\" hidefocus=\"true\">CEATEC JAPAN 2006 出展情報</a></li>';
	local_navi_rd += '<li class=\"ceatec2005\"><a href=\"../rd/ceatec2005.html\" hidefocus=\"true\">CEATEC JAPAN 2005 出展情報</a></li>';
	local_navi_rd += '<li class=\"thesis\"><a href=\"../rd/thesis.html\" hidefocus=\"true\">論文発表</a></li>';
	local_navi_rd += '</ul></li>';
	local_navi_rd += '</ul><hr class=\"css\" />';
	if($$('body.rd')[0]){$('local-navi').insert(local_navi_rd);}
	
	// セミナー情報
	var local_navi_seminar = '';
	local_navi_seminar += '<h2>メニュー</h2><ul>';
	local_navi_seminar += '<li class=\"home\"><a href=\"../index.html\" hidefocus=\"true\">ホーム</a></li>';
	local_navi_seminar += '<li class=\"seminar\"><a href=\"../ueyes-lc/index.html\" hidefocus=\"true\">セミナー情報</a></li>';
	local_navi_seminar += '<li><ul>';
	local_navi_seminar += '<li class=\"course-gl0400\"><a href=\"../ueyes-lc/course_gl0400.html\" hidefocus=\"true\">電子政府ユーザビリティ・<br />ガイドライン 紹介セミナー</a></li>';
	local_navi_seminar += '<li class=\"course-gl0100\"><a href=\"../ueyes-lc/course_gl0100.html\" hidefocus=\"true\">電子政府ガイドライン対応<br />ユーザビリティ向上プロセス概論</a></li>';
	local_navi_seminar += '<li class=\"course-gl0500\"><a href=\"../ueyes-lc/course_gl0500.html\" hidefocus=\"true\">電子政府ガイドライン対応<br />NEM無料セミナー</a></li>';
	local_navi_seminar += '<li class=\"course-gl0300\"><a href=\"../ueyes-lc/course_gl0300.html\" hidefocus=\"true\">電子政府ガイドライン対応<br />ユーザビリティテスト入門講座</a></li>';
	local_navi_seminar += '<li class=\"course-gl0200\"><a href=\"../ueyes-lc/course_gl0200.html\" hidefocus=\"true\">電子政府ガイドライン対応<br />モデリングによる現状システムの課題リスト作成講座</a></li>';
	local_navi_seminar += '<li class=\"course-a00\"><a href=\"../ueyes-lc/course_a00.html\" hidefocus=\"true\">ユーザ視点を意識せよ！<br />開発プロセス体験講座</a></li>';
	local_navi_seminar += '<li class=\"course-b00\"><a href=\"../ueyes-lc/course_b00.html\" hidefocus=\"true\">UMLはこう生かせ！<br />ソフトウェア設計講座</a></li>';
	local_navi_seminar += '<li class=\"course-b0102\"><a href=\"../ueyes-lc/course_b0102.html\" hidefocus=\"true\">仕様を見える化する！<br />ユーザ視点フロー講座</a></li>';
	local_navi_seminar += '<li class=\"course-b0203\"><a href=\"../ueyes-lc/course_b0203.html\" hidefocus=\"true\">使いやすさを評価する！<br />ユーザビリティテスト講座</a></li>';
	local_navi_seminar += '<li class=\"course-c00\"><a href=\"../ueyes-lc/course_c00.html\" hidefocus=\"true\">商品力が向上する！<br />UCDプロセス概論講座</a></li>';
	local_navi_seminar += '<li class=\"course-c-text\"><a href=\"../ueyes-lc/course_c_text_01.html\" hidefocus=\"true\">└ テキスト紹介</a></li>';
	local_navi_seminar += '<li class=\"course-c0100\"><a href=\"../ueyes-lc/course_c0100.html\" hidefocus=\"true\">感動商品・サービスを生み出せ！<br />XB法無料セミナー</a></li>';
	local_navi_seminar += '<li class=\"course-c0202\"><a href=\"../ueyes-lc/course_c0202.html\" hidefocus=\"true\">魅力ある商品企画を行なう！<br />感性品質向上講座</a></li>';
	local_navi_seminar += '</ul></li>';
	local_navi_seminar += '</ul><hr class=\"css\" />';
	if($$('body.seminar')[0]){$('local-navi').insert(local_navi_seminar);}
	
	// レポート
	var local_navi_report = '';
	local_navi_report += '<h2>メニュー</h2><ul>';
	local_navi_report += '<li class=\"home\"><a href=\"../index.html\" hidefocus=\"true\">ホーム</a></li>';
	local_navi_report += '<li class=\"report\"><a href=\"../report/index.html\" hidefocus=\"true\">レポート</a></li>';
	local_navi_report += '<li><ul>';
	local_navi_report += '<li><h4>有料レポート</h4></li>';
	local_navi_report += '<li class=\"report-p090616-android\"><a href=\"../report/p090616_android.html\" class="l3" hidefocus=\"true\">Android</a></li>';
	local_navi_report += '<li class=\"report-p090611-iphone\"><a href=\"../report/p090611_iphone.html\" class="l3" hidefocus=\"true\">iPhone 3GS</a></li>';
	local_navi_report += '<li class=\"report-p080731-iphone\"><a href=\"../report/p080731_iphone.html\" class="l3" hidefocus=\"true\">iPhone 3G</a></li>';
	local_navi_report += '<li><h4>無料レポート</h4></li>';
	local_navi_report += '<li class=\"report-f091127-onsen\"><a href=\"../report/f091127_onsen/index.html\" class="l3" target="_blank" hidefocus=\"true\">温泉地に関する尺度『温泉くん』</a></li>';
	local_navi_report += '<li class=\"report-f091127-photo\"><a href=\"../report/f091127_photo/index.html\" class="l3" target="_blank" hidefocus=\"true\">写真の楽しみ方尺度</a></li>';
	local_navi_report += '<li class=\"report-f091127-dtv\"><a href=\"../report/f091127_dtv/index.html\" class="l3" target="_blank" hidefocus=\"true\">人とデジタルテレビの関わり方尺度</a></li>';
	local_navi_report += '<li class=\"report-f091127-eco\"><a href=\"../report/f091127_eco/index.html\" class="l3" target="_blank" hidefocus=\"true\">人とエコの関わり方尺度</a></li>';
	local_navi_report += '<li class=\"report-f091127-health\"><a href=\"../report/f091127_health/index.html\" class="l3" target="_blank" hidefocus=\"true\">人と健康の関わり方尺度</a></li>';
	local_navi_report += '<li class=\"report-f091127-recommend\"><a href=\"../report/f091127_recommend/index.html\" class="l3" target="_blank" hidefocus=\"true\">人とオススメの関わり方尺度</a></li>';
	local_navi_report += '<li class=\"report-f090817-eco\"><a href=\"../report/f090817_eco.html\" class="l3" hidefocus=\"true\">エコに対する関わり方尺度</a></li>';
	local_navi_report += '</ul></li>';
	local_navi_report += '</ul><hr class=\"css\" />';
	if($$('body.report')[0]){$('local-navi').insert(local_navi_report);}
	
	// 会社案内
	var local_navi_company = '';
	local_navi_company += '<h2>メニュー</h2><ul>';
	local_navi_company += '<li class=\"home\"><a href=\"../index.html\" hidefocus=\"true\">ホーム</a></li>';
	local_navi_company += '<li class=\"company\"><a href=\"../company/index.html\" hidefocus=\"true\">会社案内</a></li>';
	local_navi_company += '<li><ul>';
	local_navi_company += '<li class=\"outline\"><a href=\"../company/outline.html\" hidefocus=\"true\">企業概要</a></li>';
	local_navi_company += '<li class=\"philosophy\"><a href=\"../company/philosophy.html\" hidefocus=\"true\">企業理念</a></li>';
	local_navi_company += '<li class=\"history\"><a href=\"../company/history.html\" hidefocus=\"true\">沿革</a></li>';
	local_navi_company += '<li class=\"news\"><a href=\"../news/index.html\" hidefocus=\"true\">ニュースリリース</a></li>';
	//local_navi_company += '<li class=\"graduate\"><a href=\"../company/graduate.html\" hidefocus=\"true\">新卒採用情報</a></li>';
	local_navi_company += '<li class=\"intermediate\"><a href=\"../company/intermediate.html\" hidefocus=\"true\">中途採用情報</a></li>';
	local_navi_company += '<li class=\"global\"><a href=\"../company/global.html\" hidefocus=\"true\">グローバルスタッフ採用情報</a></li>';
	local_navi_company += '<li class=\"security\"><a href=\"../company/security.html\" hidefocus=\"true\">情報セキュリティ基本方針</a></li>';
	local_navi_company += '<li class=\"privacy\"><a href=\"../company/privacy.html\" hidefocus=\"true\">個人情報保護方針</a></li>';
	local_navi_company += '</ul></li>';
	local_navi_company += '</ul><hr class=\"css\" />';
	if($$('body.company')[0]){$('local-navi').insert(local_navi_company);}
	if($$('body.news')[0]){$('local-navi').insert(local_navi_company);}
	
	// アクセス
	var local_navi_access = '';
	local_navi_access += '<h2>メニュー</h2><ul>';
	local_navi_access += '<li class=\"home\"><a href=\"../index.html\" hidefocus=\"true\">ホーム</a></li>';
	local_navi_access += '<li class=\"access\"><a href=\"../access/index.html\" hidefocus=\"true\">アクセス</a></li>';
	local_navi_access += '</ul><hr class=\"css\" />';
	if($$('body.access')[0]){$('local-navi').insert(local_navi_access);}
	
	// お問合せ先一覧
	var local_navi_contact = '';
	local_navi_contact += '<h2>メニュー</h2><ul>';
	local_navi_contact += '<li class=\"home\"><a href=\"../index.html\" hidefocus=\"true\">ホーム</a></li>';
	local_navi_contact += '<li class=\"contact\"><a href=\"../contact/index.html\" hidefocus=\"true\">お問合せ先一覧</a></li>';
	local_navi_contact += '</ul><hr class=\"css\" />';
	if($$('body.contact')[0]){$('local-navi').insert(local_navi_contact);}
	
	// サイトマップ
	var local_navi_sitemap = '';
	local_navi_sitemap += '<h2>メニュー</h2><ul>';
	local_navi_sitemap += '<li class=\"home\"><a href=\"./index.html\" hidefocus=\"true\">ホーム</a></li>';
	local_navi_sitemap += '<li class=\"sitemap\"><a href=\"./sitemap.html\" hidefocus=\"true\">サイトマップ</a></li>';
	local_navi_sitemap += '</ul><hr class=\"css\" />';
	if($$('body.sitemap')[0]){$('local-navi').insert(local_navi_sitemap);}
	
	// モニター登録
	var local_navi_monitor = '';
	local_navi_monitor += '<h2>メニュー</h2><ul>';
	local_navi_monitor += '<li class=\"home\"><a href=\"../index.html\" hidefocus=\"true\">ホーム</a></li>';
	local_navi_monitor += '<li class=\"monitor\"><a href=\"../monitor/index.html\" hidefocus=\"true\">モニター登録</a></li>';
	local_navi_monitor += '</ul><hr class=\"css\" />';
	if($$('body.monitor')[0]){$('local-navi').insert(local_navi_monitor);}
	
}


// -- 関連サイト表示 ---------------------------------------------------------------------

function ShowSite() {
	
	// ★★トップページとwww2は別途更新すること★★
	
	// 開始
	var site_html = '';
	site_html += '<h2>関連サイト</h2>\n<dl>';
	
	// 使研
	site_html += '<dt id=\"tsukaken\"><a href=\"http://usability.ueyesdesign.co.jp/\" target=\"_blank\" hidefocus=\"true\">使いやすさ研究所</a></dt>\n';
	site_html += '<dd>ユーアイズデザインでは、消費者のための情報発信サイト「使いやすさ研究所」を運営しています。</dd>\n';
	
	// モニター募集
	site_html += '<dt id=\"monitor\"><a href=\"';
	site_html += root_html_dir;
	site_html += 'monitor/index.html\" hidefocus=\"true\">モニター募集</a></dt>\n';
	site_html += '<dd>ユーアイズデザインでは、使いやすさの調査に協力していただける「モニター会員」を募集しています。詳しくは、モニター会員募集ページをご覧下さい。</dd>\n';
	
	// HCD-Net
	site_html += '<dt id=\"hcdnet\"><a href=\"http://www.hcdnet.org/\" target=\"_blank\" hidefocus=\"true\">HCD-Net 人間中心設計推進機構</a></dt>\n';
	site_html += '<dd>人間中心設計（Human Centerd Design）を推進するNPO法人、「HCD-Net 人間中心設計推進機構」のサイトです。</dd>\n';
	
	// 終了
	site_html += '</dl>\n';
	site_html += '<hr class=\"css\" />\n';
	
	if($('site')){ $('site').insert(site_html); }
	
}

// -- ページの先頭に戻る -----------------------------------------------------------------

function BackToTop() {
	var x1 = x2 = x3 = 0;
	var y1 = y2 = y3 = 0;
	if (document.documentElement) {
		x1 = document.documentElement.scrollLeft || 0;
		y1 = document.documentElement.scrollTop || 0;
	}
	if (document.body) {
		x2 = document.body.scrollLeft || 0;
		y2 = document.body.scrollTop || 0;
	}
	x3 = window.scrollX || 0;
	y3 = window.scrollY || 0;
	var x = Math.max(x1, Math.max(x2, x3));
	var y = Math.max(y1, Math.max(y2, y3));
	window.scrollTo(Math.floor(x / 2), Math.floor(y / 2));
	if (x > 0 || y > 0) {
		window.setTimeout("BackToTop()", 25);
	}
}


// -- 折りたたみコンテンツ ---------------------------------------------------------------

// -- 展開したページにヒストリーバックした場合の処理 --

function UnFold() {
	var sub='#'+window.location.href.split('=')[1];
	if(sub){j$(sub).slideToggle('fast');}
}


// -- END --


