var top =
'<div id="top">' +
'	<div class="logo"><p class="kw"><a href="/kw/index.html"><img src="/kw/img/kw_logo.gif" width="200" height="56" alt="株式会社富士通ラーニングメディア Knowledge Wing" /></a></p></div>' +
'	<div class="tool">' +
'		<table class="menu" align="right">' +
'			<tr>' +
'				<td><a class="link" href="http://jp.fujitsu.com/group/flm/about/index.html" target="_blank">会社概要</a></td>' +
'				<td><a class="link" href="/kw/site_map/index.html">サイトマップ</a></td>' +
'				<td class="last"><form name="formCafe" method="post" action="https://www.knowledgewing.com/icm/srv/course-application/init-regist" target="cafe" onsubmit="javascript:return submitCafe();"><input type="hidden" name="cd" value="FLM" /><input type="hidden" name="hash" value="" /><input type="image" src="/kw/img/btn_cart.png" alt="カートへ" /></form></td>' +
'			</tr>' +
'		</table>' +
'		<form action="/cgi-bin/kw/search/search.cgi" method="get">' +
'			<table class="search" align="right">' +
'				<tr>' +
'					<td class="input"><input type="text" name="query" /></td>' +
'					<td class="button"><input type="image" alt="検索する" src="/kw/img/btn_search.png" /></td>' +
'				</tr>' +
'			</table>' +
'		</form>' +
'	</div>' +
'</div>';

var global = '';
// デフォルトのグローバルメニュー
var global01 =
'<div id="global">'+
'	<div class="menu">'+
'		<ul>'+
'			<li><a href="/kw/index.html"><img src="/kw/img/global_home_off.png" alt="ホーム" width="69" height="30" /></a></li>' +
'			<li><a href="/kw/service/index.html"><img src="/kw/img/global_service_off.png" alt="サービス" width="82" height="30" /></a></li>' +
'			<li><a href="/kw/contact/index.html"><img src="/kw/img/global_otoiawase_off.png" alt="お問い合わせ" width="105" height="30" /></a></li>' +
'			<li><a href="/kw/catalog/index.html"><img src="/kw/img/global_download_off.png" alt="資料ダウンロード・請求" width="171" height="30" /></a></li>' +
'			<li><a href="/kw/user/guide.html"><img src="/kw/img/global_first_off.png" alt="初めてご利用になる方へ" width="172" height="30" /></a></li>' +
'		</ul>'+
'	</div>'+
'</div>';

// サービスがONのグローバルメニュー
var global02 =
'<div id="global">' +
'	<div class="menu">' +
'		<ul>' +
'			<li><a href="/kw/index.html"><img src="/kw/img/global_home_off.png" alt="ホーム" width="69" height="30" /></a></li>' +
'			<li><a href="/kw/service/index.html"><img src="/kw/img/global_service_on.png" alt="サービス" width="82" height="30" /></a></li>' +
'			<li><a href="/kw/contact/index.html"><img src="/kw/img/global_otoiawase_off.png" alt="お問い合わせ" width="105" height="30" /></a></li>' +
'			<li><a href="/kw/catalog/index.html"><img src="/kw/img/global_download_off.png" alt="資料ダウンロード・請求" width="171" height="30" /></a></li>' +
'			<li><a href="/kw/user/guide.html"><img src="/kw/img/global_first_off.png" alt="初めてご利用になる方へ" width="172" height="30" /></a></li>' +
'		</ul>' +
'	</div>' +
'</div>';

// お問合せがONのグローバルメニュー
var global03 =
'<div id="global">'+
'	<div class="menu">'+
'		<ul>'+
'			<li><a href="/kw/index.html"><img src="/kw/img/global_home_off.png" alt="ホーム" width="69" height="30" /></a></li>' +
'			<li><a href="/kw/service/index.html"><img src="/kw/img/global_service_off.png" alt="サービス" width="82" height="30" /></a></li>' +
'			<li><a href="/kw/contact/index.html"><img src="/kw/img/global_otoiawase_on.png" alt="お問い合わせ" width="105" height="30" /></a></li>' +
'			<li><a href="/kw/catalog/index.html"><img src="/kw/img/global_download_off.png" alt="資料ダウンロード・請求" width="171" height="30" /></a></li>' +
'			<li><a href="/kw/user/guide.html"><img src="/kw/img/global_first_off.png" alt="初めてご利用になる方へ" width="172" height="30" /></a></li>' +
'		</ul>'+
'	</div>'+
'</div>';

