/**
Copyright(C) 2011 by Aurora Solution, Inc. All Rights Reserved.
**/

var gk=new Array(4);
gk[0]=new Image();
gk[1]=new Image();
gk[2]=new Image();
gk[3]=new Image();

gk[0].src="images/top/index_main_01.jpg";
gk[1].src="images/top/index_main_02.jpg";
gk[2].src="images/top/index_main_03.jpg";
gk[3].src="images/top/index_main_04.jpg";

var gkm=gk.length;

var maisuu=-1;


function changeImages(){
	
	if (maisuu<3) {
		maisuu++;
	} else {
		maisuu=0;
	}
	document.getElementById("mainImage").src=gk[maisuu].src;
	tomaru=setTimeout("changeImages()",6000);//入れ替え速度変更
	
	if (maisuu == 0) {
		document.getElementById("btn1").src="images/top/btn_show.jpg";
	} else {
		document.getElementById("btn1").src="images/top/btn_hide.jpg";
	}
	if (maisuu == 1) {
		document.getElementById("btn2").src="images/top/btn_show.jpg";
	} else {
		document.getElementById("btn2").src="images/top/btn_hide.jpg";
	}
	if (maisuu == 2) {
		document.getElementById("btn3").src="images/top/btn_show.jpg";
	} else {
		document.getElementById("btn3").src="images/top/btn_hide.jpg";
	}
	if (maisuu == 3) {
		document.getElementById("btn4").src="images/top/btn_show.jpg";
	} else {
		document.getElementById("btn4").src="images/top/btn_hide.jpg";
	}
	
}
function change1(){
	
	clearTimeout(tomaru);
	maisuu=0;
	document.getElementById("mainImage").src=gk[maisuu].src;
	document.getElementById("btn1").src="images/top/btn_show.jpg";
	document.getElementById("btn2").src="images/top/btn_hide.jpg";
	document.getElementById("btn3").src="images/top/btn_hide.jpg";
	document.getElementById("btn4").src="images/top/btn_hide.jpg";
	tomaru=setTimeout("changeImages()",6000);//入れ替え速度変更
}
function change2(){
	
	clearTimeout(tomaru);
	maisuu=1;
	document.getElementById("mainImage").src=gk[maisuu].src;
	document.getElementById("btn1").src="images/top/btn_hide.jpg";
	document.getElementById("btn2").src="images/top/btn_show.jpg";
	document.getElementById("btn3").src="images/top/btn_hide.jpg";
	document.getElementById("btn4").src="images/top/btn_hide.jpg";
	tomaru=setTimeout("changeImages()",6000);//入れ替え速度変更
}
function change3(){
	
	clearTimeout(tomaru);
	maisuu=2;
	document.getElementById("mainImage").src=gk[maisuu].src;
	document.getElementById("btn1").src="images/top/btn_hide.jpg";
	document.getElementById("btn2").src="images/top/btn_hide.jpg";
	document.getElementById("btn3").src="images/top/btn_show.jpg";
	document.getElementById("btn4").src="images/top/btn_hide.jpg";
	tomaru=setTimeout("changeImages()",6000);//入れ替え速度変更
}
function change4(){
	
	clearTimeout(tomaru);
	maisuu=3;
	document.getElementById("mainImage").src=gk[maisuu].src;
	document.getElementById("btn1").src="images/top/btn_hide.jpg";
	document.getElementById("btn2").src="images/top/btn_hide.jpg";
	document.getElementById("btn3").src="images/top/btn_hide.jpg";
	document.getElementById("btn4").src="images/top/btn_show.jpg";
	tomaru=setTimeout("changeImages()",6000);//入れ替え速度変更
}




