var index;
var photos = new Array(21);

function addPhoto(index, url)
{
	var p = new Object();
	p.image = new Image();
	p.image.src = url;
	photos[index] = p;
}

addPhoto(1,"images/waving_.jpg");
addPhoto(2,"images/high_pat_cl.jpg");
addPhoto(3,"images/separate_cl.jpg");
addPhoto(4,"images/Kick with heel left.jpg");
addPhoto(5,"images/strike_tiger_cl_1.jpg");
addPhoto(6,"images/StrikeTigersEars_1.jpg");
addPhoto(7,"images/fair_lady_cl.jpg");
addPhoto(8,"images/creeping_.jpg");
addPhoto(9,"images/golden_.jpg");
addPhoto(10,"images/waving_ink.jpg");
addPhoto(11,"images/high_pat_ink2.jpg");
addPhoto(12,"images/separate_ink.jpg");
addPhoto(13,"images/Kick with heel left_ink.jpg");
addPhoto(14,"images/strike-tiger1.jpg");
addPhoto(15,"images/strike tiger-13.jpg");
addPhoto(16,"images/tiger-ears-2.jpg");
addPhoto(17,"images/fair_lady_ink.jpg");
addPhoto(18,"images/creeping__ink.jpg");
addPhoto(19,"images/golden_ink.jpg");
addPhoto(20,"images/7stars.jpg");

photos[1].title = "<span class='style1'>"+ "Tai Chi Form - Waving Hands in the Clouds."+ "</span>" +"<br/>" + "Acrylic on canvas. 35 x 45 cm, 2003";
photos[2].title = "<span class='style1'>"+"Tai chi form - High Pat on Horse."+"</span>" +"<br/>" + "Acrylic on canvas. 30x90 cm, 2005";
photos[3].title ="<span class='style1'>"+ "Tai chi form - Separate Right Foot."+ "</span>" +"<br/>" + "Acrylic on canvas. 40x50 cm, 2005 ";
photos[4].title = "<span class='style1'>"+"Tai chi form - kick with heel, left."+ "</span>" +"<br/>" + "Acrylic on canvas on wood. 30x50 cm, 2006 ";
photos[5].title =  "<span class='style1'>"+"Tai chi form - Strike Tiger"+ "</span>" +"<br/>" + "Acrylic on canvas. 27 x 21 cm, 2011";
photos[6].title =  "<span class='style1'>"+"Tai chi form - Strike Tiger's Ears"+ "</span>" +"<br/>" + "Acrylic on canvas. 38 x 48 cm, 2011";
photos[7].title = "<span class='style1'>"+"Tai chi form - fair lady weaves at the shuttle."+ "</span>" +"<br/>" + "Acrylic on unprimed canvas. 22x25cm, 2009";
photos[8].title =  "<span class='style1'>"+"Tai chi form - Squatting Single Whip ( Creeping Snake )"+ "</span>" +"<br/>" + "Acrylic on canvas. 25 x 50 cm, 1999";
photos[9].title = "<span class='style1'>"+"Tai chi form - golden rooster."+ "</span>" +"<br/>" + "Acrylic on canvas. 35x50 cm, 2002 ";
photos[10].title = "<span class='style1'>"+"Tai chi form - Waving Hands in the Clouds "+ "</span>" +"<br/>" + "Chinese ink on rice paper. 20 x 18 cm, 2003 ";
photos[11].title =  "<span class='style1'>"+"Tai chi form - High Pat on Horse "+ "</span>" +"<br/>" + "Chinese ink on rice paper. 13 x 24 cm, 2005  ";
photos[12].title = "<span class='style1'>"+"Tai chi form - Separate Right Foot"+ "</span>" +"<br/>" + "Chinese ink on rice paper. 22.5 x 22 cm, 2005 ";
photos[13].title = "<span class='style1'>"+"Tai chi form - kick with heel, left."+ "</span>" +"<br/>" + "Chinese ink on rice paper. 13 x 35 cm, 2006 ";
photos[14].title = "<span class='style1'>"+"Tai chi form - Strike Tiger"+ "</span>" +"<br/>" + "Chinese ink on rice paper. 16 x 23 cm, 2010 ";
photos[15].title = "<span class='style1'>"+"Tai chi form - Strike Tiger"+ "</span>" +"<br/>" + "Chinese ink on rice paper. 18 x 24 cm, 2010 ";
photos[16].title =  "<span class='style1'>"+"Tai chi form - Strike tiger's ears."+ "</span>" +"<br/>" + "Chinese ink on rice paper. 17 x 23 cm, 2011";
photos[17].title =  "<span class='style1'>"+"Tai chi form - fair lady weaves at the shuttle."+ "</span>" +"<br/>" + "Chinese ink on rice paper. 21 x 24.5 cm, 2008";
photos[18].title = "<span class='style1'>"+"Tai chi form - Squatting Single Whip."+ "</span>" +"<br/>" + "Chinese ink on rice paper.15 x 25 cm, 1999 ";
photos[19].title =  "<span class='style1'>"+"Tai chi form - Golden Rooster Standing on One Leg. "+ "</span>" +"<br/>" + "Chinese ink on rice paper. 18 x 14 cm, 2002 ";
photos[20].title = "<span class='style1'>"+"Tai chi form - step to seven stars"+ "</span>" +"<br/>" + "Chinese ink on rice paper. 16 x 35 cm, 2008";

photos[1].text = "";
photos[2].text = "";
photos[3].text = "";
photos[4].text = "";
photos[5].text = "";
photos[6].text = "";
photos[7].text = "";
photos[8].text = "";
photos[9].text = "";
photos[10].text = "";
photos[11].text = "";
photos[12].text = "";
photos[13].text = "";
photos[14].text = "";
photos[15].text = "";
photos[16].text = "";
photos[17].text = "The Primordial Weaver, the Great Weaver, is the creator of the universe, weaving on the loom of life the fate of all. (In Chinese symbolism: The alternations of Yin and Yang.)" + "<br/>" + "''The to-and-fro motion of the shuttle on the cosmic loom''- Chang-Hung Yang." + "<br/>" + "An Illustrated Encyclopedia of Traditional Symbols. By J.C. Cooper.";
photos[18].text = "";
photos[19].text = "Attempting to draw a realistic impression of a posture may inhibit the sense of flow if it is the sense of movement that we would like to convey, not just the posture in its final stage.";
photos[20].text = "";

function moveUp()
{
	index=index+1;
	if (index==21)
	{
		index=1;
	}
	showPhoto(index);	
}

function moveDown()
{
	index=index-1;
	if (index==0)
	{
		index=20
	}
	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 Form')
	index = num;
}

