//
//ヘッダー、フッター、ボトムナビ等出力
//

//ヘッダー書き出し
//引数：ルートパスからの階層
//選択されているボタン
function writeHeader(nDepth,nDefault){
	
/*
<!--ヘッダ-->
<div id="header">

<!--タイトル画像-->
<div id="headerTop"><img src="./shared/images/headerMain.gif" alt="نافذتك على اليابان" width="850" height="65" /></div>

<!--検索、ナビ一段目ラッパー-->
<div id="headerNavi0">
<!--検索-->
<form id="searchform" action=""><input class="search" type="text" /><input class="search" type="image" src="./shared/images/headerNavi0searchbutton.gif" /></form>
<!--ナビ一段目-->
<span class="navi0link"><a href="">من نحن</a> | <a href="">خريطة الموقع</a></span>
</div>

<!--グローバルナビ-->
<div id="headerNavi1" class="roll"><!----><a href="index.html"><img id="navi0" src="shared/images/navi0_current.gif" alt="الصفحة الرئيسية" width="167" height="35"/></a><!----><a href="news/index.html"><img id="navi1" src="shared/images/navi1_off.gif" alt="الأخبار" width="92" height="35"/></a><!----><a href="analysis/index.html"><img id="navi2" src="shared/images/navi2_off.gif" alt="قضية وتحليل" width="133" height="35"/></a><!----><a href="opinion-jpn/index.html"><img id="navi3" src="shared/images/navi3_off.gif" alt="آراء يابانية" width="108" height="35"/></a><!----><a href="opinion-arab/index.html"><img id="navi4" src="shared/images/navi4_off.gif" alt="وجهات نظر عربية" width="150" height="35"/></a><!----><a href="japan-info/index.html"><img id="navi5" src="shared/images/navi5_off.gif" alt="من نحن" width="200" height="35"/></a></div>
</div>
<!--ヘッダー-->
*/
	var strDepthPath = '';
	for(var i=0;i<nDepth;i++)strDepthPath +='../';

	var strContent='';
	var nCounter = 0;
	
	strContent += '<!--ヘッダ-->';
	
	strContent += '<div id="header">';
	strContent += '<!--タイトル画像-->';
	strContent += '<div id="headerTop"><img src="' + strDepthPath + './shared/images/headerMain.gif" alt="نافذتك على اليابان" width="850" height="65" /></div>';
	strContent += '<!--検索、ナビ一段目ラッパー-->';
	strContent += '<div id="headerNavi0">';
	strContent += '<!--検索-->';
	strContent += '<form id="searchform" action=""><input class="search" type="text" /><input class="search" type="image" src="' + strDepthPath + './shared/images/search.gif" /></form>';
	strContent += '<!--ナビ一段目-->';
	strContent += '<span class="navi0link"><a href="' + strDepthPath + './about-us/index.html"><img src="' + strDepthPath + './shared/images/headerNavi0_1.gif" alt="من نحن" width="63" height="23" /></a><a href="' + strDepthPath + './sitemap/index.html"><img style="margin-right:4px;" src="' + strDepthPath + './shared/images/headerNavi0_0.gif" alt="خريطة الموقع" width="101" height="23"/></a></span>';
	strContent += '</div>';
	strContent += '<!--グローバルナビ-->';
	strContent += '<div id="headerNavi1" class="roll">';
	strContent += '<!---->';
	strContent += '<a href="' + strDepthPath + './index.html">';
	strContent += '<img id="navi0" src="' + strDepthPath + './shared/images/navi0';
	if(nCounter == nDefault)strContent += '_current';
	else strContent += '_off';
	nCounter ++;
	strContent += '.gif" alt="الصفحة الرئيسية" width="167" height="35"/></a>';
	strContent += '<!---->';
	strContent += '<a href="' + strDepthPath + './news/index.html">';
	strContent += '<img id="navi1" src="' + strDepthPath + './shared/images/navi1';
	if(nCounter == nDefault)strContent += '_current';
	else strContent += '_off';
	nCounter ++;
	strContent += '.gif" alt="الأخبار" width="92" height="35"/></a>';
	strContent += '<!---->';
	strContent += '<a href="' + strDepthPath + './analysis/index.html">';
	strContent += '<img id="navi2" src="' + strDepthPath + './shared/images/navi2';
	if(nCounter == nDefault)strContent += '_current';
	else strContent += '_off';
	nCounter ++;
	strContent += '.gif" alt="قضية وتحليل" width="133" height="35"/></a>';
	strContent += '<!---->';
	strContent += '<a href="' + strDepthPath + './opinion-jpn/index.html">';
	strContent += '<img id="navi3" src="' + strDepthPath + './shared/images/navi3';
	if(nCounter == nDefault)strContent += '_current';
	else strContent += '_off';
	nCounter ++;
	strContent += '.gif" alt="آراء يابانية" width="108" height="35"/></a>';
	strContent += '<!---->';
	strContent += '<a href="' + strDepthPath + './opinion-arab/index.html">';
	strContent += '<img id="navi4" src="' + strDepthPath + './shared/images/navi4';
	if(nCounter == nDefault)strContent += '_current';
	else strContent += '_off';
	nCounter ++;
	strContent += '.gif" alt="حقائق حول اليابان" width="150" height="35"/></a>';
	strContent += '<!---->';
	strContent += '<a href="' + strDepthPath + './japan-info/index.html">';
	strContent += '<img id="navi5" src="' + strDepthPath + './shared/images/navi5';
	if(nCounter == nDefault)strContent += '_current';
	else strContent += '_off';
	nCounter ++;
	strContent += '.gif" alt="من نحن" width="200" height="35"/></a>';
	strContent += '</div>';
	strContent += '</div>';
	strContent += '';
	
	
	strContent += '<!--ヘッダ-->';
	
	document.write(strContent);
}