// 資料ダウンロードがONのグローバルメニュー
var global04 =
'<div id="global">'+
'	<div class="menu">'+
'		<ul>'+
'			<li><a href="/kw/index.html"><img src="/kw/img/global_home_off.png" alt="ホーム" width="69" height="30" /></a></li>' +
'			<li><a href="/kw/service/index.html"><img src="/kw/img/global_service_off.png" alt="サービス" width="82" height="30" /></a></li>' +
'			<li><a href="/kw/contact/index.html"><img src="/kw/img/global_otoiawase_off.png" alt="お問い合わせ" width="105" height="30" /></a></li>' +
'			<li><a href="/kw/catalog/index.html"><img src="/kw/img/global_download_on.png" alt="資料ダウンロード・請求" width="171" height="30" /></a></li>' +
'			<li><a href="/kw/user/guide.html"><img src="/kw/img/global_first_off.png" alt="初めてご利用になる方へ" width="172" height="30" /></a></li>' +
'		</ul>'+
'	</div>'+
'</div>';

// 初めての方へがONのグローバルメニュー
var global05 =
'<div id="global">'+
'	<div class="menu">'+
'		<ul>'+
'			<li><a href="/kw/index.html"><img src="/kw/img/global_home_off.png" alt="ホーム" width="69" height="30" /></a></li>' +
'			<li><a href="/kw/service/index.html"><img src="/kw/img/global_service_off.png" alt="サービス" width="82" height="30" /></a></li>' +
'			<li><a href="/kw/contact/index.html"><img src="/kw/img/global_otoiawase_off.png" alt="お問い合わせ" width="105" height="30" /></a></li>' +
'			<li><a href="/kw/catalog/index.html"><img src="/kw/img/global_download_off.png" alt="資料ダウンロード・請求" width="171" height="30" /></a></li>' +
'			<li><a href="/kw/user/guide.html"><img src="/kw/img/global_first_on.png" alt="初めてご利用になる方へ" width="172" height="30" /></a></li>' +
'		</ul>'+
'	</div>'+
'</div>';

