// セルをクリックしたときにセル内のアンカーをクリック
// onclick/onkeypress に指定
// ex) actItemClick(this);
function actItemClick(_target) {
 if (!document.styleSheets) return;
 if (window.event) {
//  if (event.srcElement.tagName == "TD") _target.children.tags("A")[0].click();
  if (event.srcElement.tagName == "TD") _target.children.tags("TABLE").item(0).getElementsByTagName("A")[0].click();
 } else {
  location.href = _target.getElementsByTagName("A")[0].href;
 }
}

// フォーカスしたときに色を変化/マウスカーソルを変化
// onmouseover/onfocus に指定
// ex) actItemFocus(this);
function actItemFocus(_target) {
 if (!document.styleSheets) return;
 var _bgColor = "#FEEFFC";
 if (window.event) {
  if (!_target.contains(event.fromElement)) {
   _target.style.cursor = "hand";
   _target.style.backgroundColor = _bgColor;
   _target.style.fontSize = "13";
   _target.style.fontWeight = "normal";
//   _target.style.borderWidth = "normal";
  }
 } else {
  _target.style.cursor = "pointer";
  _target.style.backgroundColor = _bgColor;
 }
}

// フォーカスが離れたときに色を戻す/マウスカーソルを戻す
// onmouseout/onblur に指定
// ex) actItemBlur(this);
function actItemBlur(_target) {
 var _bgColor = "#ffffff";
 if (!document.styleSheets) return;
 if (window.event) {
  if (!_target.contains(event.toElement)) {
   _target.style.cursor = "default";
   _target.style.backgroundColor = _bgColor;
   _target.style.fontSize = "13";
   _target.style.fontWeight = "normal";
//   _target.style.borderWidth = "normal";
  }
 } else {
  _target.style.cursor = "default";
  _target.style.backgroundColor = _bgColor;
 }
}

function popup(url, name, width, height, resizable, scrollbars) {
	window.open(url, name,
		'width=' + width 
		+ ',height=' + height 
		+ ',menubar=no,toolbar=no,resizable='
		+ resizable + ',status=no,scrollbars=' + scrollbars);
}

// ロールオーバー用
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		navi1_01_over = newImage("images/navi1_01-over.jpg");
		navi1_02_over = newImage("images/navi1_02-over.jpg");
		navi1_03_over = newImage("images/navi1_03-over.jpg");
		navi1_04_over = newImage("images/navi1_04-over.jpg");
		navi1_05_over = newImage("images/navi1_05-over.jpg");
		navi1_06_over = newImage("images/navi1_06-over.jpg");
		navi1_07_over = newImage("images/navi1_07-over.jpg");
		navi1_08_over = newImage("images/navi1_08-over.jpg");
		navi2_02_over = newImage("images/navi2_02-over.jpg");
		navi2_03_over = newImage("images/navi2_03-over.jpg");
		navi2_04_over = newImage("images/navi2_04-over.jpg");
		navi2_05_over = newImage("images/navi2_05-over.jpg");
		navi2_06_over = newImage("images/navi2_06-over.jpg");
		navi2_07_over = newImage("images/navi2_07-over.jpg");
		preloadFlag = true;
	}
}

