var index;
var photos = new Array(7);

function addPhoto(index, url)
{
	var p = new Object();
	p.image = new Image();
	p.image.src = url;
	photos[index] = p;
}

addPhoto(1,"images_/pa_kua.jpg");
addPhoto(2,"images_/monkey_color.jpg");
addPhoto(3,"images_/PaKua_002.jpg");
addPhoto(4,"images_/PaKua_001.jpg");
addPhoto(5,"images_/monkey1.jpg");
addPhoto(6,"images_/monkey3.jpg");

photos[1].title = "<span class='style1'>"+ "pa kua & turtle."+ "</span>" +"<br/>" + "Acrylic on canvas. 100 x 70 cm, 2006 ";
photos[2].title = "<span class='style1'>"+"Pa Kua - Monkey Offers Fruit."+"</span>" +"<br/>" + "Acrylic on canvas. 40x30 cm, 2008.";
photos[3].title ="<span class='style1'>"+ "Pa kua & turtle."+ "</span>" +"<br/>" + "Chinese ink on rice paper. 12 x 24 cm, 2006 ";
photos[4].title = "<span class='style1'>"+"Pa kua guard posture."+ "</span>" +"<br/>" + "Chinese ink on rice paper. 19 x 16 cm, 2006 ";
photos[5].title =  "<span class='style1'>"+"Pa Kua - Monkey Offers Fruit."+ "</span>" +"<br/>" + "Chinese ink on rice paper. 21x16 cm 2008.";
photos[6].title = "<span class='style1'>"+"Pa Kua - Monkey Offers Fruit."+ "</span>" +"<br/>" + "Chinese ink on rice paper. 22x16 cm 2008.";


photos[1].text = "";
photos[2].text = "";
photos[3].text = "''The only stable thing in the world is Change.'' This wisdom was originated from the I Ching  - the book of changes-which is the base for Pa Kua  Chang. In former times the turtle shell was used for reading the changes.(the oracle)";
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 = ('Pa Kua Form Movement')
	index = num;
}

