var ImgId1 = "img1";
var ImgId2 = "img2";
var opa = 0;		//透明度 0は透明
var opacnt = 1;		//透明度の増減の間隔
var timer = 40;		//タイマーの実行間隔 ミリ秒
var i = 0;
var tm1;

var f_pics1 = new Array();	//画像
//画像を指定する
f_pics1[0] = 'images/home/dot.gif';	//ダミー
f_pics1[1] = 'images/home/top005b.jpg';	//GINGA
f_pics1[2] = 'images/home/top005.jpg';	//GINGA
f_pics1[3] = 'images/home/top001.jpg';	//ONGAKU
f_pics1[4] = 'images/home/top003.jpg';	//211(GAKUON-II)
f_pics1[5] = 'images/home/top004.jpg';	//M1000Mk2
f_pics1[6] = 'images/home/top002.jpg';	//IO-M
f_pics1[7] = 'images/home/top006.jpg';	//G-70
f_pics1[8] = 'images/home/top007.jpg';	//Overture
f_pics1[9] = 'images/home/top005.jpg';	//GINGA


//フェードイン
function FadeIn() {
	if (f_pics1.length <= i+1) {
		clearInterval(tm1);	//タイマー終了。
		return;
	}

	if (opa == 0) {
		MyIMG = document.getElementById(ImgId1);
		MyIMG.style.visibility = 'visible';
		MyIMG.style.filter = 'alpha(opacity:100)'; // IE用
		MyIMG.style.opacity = 1; //Firefox用
		document.images[ImgId1].src = f_pics1[i];

		MyIMG = document.getElementById(ImgId2);
		MyIMG.style.visibility = "visible";
		MyIMG.style.filter = "alpha(opacity:0)"; // IE用
		MyIMG.style.opacity = 0; //Firefox用
		document.images[ImgId2].src = f_pics1[i+1];
	}
	if (opa <= 100) {
		MyIMG.style.filter = "alpha(opacity:"+opa+")"; // IE用
		MyIMG.style.opacity = opa / 100; //Firefox用
	}
	opa += opacnt;
	if (opa > 200) {
		opa = 0;
		i++;
	}

}


function FadeInTm() {	//タイマーをセット
	tm1 = setInterval("FadeIn()", timer);
}

