Forum Moderators: open
<script language="Javascript">
var current = 0;
function imageArray() {
this.length = imageArray.arguments.length;
for (var i = 0; i < this.length; i++)
{
this[i] = imageArray.arguments[i];
}
}
var pic = new imageArray
(
"CIMG0026.JPG",
"CIMG0027.JPG",
);
document.write('<img name="img" src="'+pic[0]+'" width="800" height="600">');
document.write("<br><br>Image ")
?document.write("" +page.text.value+ " of 11");
function checkIt(val)
{
var goodnum = current+val;
if (goodnum < 0)
{
goodnum = 10;
document.img.src = pic[goodnum];
}
else if (goodnum > pic.length-1)
{
goodnum = 0;
document.img.src = pic[goodnum];
}
else
{
document.img.src = pic[goodnum];
text=goodnum;
?full=document.page[goodnum].value;
}
current = goodnum;
}
</script>