<form>
<center>
<script language="Javascript">
<!--
// please keep these lines on when you copy the source
// made by: Nicolas - http://www.javascript-page.com
var current = 0;
function initArray() {
this.length = initArray.arguments.length;
for (var i = 0; i < this.length; i++) {
this[i] = initArray.arguments[i];
}
}
var picz = new initArray(
"0.gif",
"1.gif",
"2.gif",
"3.gif",
"4.gif",
"5.gif",
"6.gif",
"7.gif",
"8.gif",
"9.gif"
);
document.write('<img name="jscriptimg" src="'+picz[0]+'">');
function checkIt(val) {
var goodnum = current+val;
if (goodnum < 0) alert("You can't go any further back!");
else if (goodnum > picz.length-1) alert("You can't go any further forward!");
else document.jscriptimg.src = picz[goodnum];
current = goodnum;
}
//-->
</script>
<br><input type="button" value="Back" onclick="checkIt(-1)"> <input type="button" value="Forward" onclick="checkIt(1)">
</center>
</form>