var actionItem = new Array();
	actionItem[0] = new actionSet("play", "images/button_play_0.jpg", "images/button_play_1.jpg");
	actionItem[1] = new actionSet("pause", "images/button_pause_0.jpg", "images/button_pause_1.jpg");
	actionItem[2] = new actionSet("jump", "images/button_jump_0.jpg", "images/button_jump_1.jpg");
var nActions = 3;
var activeID = 0;

var pageURL = new Array();
	pageURL[0] = "productshowroom.html";
	pageURL[1] = "productshowroom_esd.html";
	pageURL[2] = "productshowroom_usb.html";
	pageURL[3] = "productshowroom_1394.html";
	pageURL[4] = "productshowroom_combo.html";
	pageURL[5] = "productshowroom_cpu.html";

function actionSet(name, src0, src1)
{
	this.name = name;
	this.srcOriginal = new Image();
	this.srcOriginal.src = src0;
	this.srcActive = new Image();
	this.srcActive.src = src1;
}

function changeSlide(index, jumpto)
{
	if(index == activeID) return;
	
	
	if(index == 0)
	{
		window.document.slideshow.start();
		activeID = index;
	}
	else if(index == 1)
	{
		window.document.slideshow.stop();
		activeID = index;
	}
	else if(index == 2)
	{
		if(jumpto <= 0) return;
		
		window.document.slideshow.play_from(jumpto);
		window.document.slideshow.start();
		if(activeID == 1)
		{
			activateButton(1, 0);
		}
		activeID = 0;
	}
}

function activateButton(oldIdx, newIdx)
{
	document.images[actionItem[oldIdx].name].src = actionItem[oldIdx].srcOriginal.src;
	document.images[actionItem[newIdx].name].src = actionItem[newIdx].srcActive.src;
}

//function setSlideShowPanel(index)
//{
//	document.write("<font face=\"Arial, Helvetica, Sans Serif\" size=2 color=#000000><b>");
//	document.write("<a href=\"javascript:changeSlide(0, 0)\"><img name=\"play\" src=\"images/button_play_1.jpg\" border=0 onmousedown=\"activateButton(activeID, 0)\"></a>");
//	document.write("<a href=\"javascript:changeSlide(1, 0)\"><img name=\"pause\" src=\"images/button_pause_0.jpg\" border=0 onmousedown=\"activateButton(activeID, 1)\"></a>");
//	document.write("<a href=\"javascript:changeSlide(2, document.forms.action.JUMPTO.value)\"><img name=\"jump\" src=\"images/button_jump_0.jpg\" border=0 onmousedown=\"activateButton(activeID, 2)\"></a>");
//	document.write("to page <input type=\"text\" name=\"JUMPTO\" size=2 value=\"1\">");
//	document.write("</b></font>");
//}

function changePage(index)
{
	window.open(pageURL[index], "_self");
}

