var bandPics = new Array();
bandPics[0] = "images/pic1.jpg";
bandPics[1] = "images/pic2.jpg";
bandPics[2] = "images/pic3.jpg";
bandPics[3] = "images/pic4.jpg";
bandPics[4] = "images/pic11.jpg";
bandPics[5] = "images/pic6.jpg";
bandPics[6] = "images/pic7.jpg";
bandPics[7] = "images/pic8.jpg";
bandPics[8] = "images/pic9.jpg";
bandPics[9] = "images/pic10.jpg";
bandPics[10] = "images/pic12.jpg";


var position = 0;
var frame = document.getElementById('pictureFrame');
var navArea = document.getElementById('navigationCell');

function pictureViewer()
{
	this.rotateLeft = rotateLeft;
	this.rotateRight = rotateRight;
	frame.innerHTML = "<img src=\""+bandPics[position]+"\" />";
	navArea.innerHTML = "<input type=\"button\" id=\"inputs\" onMouseOver=\"(document.all)?this.style.cursor = 'hand':this.style.cursor = 'pointer';\" value=\"NEXT >>\" onClick=\"viewer.rotateRight();\"/>";
}

function rotateLeft()
{
	position--;

	if(position > 0 && position < (bandPics.length - 1))
	{
		navArea.innerHTML = "<input type=\"button\" id=\"inputs\" onMouseOver=\"(document.all)?this.style.cursor = 'hand':this.style.cursor = 'pointer';\" value=\"<< PREVIOUS\" onClick=\"viewer.rotateLeft();\"/> <input type=\"button\" id=\"inputs\" onMouseOver=\"(document.all)?this.style.cursor = 'hand':this.style.cursor = 'pointer';\" value=\"NEXT >>\" onClick=\"viewer.rotateRight();\"/>";
	}
	else if (position > 0 && position == (bandPics.length - 1))
	{
		navArea.innerHTML = "<input type=\"button\" id=\"inputs\" onMouseOver=\"(document.all)?this.style.cursor = 'hand':this.style.cursor = 'pointer';\" value=\"<< PREVIOUS\" onClick=\"viewer.rotateLeft();\"/>";
	}
	else if(position == 0)
		navArea.innerHTML = "<input type=\"button\" id=\"inputs\" onMouseOver=\"(document.all)?this.style.cursor = 'hand':this.style.cursor = 'pointer';\" value=\"NEXT >>\" onClick=\"viewer.rotateRight();\"/>";

	frame.innerHTML = "<img src=\""+bandPics[position]+"\" />";
}

function rotateRight()
{
	position++;
	if(position > 0 && position < (bandPics.length - 1))
	{
		navArea.innerHTML = "<input type=\"button\" id=\"inputs\" onMouseOver=\"(document.all)?this.style.cursor = 'hand':this.style.cursor = 'pointer';\" value=\"<< PREVIOUS\" onClick=\"viewer.rotateLeft();\"/> <input type=\"button\" id=\"inputs\" onMouseOver=\"(document.all)?this.style.cursor = 'hand':this.style.cursor = 'pointer';\" value=\"NEXT >>\" onClick=\"viewer.rotateRight();\"/>";
	}
	else if (position > 0 && position == (bandPics.length - 1))
	{
		navArea.innerHTML = "<input type=\"button\" id=\"inputs\" onMouseOver=\"(document.all)?this.style.cursor = 'hand':this.style.cursor = 'pointer';\" value=\"<< PREVIOUS\" onClick=\"viewer.rotateLeft();\"/>";
	}
	else
		navArea.innerHTML = "<input type=\"button\" id=\"inputs\" onMouseOver=\"(document.all)?this.style.cursor = 'hand':this.style.cursor = 'pointer';\" value=\"NEXT >>\" onClick=\"viewer.rotateRight();\"/>";
	frame.innerHTML = "<img src=\""+bandPics[position]+"\" />";
}

