var index;
var photos = new Array(15);

function addPhoto(index, url)
{
	var p = new Object();
	p.image = new Image();
	p.image.src = url;
	photos[index] = p;
}

addPhoto(1,"images_/embrace_.jpg");
addPhoto(2,"images_/fist_.jpg");
addPhoto(3,"images_/repulse_.jpg");
addPhoto(4,"images_/diagonal_.jpg");
addPhoto(5,"images_/needle_.jpg");
addPhoto(6,"images_/iron_.jpg");
addPhoto(7,"images_/chop_.jpg");
addPhoto(8,"images_/embrace_ink.jpg");
addPhoto(9,"images_/fist_ink.jpg");
addPhoto(10,"images_/repulse_ink.jpg");
addPhoto(11,"images_/diagonal_ink.jpg");
addPhoto(12,"images_/needle_ink.jpg");
addPhoto(13,"images_/iron_ink.jpg");
addPhoto(14,"images_/chop_ink.jpg");

photos[1].title = "<span class='style1'>" + "Tai chi form - embrace tiger." + "</span>" + "<br/>" + "Acrylic on canvas. 30 x 40 cm, 2000";
photos[2].title = "<span class='style1'>" + "Tai chi form - fist under albow." + "</span>" +"<br/>" + "Acrylic on canvas. 35 x 25 cm, 2003 ";
photos[3].title ="<span class='style1'>" + "Tai chi form - Repulse Monkey." + "</span>" +"<br/>" + "Acrylic on canvas. 30 x 40 cm, 2000";
photos[4].title = "<span class='style1'>" + "Tai chi form - Diagonal Flying." + "</span>" +"<br/>" + "Acrylic on canvas. 20 x 30 cm, 2002";
photos[5].title =  "<span class='style1'>" + "Tai chi form - Needle at the Sea Bottom." + "</span>" +"<br/>" + "Acrylic on canvas. 30 x 40 cm, 2003";
photos[6].title = "<span class='style1'>" + "Tai chi form - iron fan." + "</span>" + "<br/>" + "Acrylic on canvas. 50 x 60 cm, 2004";
photos[7].title = "<span class='style1'>" + "Tai chi form - Turn Body and Chop." + "</span>" +"<br/>" + "Acrylic on canvas. 35 x 25 cm, 2004 ";
photos[8].title = "<span class='style1'>" + "Tai chi form - Embrace Tiger." + "</span>" + "<br/>" + "Chinese ink on rice paper. 18 x 22 cm, 2002";
photos[9].title =  "<span class='style1'>" + "Tai chi form - fist under albow." + "</span>" +"<br/>" + "Chinese ink on rice paper. 21 x 15.5 cm, 2003";
photos[10].title = "<span class='style1'>" + "Tai chi form - Repulse Monkey." + "</span>" +"<br/>" + "Chinese ink on rice paper. 15 x 20 cm, 1999";
photos[11].title = "<span class='style1'>" + "Tai chi form - Diagonal Flying." + "</span>" +"<br/>" + "Chinese ink on rice paper. 18 x 26 cm, 2002";
photos[12].title =  "<span class='style1'>" + "Tai chi form - Needle at the Sea Bottom." + "</span>" +"<br/>" + "Chinese ink on rice paper. 19 x 21 cm, 2003";
photos[13].title = "<span class='style1'>"+"Tai chi form - iron fan."+ "</span>" +"<br/>" + "Chinese ink on rice paper. 18.5 x 24 cm, 2004";
photos[14].title = "<span class='style1'>" + "Tai chi form - Turn Body and Chop."+ "</span>" + "<br/>" + "Chinese ink on rice paper. 19.5 x 25 cm, 2004";

photos[1].text = "";
photos[2].text = "";
photos[3].text = "";
photos[4].text = "Practicing tai chi is a never ending unfolding process of discovering and rediscovering, searching for the essential in this lifelike art in its complexity and multifacetedness.";
photos[5].text = "";
photos[6].text = "";
photos[7].text = "It is as if imperfection becomes a tool that is deliberately used to create an image of the posture which is slightly off exactness as it were and in doing so to allow the human eye its tendency to resolve and complete what it perceives.";
photos[8].text = "";
photos[9].text = "";
photos[10].text = "Structure, spirit and shape originate in the directing idea and are expressed by the brush work." + "<br/>" + "Hsien Ho-a Chinese critic fifth cent. A.D";
photos[11].text = "";
photos[12].text = "";
photos[13].text = "";
photos[14].text = "";


function moveUp()
{
	index=index+1;
	if (index==15)
	{
		index=1;
	}
	showPhoto(index);	
}

function moveDown()
{
	index=index-1;
	if (index==0)
	{
		index=14
	}
	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;
}

