// 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);
}
else if(window.attachEvent) {
	window.attachEvent("onload", smartRollover);
}
else {
  window.onload = smartRollover;
}

// POPUP 
	function wpop(popupURL,wNAME,wSIZE){
		var name = navigator.appName;
			if (name == "Microsoft Internet Explorer"){
		// open the popup window Internet Explorer
		var popup = window.open(popupURL,wNAME,wSIZE+',toolbar=no,location=0,directories=0,status=no,menubar=no,scrollbars=no,resizable=no');
		}
		else {
		// open the popup window Netscape
		var popup = window.open(popupURL,wNAME,wSIZE+',toolbar=no,location=0,directories=0,status=yes,menubar=no,scrollbars=no,resizable=no');
		}
	}

	function wpop2(popupURL,wNAME,wSIZE){
		var name = navigator.appName;
			if (name == "Microsoft Internet Explorer"){
		// open the popup window Internet Explorer
		var popup = window.open(popupURL,wNAME,wSIZE+',toolbar=no,location=0,directories=0,status=no,menubar=no,scrollbars=yes,resizable=no');
		}
		else {
		// open the popup window Netscape
		var popup = window.open(popupURL,wNAME,wSIZE+',toolbar=no,location=0,directories=0,status=yes,menubar=no,scrollbars=yes,resizable=no');
		}
	}
	function wpop3(popupURL,wNAME,wSIZE){
		var name = navigator.appName;
			if (name == "Microsoft Internet Explorer"){
		// open the popup window Internet Explorer
		var popup = window.open(popupURL,wNAME,wSIZE+',toolbar=no,location=0,directories=0,status=no,menubar=no,scrollbars=yes,resizable=yes');
		}
		else {
		// open the popup window Netscape
		var popup = window.open(popupURL,wNAME,wSIZE+',toolbar=no,location=0,directories=0,status=yes,menubar=no,scrollbars=yes,resizable=yes');
		}
	}

// POPUP for movie
	function moviewpop(popupURL,movieNAME,wNAME,wSIZE){
		var name = navigator.appName;
			if (name == "Microsoft Internet Explorer"){
		// open the popup window Internet Explorer
		moviepopup = window.open(popupURL,wNAME,wSIZE+',toolbar=no,location=0,directories=0,status=no,menubar=no,scrollbars=yes,resizable=no');
		}
		else {
		// open the popup window Netscape
		moviepopup = window.open(popupURL,wNAME,wSIZE+',toolbar=no,location=0,directories=0,status=yes,menubar=no,scrollbars=yes,resizable=no');
		}
		// 選択ムービー書き込み
		SaveMovieFile(movieNAME);
	}

// Print popup
if(window.name=="prpop")
{
	document.getElementById('chStyleM').href='/css/tdr_style_print.css';
}

function dispBut()
{
	if(window.name=="prpop")
	{
		print();
	}
	else
	{
		wpop2(window.location,"prpop","width=770,height=800");
	}
}

// CLOSE
function windowCloser()
{
	self.close();
}

