<!-- // Control context menu
window.onload = function() {
	var imgTag = document.getElementsByTagName("img");
	for (var i=0; i<imgTag.length; i++) {
		imgTag[i].oncontextmenu = function(e) {
		alert("Please do not copy any images.");
		return false;
		}
	}
}
//-->

<!-- // sub window control
var popWindow=null;
function pop(mypage,myname,w,h,t,l,s,r,m,lc,tl){
settings='width='+ w + ',height='+ h + ',top='+ t + ',left='+ l + ',scrollbars=' + s + ',resizable=' + r + ',menubar=' + m + ',location='+ lc + ',toolbar='+ tl + ',directories=no,status=yes,dependent=yes';
popWindow=window.open('',myname,settings);
popWindow.focus();popWindow.location=mypage;
}
// -->

<!-- // show enlarged image of fleet
function showEnlarge(fleet_name){
	settings='top=1,left=1,width=500,height=400,scrollbars=no,resizable=yes,menubar=no,location=no,toolbar=no,directories=no,status=no,dependent=no';
	detail = "detail";
	pop_showEnlarge=window.open( './enlarge_'+fleet_name+'.html', detail, settings );
	pop_showEnlarge.focus();
}
// -->

<!--
function ajustWindow() {
	var element = document.getElementById("POPUP");
	height = element.scrollHeight + 59;
	resizeTo(530,height);
}
//-->

<!--
function ajustWindowAuto(width) {
	var element = document.getElementById("POPUP");
	if(navigator.appName=="Microsoft Internet Explorer") {
		height = element.scrollHeight + 129;
	} else if(navigator.appName=="Opera") {
		height = element.scrollHeight + 49;
	} else {
		height = element.scrollHeight + 79;
	}
	resizeTo(width,height);
}
//-->

<!-- // auto rollover for specific elements
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."));
				}
			}
		}

		var input = document.getElementsByTagName("input");

		for(var i=0; i < input.length; i++) {
			if(input[i].getAttribute("type").match("image"))
			{
				input[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
				}
				input[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);
}
//-->

<!--
// プリントコマンド（Macでのアラート含む）
function print_out() {
	var Mac = (navigator.userAgent.indexOf("Mac")!=-1);
	var Win = (navigator.userAgent.indexOf("Win")!=-1);
	var Netscape = (navigator.appName.indexOf("Netscape")!=-1);
	var Explorer = (navigator.appName.indexOf("Explorer")!=-1);
	var Opera = (navigator.appName.indexOf("Opera")!=-1);
	var Version = navigator.appVersion.charAt(0);

	if ((Win && Explorer && Version >= "4")||(Win && Netscape && Version >= "4")||(Win && Opera)){
		self.print();
	}else{
		alert("誠に申し訳ありませんが、現在の閲覧環境ではこの機能は利用できません。\n通常の印刷方法にてお願い致します。");
	}
}
//-->

<!--
// Print command (inc. allert on Mac)
function en_print_out() {
	var Mac = (navigator.userAgent.indexOf("Mac")!=-1);
	var Win = (navigator.userAgent.indexOf("Win")!=-1);
	var Netscape = (navigator.appName.indexOf("Netscape")!=-1);
	var Explorer = (navigator.appName.indexOf("Explorer")!=-1);
	var Opera = (navigator.appName.indexOf("Opera")!=-1);
	var Version = navigator.appVersion.charAt(0);

	if ((Win && Explorer && Version >= "4")||(Win && Netscape && Version >= "4")||(Win && Opera)){
		self.print();
	}else{
		alert("Sorry, this function does not work on Mac OS.\nPlease use the print command.");
	}
}
//-->
