// ========================================================
//   Kudanshita Gallery Site : load page parts
//
//   2008.4.24 TLC ITPG  @author satoh
//
//   -------
//   :: history ::
//   2008.04.24 created
// ========================================================

// ホーム
var HOME_NAME = "ホーム";
var HOME_URL = "./index.html";
var MARK_GT = "&nbsp;&gt;&nbsp;";
var MARK_SPLIT = "&nbsp;&nbsp;|&nbsp;&nbsp;";

//サイトのルートディレクトリ
var baseUrl;

// ------------------------
// 初期化
// ------------------------
function init() {

	//読み込むページHTMLの階層パス取得
	getImgPath();

}

// ------------------------
// ページヘッダ作成
// ------------------------
function makeHeader(){
	head = "";
	head += "<div id='headtop'></div>";
	head += "<div id='headercontainer'>";
	head += "<a href='"+ baseUrl + "index.html'><img src='"+ baseUrl + "img/corso_logo.gif' alt='Art Space Corso'></a>";
	head += "</div>";
	document.getElementById('header').innerHTML = head;
}

// ------------------------
// ページフッタ作成
// ------------------------
function makeFooter(){
	foot = "";
	foot += "<div class='note'><a href='http://www.uyo.co.jp' target='_blank'>羽陽美術印刷株式会社</a> | <a href='http://www.lithmatic.co.jp' target='_blank'>東京リスマチック株式会社</a> | <a href='http://www.uyo.co.jp/privacy2.html' target='_blank'>個人情報の取り扱いについて</a> | <a href='"+ baseUrl + "statics/termOfUse.html'>サイトのご利用について</a></div>";
	foot += "<span class='copy'>Copyright &copy; 2008 Uyo Art Printing, Inc. All rights reserved.</span>";
	document.getElementById('footer').innerHTML = foot;
}

// ------------------------
// メニュータイル作成
// ------------------------
function makeMenuTile(){
	tile = "";
	tile += "<div id='menutile'>";
	tile += "<ul class='bulletlist'>";
	tile += "<li title='ホーム'><a href='"+ baseUrl + "index.html'>ホーム</a></li>";
	tile += "<li title='CORSOとは'><a href='"+ baseUrl + "statics/about.html'>CORSOとは</a></li>";
	tile += "<li title='ご利用案内'><a href='"+ baseUrl + "statics/guide.html'>ご利用案内</a></li>";
	tile += "<li title='スケジュール一覧'><a href='"+ baseUrl + "viewSchedule.do'>スケジュール一覧</a></li>";
//	tile += "<li title='サービス'><a href='"+ baseUrl + "statics/service.html'>サービス</a></li>";
	tile += "<li title='お申込み'><a href='"+ baseUrl + "viewReserved.do'>お申込み</a></li>";
	tile += "<li title='アクセス'><a href='"+ baseUrl + "statics/access.html'>アクセス</a></li>";
	tile += "<li title='お問い合わせ'><a href='"+ baseUrl + "statics/inquiry.html'>お問い合わせ</a></li>";
	tile += "<li title='ダウンロード'><a href='"+ baseUrl + "statics/download.html'>ダウンロード</a></li>";
	tile += "</ul>";
	tile += "<br class='floatCL'>";
	tile += "<address>";
	tile += "〒101-0051<br>東京都千代田区<br>神田神保町3-7-4<br>プレシーズタワー8F <br>TEL:03-3265-9631<br>FAX:03-3265-9630<br>";
	tile += "</address>";
	tile += "<div class='bnArea'>";
	tile += "<a href='http://www.uyo.co.jp/Mycal' target='_blank'><img src='"+ baseUrl + "img/banner_mycal.jpg' alt='マイカレンダー'></a>";
	tile += "<a href='http://www.uyo.co.jp' target='_blank'><img src='"+ baseUrl + "img/banner_uyo.jpg' alt='羽陽美術印刷株式会社'></a>";
	tile += "<a href='http://www.lithmatic.co.jp' target='_blank'><img src='"+ baseUrl + "img/banner_lith.jpg' alt='東京リスマチック株式会社'></a>";
	tile += "</div>";
	tile += "</div>";
	
	document.getElementById('menutile').innerHTML = tile;
}



// ------------------------
// imgまでのパス取得 (階層取得用）
// ------------------------
function getImgPath(){
	imageSrc = new Image().src;
	if (document.images["treeCheck"]) {
		imageSrc = document.images["treeCheck"].src;
	} else {
		imageSrc = document.images["treeCheck"].src;
	}
	strNum = imageSrc.indexOf("img",0);
	baseUrl = imageSrc.substring(0,strNum);
}

// ------------------------
// ページロード時のメインメソッド
// ------------------------
function getPageParts() {
	try {
		init();
		makeHeader();
		makeMenuTile();
		makeFooter();

	} catch(e) {
		document.write("Error： " + e);
	}
}
