<!--
//アニメ
var ImageSetB = 1;
ANIMA = new Array()
for(i = 1; i < 9; i++) {
ANIMA[i] = new Image();
ANIMA[i].src = "jpg/slide" + i + ".jpg";
}
function anime_1() {
	document.animation.src = ANIMA[ImageSetB].src;
	ImageSetB++;
	if(ImageSetB > 8) {ImageSetB = 1;}
	setTimeout("anime_1()",2900);
}

//トップリンク
function Next1() { location.href="home.htm" }

//テーブル背景入替
function changeTableBG(bgName) {
	if (document.all) { document.all["myTBL"].style.backgroundImage = "url("+bgName+")"; }
}

//テーブル文字入替
function changeTableText(cText) {
	if (document.all) { document.all["myCell"].innerText = cText; }
}

// ステップ制御オブジェクト（ここからフェード）
function Stepper(idn,do_func,vs,ve,steps,end,interval) {
  this.id      = idn;      // 対象要素のID名
  this.do_func = do_func;  // ステップ実行関数
  this.vs      = vs;       // 開始オブジェクト
  this.ve      = ve;       // 終了オブジェクト
  this.steps   = steps;    // ステップ数
  this.end     = end;      // 終了関数
  this.interval= interval; // インターバル時間
}
Stepper.prototype.element = null; // 対象要素のオブジェクト
Stepper.prototype.step    = 0;    // 現在のステップ
Stepper.prototype.out     = 0;    // 動作方向( in = 0, out = 1 )
Stepper.prototype.tid     = null; // タイマオブジェクト
// ステップ実行メソッド
Stepper.prototype.do_step = function(out){
  this.out = out;
  var nstp = out?(this.step-1):(this.step+1);
  if(nstp<0         ) nstp = 0;
  if(nstp>this.steps) nstp = this.steps;
  if(nstp == this.step){
    if(this.end) this.end(out);
    return 1; // 完了
  }
  if(    this.element
     || (this.element=document.getElementById(this.id)))
  {
    this.do_func(out,nstp);
  }
  this.step = nstp;
  return 0;   // 継続
}
// 終了関数呼び出しメソッド
Stepper.prototype.call_endcallback = function(){
  if(this.end) this.end(this.out,this.ed_cd);
}
// 動作停止メソッド
Stepper.prototype.cancel = function(){
  if(this.tid){
    clearTimeout(this.tid); this.tid=null;
    this.call_endcallback();
  }
}

// 終了関数
function end(out){
  if(out && this.element)
    this.element.style.visibility = 'hidden';
}
// 開始関数
function start(out,id){
  if(!out)
    document.getElementById(id).style.visibility = 'inherit';
}
// 実行関数
function manage(n,out){
  var obj = objs[n];
  var fin = obj.do_step(out);
  obj.tid = fin?null:setTimeout('manage('+n+','+out+')',obj.interval);
}
// 終了関数
function closure(){
  for(var i=0; i<objs.length; i++){
    var obj = objs[i];
    if(obj.tid){ clearTimeout(obj.tid); obj.tid=null; }
  }
}
// 開始関数
function action(n,out){
  if(!document.getElementById) return;
  var obj = objs[n];
  obj.cancel();
  start(out,obj.id);
  manage(n,out);
}

objs = new Array(
  new Stepper('fade',do_fade,    // 要素名と実行関数
    new Array( 0x33,0x99,0x66 ), // 開始時の色
    new Array( 0xd1,0xf1,0xcd ), // 終了時の色
    10,                          // ステップ数
    end,                         // 動作完了時に呼び出す関数
    100)                         // インターバル時間( msec )
  );
// 色値計算関数
function calc_color(v1,v2,n,i){
  return Math.floor((v2-v1)/n*i+v1);
}
// フェード実行関数
function do_fade(out,nstp){
  var r = calc_color(this.vs[0],this.ve[0],this.steps,nstp);
  var g = calc_color(this.vs[1],this.ve[1],this.steps,nstp);
  var b = calc_color(this.vs[2],this.ve[2],this.steps,nstp);
  this.element.style.color = 'rgb('+r+','+g+','+b+')';
}

// ここから既存ファイル
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];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
