// JavaScript Document
<!--
var photo = 0;
var photos = Array(
	Array('images/cards_hellopenguins.jpg', 'Hello Penguins Card (2009)<br><small>Woodcut with hand-set type</small>'),
	Array('images/cards_bestpeacock.jpg', 'Peacock Card (2009)<br><small>Woodcut with hand-set type</small>'),
	Array('images/cards_congratulations.jpg', 'Congratulations Card (2009)<br><small>Woodcut with hand-set type</small>'),
	Array('images/cards_thankyoubirds.jpg', 'Thank You Card (2009)<br><small>Woodcut with hand-set type</small>'),
	Array('images/cards_heartowl.jpg', 'Heart Owl Card (2008)<br><small>Woodcut with hand-set type</small>'),
	Array('images/cards_christmas08.jpg', 'Christmas Card (2008)<br><small>Letterpress printed in red and silver</small>'),
	Array('images/cards_bday.jpg', 'Birthday Card (2008)<br><small>Letterpress printed in green and orange</small>'),
	Array('images/cards_goldthankyou.jpg', 'Thank You Card (2008)<br><small>Letterpress printed</small>'),
	Array('images/cards_yellowfans.jpg', 'Yellow and Blue Fan Card (2007)<br><small>Letterpress printed in yellow and blue</small>')
);
var numberOfImages = photos.length;
function createAlbum() {
	var output = '<ul>';
	for(var i = 0; i < numberOfImages; i++) {
		//give each link a unique id of "photo-i" where i is the value being incremented
		output += '\n' + '<li><a href="#" id="photo-' + i + '" onclick="photo= ' + i + '; updateAlbum();" >' + (i + 1) + '</a></li>';
	}
	output += '\n' + '</ul>';
	document.write(output);
}

function updateAlbum() {
	//Replace image
	document.getElementById('albumPhoto').src = photos[photo][0];
	//Replace caption
	document.getElementById('albumCaption').innerHTML = photos[photo][1];

	//Clear underline styles from all numbers
	var numbers = Array();
	for(var i = 0; i < numberOfImages; i++) {
		numbers[i] = document.getElementById('photo-' + i);
	}
	for(var i = 0; i < numberOfImages; i++) {
		//numbers[i].style.textDecoration = 'none';
		numbers[i].style.fontWeight = 'normal';
	}
	
	//Add underline to selected number
	var selectedNumber = document.getElementById('photo-' + photo);
	//selectedNumber.style.textDecoration = 'underline';
	selectedNumber.style.fontWeight = 'bold';
}

function next() {
	if (photo < numberOfImages - 1) {
		photo++;
		updateAlbum();
	}
}

function prev() {
	if (photo > 0) {
		photo--;
		updateAlbum();
	}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->

<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

MM_reloadPage(true);

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->