if(location.pathname.match(/^\/kw\/service\//)){
	header = top + global02;
	global = global02;
}else if(location.pathname.match(/^\/kw\/contact\//)){
	header = top + global03;
	global = global03;
}else if(location.pathname.match(/^\/kw\/concierge\//)){
	header = top + global03;
	global = global03;
}else if(location.pathname.match(/^\/kw\/catalog\//)){
	header = top + global04;
	global = global04;
}else if(location.pathname.match(/^\/kw\/user\/guide\.html/)){
	header = top + global05;
	global = global05;
}else{
	header = top + global01;
	global = global01;
}

//左メニュー
left_menu01=
'	<div class="buttonarea">'+
'		<p><a href="https://www.knowledgewing.com/FLM/"><img src="/kw/img/btn_login.png" alt="ログインする（マイページ）" width="200" height="60" /></a></p>'+
'		<p><a href="/kw/user/index.html"><img src="/kw/img/btn_userentry.png" alt="新規ユーザ登録する" width="200" height="40" /></a></p>'+
'	</div>'+
'	<div class="searchMenu">'+
'		<form action="https://www.knowledgewing.com/icm/srv/course-application/search" target="cafe" onsubmit="javascript:submitCourseSearch(this);">'+
'			<input type="hidden" name="cd" value="FLM" />'+
'			<input type="hidden" name="pcd" value="FLMC" />'+
'			<ul>'+
'				<li><p><img src="/kw/img/img_course_search.png" alt="コースを探す" width="208" height="45" /></p></li>'+
'				<li><p><img src="/kw/img/img_keyword_search.png" alt="キーワードで探す" width="208" height="23" /></p></li>'+
'				<li>'+
'					<table align="center">'+
'						<tr>'+
'							<td><input type="text" size="18" name="word" /></td>'+
'							<td><input type="image" alt="検索" src="/kw/img/btn_course_search.png" /></td>'+
'						</tr>'+
'					</table>'+
'				</li>'+
'				<li><p class="text"><a class="link" href="https://www.knowledgewing.com/icm/srv/course-application/init-search?cd=FLM" target="cafe">詳細検索ページへ</a></p></li>'+
'				<li><p><a  href="/kw/search/ca/index.html"><img src="/kw/img/btn_category.png" alt="カテゴリ（マップ）から探す" width="208" height="32" /></a></p></li>'+
'				<li><p><a  href="/kw/search/hr/index.html"><img src="/kw/img/btn_jinzai.png" alt="人材パターンから探す" width="208" height="36" /></a></p></li>'+
'			</ul>'+
'		</form>'+
'	</div>'+
'	<div class="buttonarea">'+
'		<p><a href="/kw/entry/index.html"><img src="/kw/img/btn_how_to.png" alt="お申込み方法" width="200" height="40" /></a></p>'+
'	</div>'+
'	<div class="buttonarea">'+
'		<ul class="menuLink">'+
'			<li><a href="/kw/faq/index.html">よくあるご質問（FAQ）</a></li>'+
'			<li><a href="/kw/map/index.html">講習会会場一覧</a></li>'+
'		</ul>'+
'	</div>'+
'	<div class="buttonarea">'+
'		<p style="margin-top:1.5em;"><a href="/kw/shikaku_nintei/index.html"><img src="/kw/img/btnl_course.png" alt="認定/資格取得コース" width="200" height="40" /></a></p>'+
'		<p><a href="/kw/recommend/index.html"><img src="/kw/img/btnl_recommend.png" alt="おすすめコース" width="200" height="40" /></a></p>'+
// '		<p><a href="/kw/ranking/index.html"><img src="/kw/img/btnl_ranking.png" alt="人気コースランキング" width="200" height="40" /></a></p>'+
'		<p><a href="/kw/west/index.html"><img src="/kw/img/btnl_west.png" alt="KnowledgeWing West" width="200" height="40" /></a></p>'+
'	</div>'+
'	<div class="other-service">'+
'		<h2><img src="/kcc/img/top_h2_other_service.png" width="210" height="35" alt="その他サービス" /></h2>'+
'		<ul>'+
'			<li><a href="/kcc/cafe/index.html" target="_blank"><img src="/kcc/img/bnr_cafe.png" width="190" height="40" alt="KnowledgeC@fe" /></a></li>'+
'		</ul>'+
'		<p><img src="/kcc/img/other-service-separate.png" width="199" height="1" alt="" /></p>'+
'		<ul>'+
'			<li><a href="/kcc/consul/index.html" target="_blank"><img src="/kcc/img/bnr_consulting.png" width="190" height="40" alt="コンサルティング" /></a></li>'+
'			<li><a href="/kcc/bpo/index.html" target="_blank"><img src="/kcc/img/bnr_bpo.png" width="190" height="40" alt="研修運営" /></a></li>'+
'			<li><a href="/kcc/el/index.html" target="_blank"><img src="/kcc/img/bnr_el.png" width="190" height="40" alt="eラーニング制作" /></a></li>'+
'			<li><a href="/kcc/web/index.html" target="_blank"><img src="/kcc/img/bnr_web.png" width="190" height="40" alt="Web制作" /></a></li>'+
'			<li><a href="/kcc/document/index.html" target="_blank"><img src="/kcc/img/bnr_document.png" width="190" height="40" alt="ドキュメント・翻訳" /></a></li>'+
'		</ul>'+
'	</div>'+
'	<div class="buttonarea">'+
'		<p style="margin-top:1.5em;"><a href="http://flm-blog.cocolog-nifty.com/blog/" target="_blank"><img src="/kw/img/btnl_blog.png" alt="情報ブログ 人材育成最前線" width="200" height="40" /></a></p>'+
'		<p><a href="http://twitter.com/KnowledgeFLM" target="_blank"><img src="/kw/img/btnl_twitter.png" alt="当社公式twitter KnowledgeFLM" width="200" height="40" /></a></p>'+
'	</div>';

left_menu02=
'	<div class="buttonarea">'+
'		<p><a href="https://www.knowledgewing.com/FLM/"><img src="/kw/img/btn_login.png" alt="ログインする（マイページ）" width="200" height="60" /></a></p>'+
'		<p><a href="/kw/user/index.html"><img src="/kw/img/btn_userentry.png" alt="新規ユーザ登録する" width="200" height="40" /></a></p>'+
'	</div>'+
'	<div class="searchMenu">'+
'		<form action="https://www.knowledgewing.com/icm/srv/course-application/search" target="cafe" onsubmit="javascript:submitCourseSearch(this);">'+
'			<input type="hidden" name="cd" value="FLM" />'+
'			<input type="hidden" name="pcd" value="FLMC" />'+
'			<ul>'+
'				<li><p><img src="/kw/img/img_course_search.png" alt="コースを探す" width="208" height="45" /></p></li>'+
'				<li><p><img src="/kw/img/img_keyword_search.png" alt="キーワードで探す" width="208" height="23" /></p></li>'+
'				<li>'+
'					<table align="center">'+
'						<tr>'+
'							<td><input type="text" size="18" name="word" /></td>'+
'							<td><input type="image" alt="検索" src="/kw/img/btn_course_search.png" /></td>'+
'						</tr>'+
'					</table>'+
'				</li>'+
'				<li><p class="text"><a class="link" href="https://www.knowledgewing.com/icm/srv/course-application/init-search?cd=FLM" target="cafe">詳細検索ページへ</a></p></li>'+
'				<li><p><a  href="/kw/search/ca/index.html"><img src="/kw/img/btn_category.png" alt="カテゴリ（マップ）から探す" width="208" height="32" /></a></p></li>'+
'				<li><p><a  href="/kw/search/hr/index.html"><img src="/kw/img/btn_jinzai.png" alt="人材パターンから探す" width="208" height="36" /></a></p></li>'+
'			</ul>'+
'		</form>'+
'	</div>'+
'	<div class="buttonarea">'+
'		<p><a href="/kw/entry/index.html"><img src="/kw/img/btn_how_to.png" alt="お申込み方法" width="200" height="40" /></a></p>'+
'	</div>'+
'	<div class="buttonarea">'+
'		<ul class="menuLink">'+
'			<li><a href="/kw/faq/index.html">よくあるご質問（FAQ）</a></li>'+
'			<li><a href="/kw/map/index.html">講習会会場一覧</a></li>'+
'		</ul>'+
'	</div>'+
'	<div class="buttonarea">'+
'		<p style="margin-top:1.5em;"><a href="/kw/shikaku_nintei/index.html"><img src="/kw/img/btnl_course.png" alt="認定/資格取得コース" width="200" height="40" /></a></p>'+
'		<p><a href="/kw/recommend/index.html"><img src="/kw/img/btnl_recommend.png" alt="おすすめコース" width="200" height="40" /></a></p>'+
// '		<p><a href="/kw/ranking/index.html"><img src="/kw/img/btnl_ranking.png" alt="人気コースランキング" width="200" height="40" /></a></p>'+
// '		<p><a href="/kw/west/index.html"><img src="/kw/img/btnl_west.png" alt="KnowledgeWing West" width="200" height="40" /></a></p>'+
'	</div>'+
'	<div class="buttonarea">'+
'		<p style="margin-top:1.5em;"><a href="http://flm-blog.cocolog-nifty.com/blog/" target="_blank"><img src="/kw/img/btnl_blog.png" alt="情報ブログ 人材育成最前線" width="200" height="40" /></a></p>'+
'		<p><a href="http://twitter.com/KnowledgeFLM" target="_blank"><img src="/kw/img/btnl_twitter.png" alt="当社公式twitter KnowledgeFLM" width="200" height="40" /></a></p>'+
'	</div>';

// 左メニューにおけるKCCサービスの出し分け
if(location.pathname.match(/^\/kw\/service\//)){
	left_menu = left_menu01;
}else if(location.pathname.match(/^\/kw\/e_l\//)){
	left_menu = left_menu01;
}else{
	left_menu = left_menu02;
}


//フッター
footer=
'	<div class="bottombody">'+
'		<ul>'+
'			<li><a class="link" href="http://jp.fujitsu.com/flm/" target="_blank">富士通ラーニングメディア</a></li>'+
'			<li><a class="link" href="http://jp.fujitsu.com/flm/privacy/" target="_blank">個人情報保護ポリシー</a></li>'+
'			<li><a class="link" href="/kw/terms/index.html">当サイトの利用条件</a></li>'+
'			<li><a class="link" href="/kw/link/index.html">リンク集</a></li>'+
'		</ul>'+
'	</div>'+
'	<div class="footer"><p>Powered by KnowledgeC@fe in SaaS</p></div>';

//閉じる、戻るボタンのアクション
function win_close() {
 window.close();
}
function win_back() {
 history.back();
}

// フォーカスを当てながら新規ウィンドウを開く関数
function winOpenFocus(obj){
	var win = window.open(obj.href,obj.target);
	win.focus();
	return false;
}

// カートサブミット
function submitCafe(){
	// 親ウィンドウを取得
	var opr = window.opener;
	try{
		if(opr.document.forms[0].hash){
			opr.name = 'cafe';
			document.formCafe.method = 'post';
			document.formCafe.hash.value = opr.document.forms[0].hash.value;
			opr.focus();
		}
	}catch(e){
		submitCafeNewWin();
	}
	return true;
}

function submitCafeNewWin(){

	// 「cafe」という名のウィンドウオブジェクトを取得
	var win = window.open('','cafe');
	if(win){
		try{
			if(win.document.forms[0].hash){
				document.formCafe.method = 'post';
				document.formCafe.hash.value = win.document.forms[0].hash.value;
			}
		}catch(e){
			document.formCafe.method = 'get';
			document.formCafe.hash.value = '';
		}
		win.focus();
	}else{
		document.formCafe.method = 'get';
		document.formCafe.hash.value = '';
	}
}

function submitCourseSearch(obj){
	var win = window.open('',obj.target);
	win.focus();
	return true;
}

//最終変更日の日付を自動判定
modDate=new Date(document.lastModified);
year=modDate.getFullYear();
month=modDate.getMonth()+1;
date=modDate.getDate();
renewal=year+"年"+month+"月"+date+"日";




