<!--
photo = 0;
photos = Array(
	Array('images/books_Panther2.jpg', 'Custom Porthole Book: The Panther (2008)<br><small>8" x 5", Handmade paper, glass, brass, copper, linen thread (sold)</small>'),
	Array('images/books_panther3.jpg', 'Custom Porthole Book: The Panther (2008)<br><small>8" x 5", Handmade paper, glass, brass, copper, linen thread (sold)</small>'),
	Array('images/books_brownleathervertical.jpg', 'Brown Leather Porthole (2008)<br><small>7" x 5", Leather, Nautical Charts, glass, brass</small>'),
	Array('images/books_redfirenze.jpg', 'Florence Map Journal (2008)<br><small>4" x 5", Recycled Map Cover and Leather</small>'),
	Array('images/books_arctic.jpg', 'Arctic Circle Map Journal (2008)<br><small>4.25" x 5.5", Recycled Map Cover (sold)</small>'),
	Array('images/books_mississippiriver.jpg', 'Mississippi River Map Journal (2008)<br><small>4.25" x 5.5", Recycled Map Cover</small>'),
	Array('images/books_plansdaix.jpg', 'Plans dAix (2005) Published in <i>500 Handmade Books</i> by Lark Books<br><small>4.5" x 4.5" x 4"</small>'),
	Array('images/books_plansdaix2.jpg', 'Plans dAix (2005) Published in <i>500 Handmade Books</i> by Lark Books<br><small>4.5" x 4.5" x 4"</small>'),
	Array('images/books_brnl_porthole.jpg', 'Brown Leather Port-hole Book (2008)<br><small>5" x 7", leather, maps, copper, glass</small>'),
	Array('images/books_brnl_porthole2.jpg', 'Brown Leather Port-hole Book, detail (2008)<br><small>5" x 7", leather, maps, copper, glass</small>'),
	Array('images/books_redporthole.jpg', 'Small Port-hole Book (2008)<br><small>4" x 4", handmade paper, copper, glass</small>'),
	Array('images/books_blackporthole.jpg', 'Black Port-hole Book (2008, custom for motobus)<br><small>5" x 7" (sold)</small>'),
	Array('images/books_porthole1.jpg', 'Port-Hole Book (2007)<br><small>5" x 7",  handmade paper, copper, glass (sold)</small>'),
	Array('images/books_porthole2.jpg', 'Port-Hole Book (2007)<br><small>5" x 7",  handmade paper, copper, glass (sold)</small>'),
	Array('images/books_silverfans.jpg', 'Fan Book, Blue/Silver (2007)<br><small>3.5" x 4.5",  Letterpressed cover, Edition of 10</small>'),
	Array('images/books_bluefans.jpg', 'Fan Book, Turquoise/Blue (2007)<br><small>3.5" x 4.5",  Letterpressed cover, Edition of 10</small>'),
	Array('images/books_airroutes.jpg', 'Air Routes Journal (2008)<br><small>4.25" x 5.5",  Recycled Map cover (sold)</small>'),
	Array('images/books_amsterdam.jpg', 'Amsterdam Journal (2008)<br><small>4.25" x 5.5" , Recycled Map cover</small>'),
	Array('images/books_duomusic.jpg', 'Duo (Music Journal) (2008)<br><small>4.25" x 5.5",  Recycled sheet music cover (sold)</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 < photos.length - 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]+"'");
}
//-->