function writeBottomnavi(nDepth){
/*
<div id="bottom-nav" class="ar16p grey">
&nbsp;|&nbsp;
<a href="index.html">
الصفحة الرئيسية
</a>
&nbsp;|&nbsp;
<a href="news/index.html">
الأخبار
</a>
&nbsp;|&nbsp;
<a href="analysis/index.html">
قضية وتحليل
</a>
&nbsp;|&nbsp;
<a href="opinion-jpn/index.html">
آراء يابانية
</a>
&nbsp;|&nbsp;
<a href="opinion-arab/index.html">
وجهات نظر عربية
</a>
<!--
&nbsp;|&nbsp;
<a href="about-us/index.html">
حقائق ومعلومات حول اليابان
</a>
&nbsp;|&nbsp;
<a href="about-us/index.html">
من نحن
</a>
&nbsp;|&nbsp;
<br />
&nbsp;|&nbsp;
<a href="sitemap/index.html">
خريطة الموقع
</a>
&nbsp;|&nbsp;
<a href="privacy/index.html">
حماية الخصوصية
</a>
&nbsp;|&nbsp;
</div>
*/
	var strDepthPath = '';
	for(var i=0;i<nDepth;i++)strDepthPath +='../';

	var strContent='';
	strContent += '<div id="bottom-nav" class="ar16p grey">';
    strContent += '&nbsp;&nbsp;|&nbsp;&nbsp;';
	strContent += '<a href="' + strDepthPath + './index.html">الصفحة الرئيسية</a>';
	strContent += '&nbsp;&nbsp;|&nbsp;&nbsp;';
	strContent += '<a href="' + strDepthPath + './news/index.html">الأخبار</a>';
	strContent += '&nbsp;&nbsp;|&nbsp;&nbsp;';
	strContent += '<a href="' + strDepthPath + './analysis/index.html">قضية وتحليل</a>';
	strContent += '&nbsp;&nbsp;|&nbsp;&nbsp;';
	strContent += '<a href="' + strDepthPath + './opinion-jpn/index.html">آراء يابانية</a>';
	strContent += '&nbsp;&nbsp;|&nbsp;&nbsp;';
	strContent += '<a href="' + strDepthPath + './opinion-arab/index.html">وجهات نظر عربية</a>';
	strContent += '&nbsp;&nbsp;|&nbsp;&nbsp;';
	strContent += '<a href="' + strDepthPath + './japan-info/index.html">حقائق حول اليابان</a>';
	/* ヘッダーにあるのでいらない　2010/6/11 sawada
	strContent += '&nbsp;&nbsp;|&nbsp;&nbsp;';
	strContent += '<a href="' + strDepthPath + './about-us/index.html">من نحن</a>';
	strContent += '&nbsp;&nbsp;|&nbsp;&nbsp;';
	strContent += '<a href="' + strDepthPath + './sitemap/index.html">خريطة الموقع</a>';
	*/
	strContent += '&nbsp;&nbsp;|&nbsp;&nbsp;';
	strContent += '<a href="' + strDepthPath + './privacy/index.html">حماية الخصوصية</a>';
	strContent += '&nbsp;&nbsp;|&nbsp;&nbsp;';
	strContent += '</div>';
	document.write(strContent);
}

function writeFooter(nDepth){
/*
<div id="footer" class="ar18p clear-fix">
<div id="footerLeft" style="display:block">
<a href="index.html">
<img src="shared/images/footerImg1.gif" alt="نافذتك على اليابان" width="100" height="20" /></a>
</div>
<div id="footerRight" style="display:block">
<a href="http://www.spf.org/e/index.html" target="_blank">
<img src="shared/images/footerImg2.gif" alt="جميع الحقوق محفوظة- مؤسسة ساساكاوا للسلام 2009" width="350" height="25" /></a>
</div>
</div>
*/
	var strDepthPath = '';
	for(var i=0;i<nDepth;i++)strDepthPath +='../';

	var strContent='';
	strContent += '<div id="footer" class="ar18p clear-fix">';
	strContent += '<div id="footerLeft" style="display:block">';
	strContent += '<a href="' + strDepthPath + './index.html">';
	strContent += '<img src="' + strDepthPath + './shared/images/banner88-31.gif" alt="نافذتك على اليابان" width="88" height="31" /></a>';
	strContent += '</div>';
	strContent += '<div id="footerRight" style="display:block">';
	strContent += '<a href="http://www.spf.org/e/index.html" target="_blank">';
	strContent += '<img src="' + strDepthPath + './shared/images/footerImg2.gif" alt="جميع الحقوق محفوظة- مؤسسة ساساكاوا للسلام 2009" width="350" height="25" /></a>';
	strContent += '</div>';
	strContent += '</div>';
	document.write(strContent);
}
