var URL = '/';
var IMG = '/';
/* HEADER */
function Header(){
	document.write('<div><a href="'+ URL +'english/"><img src="'+ IMG +'common/image/header/ejcs_off.gif" width="181" height="10" alt="EAST JAPAN CONSTRUCTION SURETY" /></a></div>');
	document.write('<ul>');
		document.write('<li class="hide"><a href="#MAIN">ページ本文へジャンプ</a></li>');
		document.write('<li><a href="'+ URL +'"><img src="'+ IMG +'common/image/header/home_off.gif" width="53" height="22" alt="ホーム" /></a></li>');
		document.write('<li><a href="'+ URL +'contact/"><img src="'+ IMG +'common/image/header/contact_off.gif" width="124" height="22" alt="お問い合わせ・Q＆A" /></a></li>');
		document.write('<li><a href="'+ URL +'sitemap.html"><img src="'+ IMG +'common/image/header/sitemap_off.gif" width="82" height="22" alt="サイトマップ" /></a></li>');
		document.write('<li><a href="'+ URL +'english/"><img src="'+ IMG +'common/image/header/english_off.gif" width="66" height="22" alt="English" /></a></li>');
		document.write('<li>');
			document.write('<form id="SEARCH" name="search" method="GET" action="http://www.google.co.jp/search" target="_blank">');
				document.write('<fieldset>');
					document.write('<input type="hidden" name="ie" value="UTF-8" />');
					document.write('<input type="hidden" name="oe" value="UTF-8" />');
					document.write('<input type="hidden" name="hl" value="ja" />');
					document.write('<input type="hidden" name="sitesearch" value="ejcs.co.jp" />');
					document.write('<input type="text" name="q" value="サイト内検索" class="searchkey" onfocus="this.value=\'\'" />');
					document.write('<input type="image" name="btnG" src="'+ IMG +'common/image/header/search.gif" jg="imghover" alt="Search" />');
				document.write('</fieldset>');
			document.write('</form>');
		document.write('</li>');
	document.write('</ul>');
}
/* POPUP */
function Letterhead(){
	document.write('<ul>');
		document.write('<li class="hide"><a href="#MAIN">ページ本文へジャンプ</a></li>');
		document.write('<li><a href="javascript:void(0);" onclick="window.print();"><img src="'+ IMG +'common/image/header/print_off.gif" width="65" height="22" alt="印刷する" /></a></li>');
		document.write('<li><a href="javascript:void(0);" onclick="window.close();"><img src="'+ IMG +'common/image/header/close_off.gif" width="54" height="22" alt="閉じる" /></a></li>');
	document.write('</ul>');
}
/* NAV */
function Nav(){
	document.write('<ol>');
		document.write('<li><a href="'+ URL +'guarantee/"><img src="'+ IMG +'common/image/nav/guarantee.gif" id="Nav-guarantee" class="imgover" width="240" height="34" alt="保証について" /></a></li>');
		document.write('<li><a href="'+ URL +'report/"><img src="'+ IMG +'common/image/nav/report.gif" id="Nav-report" class="imgover" class="imgover" width="240" height="34" alt="統計情報/刊行物" /></a></li>');
		document.write('<li><a href="'+ URL +'about/"><img src="'+ IMG +'common/image/nav/about.gif" id="Nav-about" class="imgover" class="imgover" width="240" height="34" alt="会社情報" /></a></li>');
		document.write('<li><a href="'+ URL +'group/"><img src="'+ IMG +'common/image/nav/group.gif" id="Nav-group" class="imgover" class="imgover" width="240" height="34" alt="グループ会社" /></a></li>');
	document.write('</ol>');
}
/* MOVE */
function toTop(){
	document.write('<p><a href="#TOP"><img src="'+ IMG +'common/image/footer/pagetop_off.gif" width="120" height="25" alt="このページの先頭へ" /></a></p>');
}
/* GUIDE */
function Guide(){
	document.write('<table summary="コンテンツ一覧">');
		document.write('<col width="18%" />');
		document.write('<col width="18%" />');
		document.write('<col width="18%" />');
		document.write('<col width="26%" />');
		document.write('<col width="20%" />');
		document.write('<tr>');
			document.write('<td>');
				document.write('<h3>保証について</h3>');
				document.write('<ul>');
					document.write('<li><a href="'+ URL +'guarantee/">保証のながれ</a></li>');
					document.write('<li><a href="'+ URL +'prepayment/">前払金保証</a></li>');
					document.write('<li><a href="'+ URL +'contract/">契約保証</a></li>');
					document.write('<li><a href="'+ URL +'reservation/">契約保証予約</a></li>');
					document.write('<li><a href="'+ URL +'midterm/">中間前払金保証</a></li>');
					document.write('<li><a href="'+ URL +'guarantee/form.html">申込書類・様式集</a></li>');
					document.write('<li><a href="'+ URL +'guarantee/fee.html">保証料・手数料</a></li>');
				document.write('</ul>');
			document.write('</td>');
			document.write('<td>');
				document.write('<h3>統計情報/刊行物</h3>');
				document.write('<ul>');
					document.write('<li><a href="'+ URL +'report/">公共工事の動向</a></li>');
					document.write('<li><a href="'+ URL +'report/situation.html">建設業景況調査</a></li>');
					document.write('<li><a href="'+ URL +'report/indicators.html">建設業の財務統計指標</a></li>');
					document.write('<li><a href="'+ URL +'report/topics.html">トピックス</a></li>');
				document.write('</ul>');
			document.write('</td>');
			document.write('<td>');
				document.write('<h3>会社情報</h3>');
				document.write('<ul>');
					document.write('<li><a href="'+ URL +'about/">社長メッセージ</a></li>');
					document.write('<li><a href="'+ URL +'about/philosophy.html">経営理念・行動規範</a></li>');
					document.write('<li><a href="'+ URL +'about/profile.html">会社案内</a></li>');
					document.write('<li><a href="'+ URL +'network/">本社・営業店舗一覧</a></li>');
					document.write('<li><a href="'+ URL +'ir/">株式情報</a></li>');
					document.write('<li><a href="'+ URL +'recruit/">採用情報</a></li>');
				document.write('</ul>');
			document.write('</td>');
			document.write('<td>');
				document.write('<h3>グループ会社</h3>');
				document.write('<ul>');
					document.write('<li><a href="'+ URL +'group/">KKS（株）建設経営サービス</a></li>');
					document.write('<li><a href="'+ URL +'group/esm.html">ESM（株）イー・エス・マネジメント</a></li>');
					document.write('<li><a href="'+ URL +'group/ndn.html">NDN 日本電子認証（株）</a></li>');
				document.write('</ul>');
			document.write('</td>');
			document.write('<td>');
				document.write('<h3>その他</h3>');
				document.write('<ul>');
					document.write('<li><a href="'+ URL +'contact/">お問い合わせ・Q＆A</a></li>');
					document.write('<li><a href="'+ URL +'privacy.html">プライバシーポリシー</a></li>');
					document.write('<li><a href="'+ URL +'siteuse.html">サイトの利用について</a></li>');
					document.write('<li><a href="'+ URL +'link.html">リンク集</a></li>');
				document.write('</ul>');
			document.write('</td>');
		document.write('</tr>');
	document.write('</table>');
}
/* PAGEVIEW */
function View(Category,Page,Sub) {
	if (Category != 'none'){
		document.images["Nav-"+Category].src = IMG+"common/image/nav/"+Category+"_view.gif";
		document.getElementById("Nav-"+Category).className = "";
		if (Page != 'none'){
			document.images[Category+"-"+Page].src = IMG+"common/image/nav/"+Category+"-"+Page+"_view.gif";
			document.getElementById(Category+"-"+Page).className = "view";
		}
	}
	if (Sub != 'none'){
		document.getElementById(Page+"-"+Sub).className = "view";
	}
	if (!document.getElementById) return
	var Action = new Array();
	var Change;
	var Target = document.getElementsByTagName('img');
	for (var i = 0; i < Target.length; i++) {
		if (Target[i].className == 'imgover') {
			var src = Target[i].getAttribute('src');
			var OutImg = src.substring(src.lastIndexOf('.'), src.length);
			var OverImg = src.replace(OutImg, '_over'+OutImg);
			Target[i].setAttribute('OverImg', OverImg);
			Action[i] = new Image();
			Action[i].src = OverImg;
			Target[i].onmouseover = function() {
				Change = this.getAttribute('src');
				this.setAttribute('src', this.getAttribute('OverImg'));
			}
			Target[i].onmouseout = function() {
				if (!Change) Change = this.getAttribute('src').replace('_over'+OutImg, OutImg);
				this.setAttribute('src', Change);
			}
		}
	}
}
/* Popup Window */
function Popup(URL,WID,HGT){
	var Xcoord = (window.screen.width) - (WID + 20);
	var Ycoord = (window.screen.height) - (HGT + 110);
	var EJCS = window.open(URL,"EJCS","status=yes,scrollbars=yes,resizable=yes,width=" + WID + ",height=" + HGT + ",left=" + Xcoord + ",top=" + Ycoord + ",screenX=" + Xcoord + ",screenY=" + Ycoord);
	EJCS.focus();
}
function Opener(URL){
	window.close();
	window.opener.focus();
	window.opener.location.href = URL;
}
/* Google Maps API V3 */
function initialize(LAT, LNG, SCALE){
	var latlng = new google.maps.LatLng(LAT, LNG);
	var myOptions = {
		zoom: SCALE,
		center: latlng,
		mapTypeId: google.maps.MapTypeId.ROADMAP
	};
	var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
	var marker = new google.maps.Marker({
		position: latlng,
		title: document.title
	});
	marker.setMap(map);
}

