//JAVASCRIPが使えるかチェックここから
b_name = navigator.appName;
b_ver = parseInt(navigator.appVersion);
js_flag = "no";
if (b_name == "Netscape" && b_ver >= 3) js_flag = "yes";
else if (b_name == "Microsoft Internet Explorer" && b_ver >= 4) js_flag = "yes";

//JAVASCRIPが使えるかチェックここまで

//サブウィンドウ生成用の共通スクリプトここから
function subwindow(url,name,winsize) {
	open_window = window.open(url, name,winsize + ",toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no");
	open_window.focus();
}
//サブウィンドウ生成用の共通スクリプトここまで

//ウィンドウ生成用の共通スクリプトここから
function submainwindow(url,name,winsize) {
	open_window = window.open(url, name,winsize + ",toolbar=yes,location=yes,directories=yes,status=yes,scrollbars=yes,resizable=yes,menubar=yes");
	open_window.focus();
}
//ウィンドウ生成用の共通スクリプトここまで

//ウィンドウcloseの共通スクリプトここから
function windowCloser(){
window.close()
}
//ウィンドウcloseの共通スクリプトここまで


//共通仕様の表示画像の準備スクリプトここから
function PreloadImages(length, path, type) {
    for(var i = 1; i<=length; i++) {
        this[i]= new Image()
        this[i].src= path + i + type
    }
    return this
}
//共通仕様の表示画像の準備スクリプトここまで


// ボタン定義
function Buttons(name, object, onimage, offimage) {
	this.name = name;
	this.object = object;
	this.onImage = new Image();
	this.onImage.src = onimage;
	this.offImage = new Image();
	this.offImage.src = offimage;
}

// ボタンオン処理
function ButtonOn(button) {
//	alert(object);
	button.object.src = button.onImage.src;
}

// ボタンオフ処理
function ButtonOff(button) {
//	alert(object);
	button.object.src = button.offImage.src;
}

// ボタン全クリア処理
function ButtonClear(buttonArray) {
	for (i = 1; i <= buttonArray.length; i ++) {
		if (buttonArray[i] && (!buttonArray[0] || buttonArray[0].object.name != buttonArray[i].object.name)) {
			buttonArray[i].object.src = buttonArray[i].offImage.src;
		}
	}
}
//ボタン反転用スクリプト群 ここまで


//topボタンの反転スクリプトここから
menubon=new PreloadImages(18,'images/menu_b0','_on.gif');
menuboff=new PreloadImages(18,'images/menu_b0','_off.gif');
function mmbotan_off(num) {
if (js_flag == "yes" && num>0) {
document.images["mmb0"+num].src=menuboff[num].src;
}
}
function mmbotan_on(num) {
	if (js_flag == "yes" && num>0) {
		document.images["mmb0"+num].src=menubon[num].src;
	}
}
//topボタンの反転スクリプトここまで


//↓↓↓↓↓↓↓zeroを足す処理↓↓↓↓↓↓↓
function zero(no, keta) {
	no = "0000000000" + no;
	len = no.length;
	
	return(no.substr(len - keta, keta));
}
//↑↑↑↑↑↑↑zeroを足す処理↑↑↑↑↑↑↑
