var index;
var photos = new Array(6);

function addPhoto(index, url)
{
	var p = new Object();
	p.image = new Image();
	p.image.src = url;
	photos[index] = p;
}

addPhoto(1,"images_/join_cat.jpg");
addPhoto(2,"images_/san_shou_cl.jpg");
addPhoto(3,"images_/yielding_.jpg");
addPhoto(4,"images_/joining_1.jpg");
addPhoto(5,"images_/joining_2.jpg");
addPhoto(6,"images_/san_shou.jpg");

photos[1].title = "<span class='style1'>" + "Tai chi movement - Yielding and a Cat. " + "<br/>"+ "</span>" + "Acrylic on canvas. 35 x 50 cm, 2002 ";
photos[2].title = "<span class='style1'>" + "Tai chi movement - San Shou - Two Man set." + "</span>" +"<br/>" + "Acrylic on canvas. 40 x 60 cm, 2007 ";
photos[3].title ="<span class='style1'>" + "Tai chi movement - yielding." + "</span>" +"<br/>" + "Chinese ink on rice paper. 15 x 24 cm, 2002 ";
photos[4].title = "<span class='style1'>" + " Tai chi movement - Joining Hands (Ward off & Push)." + "</span>" +"<br/>" + "Chinese ink on rice paper. 17 x 18 cm, 1996";
photos[5].title =  "<span class='style1'>" + "Joining Hands (Roll Back & Shoulder Stroke)." + "</span>" +"<br/>" + "Chinese ink on rice paper. 20 x 21 cm, 1996";
photos[6].title = "<span class='style1'>" + "Tai chi movement - San Shou- Two Man set." + "</span>" + "<br/>" + "Chinese ink on rice paper. 24 x 12.5 cm, 2007 ";


photos[1].text = "";
photos[2].text = "";
photos[3].text = "";
photos[4].text = "";
photos[5].text = "";
photos[6].text = "";


function moveUp()
{
	index=index+1;
	if (index==7)
	{
		index=1;
	}
	showPhoto(index);	
}

function moveDown()
{
	index=index-1;
	if (index==0)
	{
		index=6
	}
	showPhoto(index);
}

function showPhoto(num) 
{
	var photo = photos[num];
	document.mag.src=photo.image.src;
	document.getElementById('title_').innerHTML = photo.title;
	document.getElementById('description_').innerHTML = photo.text;
	document.mag.alt = ('Tai Chi Movement')
	index = num;
}

