var directoryChkData = new function(){

	var cnt=0;
	this.top = [];
	this.arr = [];

	//TOP
	//this.top[cnt++] = ['', '/'];
	//this.top[cnt++] = ['', '/index.html'];

	cnt = 0;
	//ミュージアムラボとは
	this.arr[cnt++] = ['globalNavi1', '/greeting/'];
	
	//展示紹介
	this.arr[cnt++] = ['globalNavi2', '/exhibition/08/'];
	this.arr[cnt++] = ['globalNavi2', '/pv/08/'];
	
	//過去の展示紹介
	this.arr[cnt++] = ['globalNavi3', '/exhibition/07/'];
	this.arr[cnt++] = ['globalNavi3', '/pv/07/'];
	this.arr[cnt++] = ['globalNavi3', '/exhibition/06/'];
	this.arr[cnt++] = ['globalNavi3', '/exhibition/05/'];
	
	this.arr[cnt++] = ['globalNavi3', '/exhibition/04/'];
	this.arr[cnt++] = ['globalNavi3', '/tech/index.html'];
	this.arr[cnt++] = ['globalNavi3', '/tech/04tech.html'];
	
	this.arr[cnt++] = ['globalNavi3', '/exhibition/03/'];
	this.arr[cnt++] = ['globalNavi3', '/tech/03development.html'];
	this.arr[cnt++] = ['globalNavi3', '/tech/03tech.html'];
	
	this.arr[cnt++] = ['globalNavi3', '/exhibition/02/'];
	this.arr[cnt++] = ['globalNavi3', '/tech/02development.html'];
	
	this.arr[cnt++] = ['globalNavi3', '/exhibition/01/'];
	this.arr[cnt++] = ['globalNavi3', '/tech/01development.html'];
	
	//ご利用案内
	this.arr[cnt++] = ['globalNavi4', '/visit/'];
	this.arr[cnt++] = ['globalNavi4', '/greeting/facility.html'];
	
	//プレス
	this.arr[cnt++] = ['globalNavi5', '/press/'];

	//アクティビティ情報
	this.arr[cnt++] = ['globalNavi6', '/activity/'];
};

var directoryChkSet = new function(){

	var url = '';
	var id = '';

	//directory check
	(function(){
		//top
		if(directoryChkData.top){			
			var top = directoryChkData.top;
			for(i=0; i<top.length; i++){
				if(location.pathname == top[i][1]){
					id  = top[i][0];
					return;
				}
			}
		}
		//2nd-
		if(!directoryChkData.arr){return;}
		var arr = directoryChkData.arr;
		for(i=0; i<arr.length; i++){
			if(location.pathname.indexOf(arr[i][1]) == 0 && url<arr[i][1]){
				url = arr[i][1];
				id  = arr[i][0];
			}
		}
	})();

	//On
	if(id){
		var t = document.getElementById(id).getElementsByTagName('a')[0];
		t.className = 'childStay';
		t.dFlg = true;
	}
};
