function oldarchive(obj) {
	var disp  = obj.parentNode.getElementsByTagName('ul')[0];
	var clas = obj.parentNode;
	if (disp.style.display == 'none') {
		disp.style.display = 'block';
		clas.setAttribute('class','parent');
	}
	else {
		disp.style.display = 'none';
		clas.setAttribute('class','');
	}
}

function menu_setup(){
	var cat_list  = document.getElementById('sidenavi').getElementsByTagName('ul')[1].getElementsByTagName('li');
	var date_list = [];
	for (i=0; i<cat_list.length; i++){
		var a = '<li>' + cat_list[i].innerHTML + '</li>';

		if (date_list.length == 0){
			date_list.push(a);
		}
		else {
			var cat    = cat_list[i];
			var cat_is = false;
			for (j=0; j<date_list.length; j++) {
				if (date_list[j] == a) {
					cat_is = true;
					break;
				}
			}
			
			if (!cat_is) {
				date_list.push(a);
			}
		}
	}
	
	//var year = (new Date()).getFullYear();
	//var array_year = [];
	//var year_num =[];
	//for (i=0; i<date_list.length; i++) {
	//	var check_year = date_list[i].split('/')[3]
	//	if (!array_year['y' + check_year]) {
	//		array_year['y' + check_year] = [];
	//		year_num.push(check_year);
	//	}
	//	array_year['y' + check_year].push(date_list[i]);
	//}

	//var html = [];
	//for (i=0;i<year_num.length;i++) {
	//	var now = year - i;
	//	if (now == year) {
	//		for (j=0;j<array_year['y' + now].length;j++) {
	//			html.push(array_year['y' + now][j]);
	//		}
	//	}
		//else {
		//	html.push('<li class=""><a href="#" onclick="oldarchive(this)\;"><span>' + now + '年月別アーカイブ</span></a><ul class="level2" style="display:none;">');
		//	for (j=0;j<array_year['y' + now].length;j++) {
		//		html.push(array_year['y' + now][j]);
		//	}
		//	html.push('</ul></li>');
		//}
	//}
	//var fix_html = html.join('');
	//document.getElementById('sidenavi').getElementsByTagName('ul')[1].innerHTML = fix_html;
}


function title_setup () {
	if (location.href.match('report')) {
		title_tag = document.title.replace(/{title}/, 'メンテナンス／障害情報');
	}
	else if  (location.href.match('news_press')) {
		title_tag = document.title.replace(/{title}/, 'ニュース＆プレスリリース');
	}
	else if  (location.href.match('important')) {
		title_tag = document.title.replace(/{title}/, 'お客様への重要なお知らせ');
	}
	else {
		title_tag = document.title.replace(/{title}/, 'GlobalSign');
	}
	document.title = title_tag;
}