// Simple pic flipper script
// Roman Valderrama 01/09

var currimage = 1;

// function to show an arbitrary image
function showpic(filename) {
	document.getElementById("fullbox").src = "projects/full/" + filename + ".jpg";
	currimage = fileno;
}

function showBigger()
{
	var strbigpic = document.getElementById('fullbox').src;
	strbigpic = strbigpic.replace("http://www.underwaterdepot.net/projects/full/","");
	strbigpic = strbigpic.replace("http://underwaterdepot.net/projects/full/","");

	strbigpic = "http://www.underwaterdepot.net/largeview.php?p=" + strbigpic;

	mywin = window.open(strbigpic,'View','width=640,height=640,scrollbars=yes,resizable=yes');
	return mywin;
}


// function to show next image
function nextimage() {

	// if next image is >16, reset to 1
	if (++currimage>16) { currimage=1;}
//	currimage = (currimage<10) ? "0"+currimage : currimage;

	showpic(currimage);
}