/*********************************************************************
 *
 *  </common/js/header_f.js>
 *
*********************************************************************/

var kikkomanHeader = function () {
	var settings = {
		product: [
			"/products/",
			"/kikkoman/",
			"/yuzuka/",
			"/uchi-gohan/",
			"/delmonte/",
			"/manjo/",
			"/manns/",
			"/wine/",
			"/yu/"
		],
		recipe: ["/homecook/"],
		enjoy: [
			"/enjoys/",
			"/campaign/",
			"/ohashi/",
			"/50th/",
			"/soyworld/",
			"/kcc/"
		],
		corporate: [
			"/corporate/",
			"/shokuiku/",
			"/company/",
			"/kankyou/",
			"/kenkyu/",
			"/news/",
			"/syakai/",
			"/hospital/",
			"/bio/",
			"/csr/",
			"/anzen/"
		],
		ir: [
			"/ir/",
			"/finance/"
		],
		recruit: ["/works/"],
		customer: [
			"/customer/",
			"/soudan/"
		]
	};
	var category = "";
	if (typeof window.category != "undefined") {
		category = window.category;
	} else {
		for (var i in settings) {
			var setting = settings [i];
			for (var j = 0; j < setting.length; j++) {
				if (location.pathname.indexOf (setting [j]) == 0) {
					category = i;
					break;
				}
			}
			if (category) {
				break;
			}
		}
	}
	var test = /(soy|desktop|202|132|marx3|staging)/.test (location.hostname);
	var path = {
		link: location.protocol == "https:" || !test ? "http://www.kikkoman.co.jp" : "",
		resource: location.protocol == "https:" ? "https://www.kikkoman.co.jp" : (!test ? "http://www.kikkoman.co.jp" : "")
	};
	var external = location.hostname.indexOf ("kikkoman.co.jp") == -1 && !test;
	return {
		category: category,
		path: path,
		external: external
	};
} ();
document.write (
	"<link rel='stylesheet' type='text/css' href='" + kikkomanHeader.path.resource  + "/common/css/header.css' media='all' />" +
	"<link rel='alternate stylesheet' type='text/css' href='" + kikkomanHeader.path.resource  + "/common/css/text_size/large.css' media='all' title='文字：大' />" +
	"<link rel='stylesheet' type='text/css' href='" + kikkomanHeader.path.resource  + "/common/css/text_size/medium.css' media='all' title='文字：中' />" +
	"<link rel='alternate stylesheet' type='text/css' href='" + kikkomanHeader.path.resource  + "/common/css/text_size/small.css' media='all' title='文字：小' />" +
	"<script type='text/javascript' src='" + kikkomanHeader.path.resource  + "/common/js/styleswitcher.js'></script>" +
	"<div id='kikkoman-header'>" +
	"<div id='kikkoman-utility'>" +
	"<p><a href='" + kikkomanHeader.path.link + "/index.html' target='_top'><img src='" + kikkomanHeader.path.resource  + "/common/image/img_utility_01.gif' width='138' height='47' alt='キッコーマン おいしい記憶をつくりたい。' /></a></p>" +
	(!kikkomanHeader.external && location.protocol != "https:" && location.pathname.indexOf ("/homecook") != 0 ? "<form id='searchform01' name='searchform01' action='" + kikkomanHeader.path.link + "/search/index.html' method='get' ><input type='text' class='text' name='keyword' value='' /><input id='search01' type='image' class='button' src='" + kikkomanHeader.path.resource  + "/common/image/btn_utility_06.gif' width='34' height='23' value='検索' alt='検索' /></form>" : "") +
	"<dl>" +
	"	<dt><img src='" + kikkomanHeader.path.resource  + "/common/image/txt_utility_01.gif' width='24' height='9' alt='文字：' /></dt>" +
	"	<dd class='small' onclick='styleswitcher.set (\"文字：小\");'>小</dd>" +
	"	<dd class='medium' onclick='styleswitcher.set (\"文字：中\");'>中</dd>" +
	"	<dd class='large' onclick='styleswitcher.set (\"文字：大\");'>大</dd>" +
	"</dl>" +
	"<ul>" +
	"	<li><a href='" + kikkomanHeader.path.link + "/campaign/index.html' target='_top'><img src='" + kikkomanHeader.path.resource  + "/common/image/btn_utility_01.gif' width='89' height='32' alt='キャンペーン' /></a></li>" +
	(location.pathname.indexOf ("/corporate/life/research/") != 0 ? "<li><a href='" + kikkomanHeader.path.link + "/link/shop.html' target='_blank'><img src='" + kikkomanHeader.path.resource  + "/common/image/btn_utility_02.gif' width='72' height='32' alt='通信販売' /></a></li>" : "") +
	"	<li><a href='" + kikkomanHeader.path.link + "/homecook/mail/index.html' target='_top'><img src='" + kikkomanHeader.path.resource  + "/common/image/btn_utility_03.gif' width='71' height='32' alt='メルマガ' /></a></li>" +
	"	<li><a href='" + kikkomanHeader.path.link + "/sitemap.html' target='_top'><img src='" + kikkomanHeader.path.resource  + "/common/image/btn_utility_04.gif' width='88' height='32' alt='サイトマップ' /></a></li>" +
	"</ul>" +
	"</div>" +
	"<div id='kikkoman-global-navigation'>" +
	"<ul class='" + kikkomanHeader.category + "'>" +
	"	<li class='product'><a href='" + kikkomanHeader.path.link + "/products/' target='_top'>商品情報</a></li>" +
	"	<li class='recipe'><a href='" + kikkomanHeader.path.link + "/homecook/index.html' target='_top'>レシピ</a></li>" +
	"	<li class='enjoy'><a href='" + kikkomanHeader.path.link + "/enjoys/index.html' target='_top'>食を、知る・楽しむ</a></li>" +
	"	<li class='corporate'><a href='" + kikkomanHeader.path.link + "/corporate/index.html' target='_top'>企業情報</a></li>" +
	"	<li class='ir'><a href='" + kikkomanHeader.path.link + "/ir/index.html' target='_top'>IR情報</a></li>" +
	"	<li class='recruit'><a href='" + kikkomanHeader.path.link + "/works/index.html' target='_top'>採用情報</a></li>" +
	"	<li class='customer'><a href='" + kikkomanHeader.path.link + "/customer/index.html' target='_top'>お客様相談センター</a></li>" +
	"</ul>" +
	"</div>" +
	"</div>"
);

