function highlight(num) {
	if (document.getElementById("item_"+num)) {
		document.getElementById("highlight").innerHTML = document.getElementById("item_"+num).innerHTML;
	}
}

var imageidx = 1;
function next_image(increment) {
	document.getElementById("slideshow").src=images[imageidx];
	imageidx = imageidx + increment;
	if (imageidx>=images.length) imageidx = 0;
	if (imageidx<0) imageidx = images.length-1;
}

function set_image(idx) {
	document.getElementById("slideshow").src=images[idx];
}

function print_nav() {
	if (images.length>1) {
		document.write('<table width=100%><tr>');
		for(var i=0;i<images.length;++i) {
			if (i>0 && i%3==0) { document.write('</tr><tr>'); }
			document.write('<td align=left valign=top><a href="" onclick="set_image('+i+'); return false;"><img width=100 src="'+images[i]+'"</a></td>');
		}
		document.write('</tr></table>');
	}
}