<!--//
function loadImage() { 
	var rollover = new Array();
	for (var i=0; i < 22 ; i++) {
		rollover[i] = new Image();
	}
}

function close_win(){
var nvua = navigator.userAgent;
if(nvua.indexOf('MSIE') >= 0){
if(nvua.indexOf('MSIE 5.0') == -1) {
top.opener = '';
}
}
else if(nvua.indexOf('Gecko') >= 0){
top.name = 'CLOSE_WINDOW';
wid = window.open('','CLOSE_WINDOW');
}
top.close();
}

function _JumpURLnewWin(url,sizeX,sizeY) 
{
  if (url != ''){
    win=window.open(url,"a","scrollbars=1,resizable=yes,width=" + sizeX + ",height=" + sizeY);
	
//	scrXr = screen.width;
//	scrYr = screen.height;
//	win.moveTo( scrXr*0.16, scrYr*0.16 );
//	win.focus()
  }
}
function _TargetWinOpen(url,sizeX,sizeY,target) 
{
  if (url != ''){
    win=window.open(url,target,"scrollbars=1,resizable=yes,width=" + sizeX + ",height=" + sizeY);
  }
}
function SelectJumpURL(obj) 
{
  url = obj.options[obj.selectedIndex].value;
  if (url != '')
  {
    window.location = url;
  }
}


// smartRollover
var aaaa;
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);
}

// タブ
function showMenu(id) {
   if(document.all)
      document.all(id).style.display = "block";
   if(document.getElementById)
      document.getElementById(id).style.display = "block";
}
function hideMenu(id) {
   if(document.all)
      document.all(id).style.display = "none";
   if(document.getElementById)
      document.getElementById(id).style.display = "none";
}
function changeImage(id,imageName) {
   if(document.all)
      document.all(id).src = imageName;
   if(document.getElementById)
      document.getElementById(id).src = imageName;
}

//タブ切り替え(ナウナビ使用) 画像名を[_select][_noselect]で保存

function seltab(bpref, hpref, id_max, selected) {
  if (! document.getElementById) return;
  for (i = 0; i <= id_max; i++) {
    if (! document.getElementById(bpref + i)) continue;
    if (i == selected) {
      document.getElementById(bpref + i).style.visibility = "visible";
      document.getElementById(bpref + i).style.position = "";
	  document.getElementById(hpref + i).setAttribute("src", document.getElementById(hpref + i).getAttribute("src").replace("_noselect.", "_select."));

    } else {
      document.getElementById(bpref + i).style.visibility = "hidden";
      document.getElementById(bpref + i).style.position = "absolute";
	  document.getElementById(hpref + i).setAttribute("src", document.getElementById(hpref + i).getAttribute("src").replace("_select.", "_noselect."));
    }
  }
}

//タブ切り替え2(ナウナビ不使用：seltab ⇒ seltab2に)

function seltab2(bpref, hpref, id_max, selected) {
  if (! document.getElementById) return;
  for (i = 0; i <= id_max; i++) {
    if (! document.getElementById(bpref + i)) continue;
    if (i == selected) {
      document.getElementById(bpref + i).style.visibility = "visible";
      document.getElementById(bpref + i).style.position = "";
    } else {
      document.getElementById(bpref + i).style.visibility = "hidden";
      document.getElementById(bpref + i).style.position = "absolute";
    }
  }
}

function addLoadEvent(events, func)
{
	if(typeof window.addEventListener == 'function')
	{
	window.addEventListener(events, func, false);
	return true;
 	}
 	else if(typeof window.attachEvent == 'object')
 	{
		window.attachEvent('on'+events, func);
		return true;
	}
	}
//-->
