// Rollover

function smartRollover() {
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");
		for(var i=0; i < images.length; i++) {
			if(images[i].getAttribute("src").match("_off."))
			{
				images[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
				}
				images[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
				}
			}
		}
	}
}
if(window.addEventListener) {
	window.addEventListener("load", smartRollover, false);
	window.addEventListener("load", indexPopup, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", smartRollover);
	window.attachEvent("onload", indexPopup);
}

//080901お知らせポップアップ用
function indexPopup() {
	var url = document.URL;
	//もしファイル名がtop.htmlでパスに「admin」又は「staging」を含まなければ実行
	if(url.match('./about2/index.html')&&!url.match('admin')&&!url.match('staging')) {
		var body = document.getElementsByTagName('body')[0];
		if(body.id=='index') {
			newWin = window.open('080901info/index.html', 'popup', 'width=750, height=650, menubar=no, toolbar=no, scrollbars=yes');
			newWin.focus();
		}
	}
}

//110413お知らせPDFリンク用
function cau() 
{
/*
	document.write("<div style='font-size:12px; position:relative; left:290px; top:-50px; width:310px;color:red; font-weight:bold;'><a href='http://www.railway-museum.jp/news/pdf/110716.pdf' target='_blank' style='color:red; font-weight:bold; text-decoration:underline;'>館内の体験展示・イベントの実施状況について</a></div>"); 
*/
}

