var itr = 0;
var count = 0;
var files = new Array();
var highlightColor = '';
function file()
{
	this.name = '';
	this.plain = '';
	this.date = '';
}
function SetHighlight(color)
{
	highlightColor = color;
}
function Reset()
{
	document.getElementById("fileslot"+itr).style.backgroundColor = "transparent";
}
function Set(index)
{
	Reset();
	itr = index;
	Update();
}
function Next()
{
	Reset();
	itr += 1;
	if(itr >= count)
		itr = 0;
	Update();
}
function Update()
{
	document.getElementById("display").src = files[itr].name;
	document.getElementById("display").alt = files[itr].plain + " (" + files[itr].date + ")";
	document.getElementById("display").title = files[itr].plain + " (" + files[itr].date + ")";
	document.getElementById("fileslot"+itr).style.backgroundColor = highlightColor;
}

