// JavaScript Document
var img = new Array();
var f_img = new Array();
var frontplay = new Array();

var idcount = 0;
var imgcount = 0;

img[0] = new Image();
img[1] = new Image();
img[2] = new Image();
img[3] = new Image();
img[4] = new Image();
img[5] = new Image();
img[6] = new Image();
img[7] = new Image();
img[8] = new Image();
img[9] = new Image();
img[10] = new Image();
img[11] = new Image();

f_img[0] = new Image();
f_img[1] = new Image();
f_img[2] = new Image();
f_img[3] = new Image();
f_img[4] = new Image();
f_img[5] = new Image();
f_img[6] = new Image();
f_img[7] = new Image();
f_img[8] = new Image();
f_img[9] = new Image();
f_img[10] = new Image();
f_img[11] = new Image();

img[0].src="rwhold/btnhome.gif";
img[1].src="rwhold/btnhome2.gif";
img[2].src="rwhold/btnabout.gif";
img[3].src="rwhold/btnabout2.gif";
img[4].src="rwhold/btncat.gif";
img[5].src="rwhold/btncat2.gif";
img[6].src="rwhold/btnfaqs.gif";
img[7].src="rwhold/btnfaqs2.gif";
img[8].src="rwhold/btnfeedback.gif";
img[9].src="rwhold/btnfeedback2.gif";
img[10].src="rwhold/browse.gif";
img[11].src="rwhold/browse2.gif";

f_img[0].src="rwhold/fplay7.gif";
f_img[1].src="rwhold/fplay8.gif";
f_img[2].src="rwhold/fplay9.gif";
f_img[3].src="rwhold/fplay10.gif";
f_img[4].src="rwhold/fplay11.gif";
f_img[5].src="rwhold/fplay12.gif";
f_img[6].src="rwhold/fplay1.gif";
f_img[7].src="rwhold/fplay2.gif";
f_img[8].src="rwhold/fplay3.gif";
f_img[9].src="rwhold/fplay4.gif";
f_img[10].src="rwhold/fplay5.gif";
f_img[11].src="rwhold/fplay6.gif";

frontplay[0] = "frontplay1";
frontplay[1] = "frontplay2";
frontplay[2] = "frontplay3";
frontplay[3] = "frontplay4";
frontplay[4] = "frontplay5";
frontplay[5] = "frontplay6";

function changeBTN(e, f, g)
{
	e.src = img[f].src;
	bgplay.filters.blendTrans.Apply();
	bgplay.background = f_img[g].src;
	bgplay.filters.blendTrans.Play();
}

function startAnim()
{
	setInterval("animate()", 8000);	
}

function animate()
{
	for(var i=0; i<=5; i++)
	{
		if(imgcount >= (f_img.length - 1)){ imgcount=0; }
		document.getElementById(frontplay[i]).filters.blendTrans.Apply();
		document.getElementById(frontplay[i]).src = f_img[imgcount].src;
		document.getElementById(frontplay[i]).filters.blendTrans.Play();
		imgcount++;
	}
}
