For a homework assignment I need to create a page that uses javascript to allow you to click a button to replace one image with another. I need to use atleast 3 images to display on screen.

I found what seems like a great tutorial on how to do it here http://www.irt.org/articles/js132/index.htm but because I am very very new to javascript I do not understand where to fill in MY information and what information stays as part of the code. For example where it has this:

<script language="JavaScript"><!--which_image_loaded = 0;

function changeImage(direction) {
which_image_loaded += direction;
if (which_image_loaded < 0)
which_image_loaded = 19; //Again, one less than the actual number of images.
if (which_image_loaded > 19)
which_image_loaded = 0;
if (document.images)
document.myimage.src = ImageNames[which_image_loaded];
}
//--></script>

Can someone tell me which sections I am supposed to edit to fill in with my information? For example I know that I change 19 because this tutorial is for 20 images and I only need 3 so I know that I would use 2 because it starts counting at 0. But where it says which_image_loaded am I supposed to put a file name there or is that part of the javascript? and where it says "document.myimage.src = ImageNames[which_image_loaded]; is myimage.src part of the javascript? I am so confused please help me!!!