/* タブ 上下ボタン */
function tabwin(contBox,btnTop,btnBtm,crrntNum) {
  if (! document.getElementById) return;
  for (i = 0; i <= 10; i++) {
    if (! document.getElementById(contBox + i)) continue;
    if (i == crrntNum) {
      document.getElementById(contBox + i).style.visibility = "visible";
      document.getElementById(contBox + i).style.position = "";
      document.getElementById(btnTop + i).className = "open";
	  document.getElementById(btnBtm + i).className = "open";
    } else {
      document.getElementById(contBox + i).style.visibility = "hidden";
      document.getElementById(contBox + i).style.position = "absolute";
      document.getElementById(contBox + i).style.top = "0px";
      document.getElementById(btnTop + i).className = "close";
	  document.getElementById(btnBtm + i).className = "close";
    }
  }
}

/* タブ 上部ボタンのみ */
function tabwinTop(contBox,btnTop,crrntNum) {
  if (! document.getElementById) return;
  for (i = 0; i <= 10; i++) {
    if (! document.getElementById(contBox + i)) continue;
    if (i == crrntNum) {
      document.getElementById(contBox + i).style.visibility = "visible";
      document.getElementById(contBox + i).style.position = "";
      document.getElementById(btnTop + i).className = "open";
//	  document.getElementById(btnBtm + i).className = "open";
    } else {
      document.getElementById(contBox + i).style.visibility = "hidden";
      document.getElementById(contBox + i).style.position = "absolute";
      document.getElementById(contBox + i).style.top = "0px";
      document.getElementById(btnTop + i).className = "close";
//	  document.getElementById(btnBtm + i).className = "close";
    }
  }
}


/* ロールオーバー */
function smartRollover() {
  if(document.getElementsByTagName) {
    var tags = ["img","input"];
    var len = tags.length;
    for( var i=0; i<len; i++ ) {
      var el = document.getElementsByTagName(tags[i]);
      var len2 = el.length;
      for(var j=0; j<len2; j++) {
        var attr = el[j].getAttribute("src");
        if( attr ) {
          if(el[j].getAttribute("src").match(/_ot\./))
          {
            el[j].onmouseover = function() {
              this.setAttribute("src", this.getAttribute("src").replace("_ot.", "_ov."));
            }
            el[j].onmouseout = function() {
              this.setAttribute("src", this.getAttribute("src").replace("_ov.", "_ot."));
            }
          }
        }
      }
    }
  }
}
if(window.addEventListener) {
  window.addEventListener("load", smartRollover, false);   
}else if(window.attachEvent) {
  window.attachEvent("onload", smartRollover);
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

/* When Open The Window ..Keep Screen*/
function ClickKeep() {   
var StartClickKeep = 1;
}

/* banners automatically */
function fDate(stDate, exDate){
	if((new Date()).getTime()>=(new Date(stDate)).getTime() && (new Date()).getTime()<=(new Date(exDate)).getTime()){
	document.write(bnrDate);
	}
}
function bnrChanger(ex_Date){
	if((new Date()).getTime()<=(new Date(ex_Date)).getTime()){
	document.write(bnrBf);
	}else{
	document.write(bnrAf);
	}
}
function btnEntrance(exDate01, exDate02){
	if((new Date(exDate01)).getTime()<=(new Date()).getTime() && (new Date()).getTime()<=(new Date(exDate02)).getTime()){
	document.write(btnOn);
	}else if((new Date(exDate01)).getTime()>=(new Date()).getTime()){
	document.write(btnOff_Bf);
	}else{
	document.write(btnOff_Af);
	}
}

/* sBm */
function sbURL(){return window.location.href;}
function utf8URL(){return encodeURIComponent(sbURL());}
function sbTitle(){return document.title;}
function utf8Title(){return encodeURIComponent(sbTitle());}



