// *********************************** //
// メニューボタン表示切り替え処理
// *********************************** //
function swapImg(name, num) {

	var gifName = "btn_" + name;
	var Imgfile = "";

	Imgfile = '/akita/img/' + gifName + '-' + num + '.gif';

	document.images[name].src = Imgfile;
}

function changeImage1(){
    document.myimg.src="img2.gif";
}
function changeImage2(){
    document.myimg.src="img1.gif";
}


// *********************************** //
// バナー吹き出し表示処理
// *********************************** //
function showPopup(paramID){

	var idName = "popup";

	if(document.getElementById){

		// ページ内DIV要素の取得
		var nodeList = document.getElementsByTagName("div");

		for(var i in nodeList){
			if(nodeList[i].id){
				var node = nodeList[i].id;
				var re = new RegExp(idName + "(\\d+)");

				if(node.match(re)) {
					if(node == paramID){
						document.getElementById(node).style.display = "block";
					} else {
						document.getElementById(node).style.display = "none";
					}
				}
			}
		}
	}
}


// *********************************** //
// バナー吹き出し非表示処理
// *********************************** //
function hiddenPopup() {


	var idName = "popup";

	if(document.getElementById){

		var nodeList = document.getElementsByTagName("div");

		for(var i in nodeList){
			if(nodeList[i].id){
				var node = nodeList[i].id;
				var re = new RegExp(idName + "(\\d+)");

				if(node.match(re)) {
					document.getElementById(node).style.display = "none";
				}
			}
		}
	}
}

// *********************************** //
// サブウィンドウを開く処理
// *********************************** //
function WinOpen(anc, x, y, scroll){
	var wiop;
	var opt = 'width=' + x + ',height=' + y + ',toolbar=no,location=no,directories=no,status=no,menubar=no';

	if (scroll) {
		opt = 'width=' + x + ',height=' + y + ',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=yes';
	}

	wiop = window.open(anc,"resultprint",opt);
	wiop.focus();
	return false;
}

