// Define an array
function makeArray(arraySize) {
     this.length = arraySize
     return this
}

// Produce an array with space for two possible image names
imageNames = new makeArray(2)

function show(num,img_id) {
	if (num=="0") document.images[img_id].src=imageNames[1];
	if (num=="1") document.images[img_id].src=imageNames[0];
}


// ----NOTES:--------------------------------------------------
// Usage in HTML pages:
//
// <script SRC="javascript/swaptwo.js">
// </script>
//
// The two lines above must appear in the <head></head> section
// The seven lines that follow display and swap images:
//
// <a onMouseover='imageNames[0] = "images/oldcamera.gif";
// imageNames[1] = "images/oldradio.gif"; 
// show(0,2);
// status=" "; return true'
// onMouseout='show(1,2); status=" "; return true' href="#">
// <img src="images/oldcamera.gif" border=0>
// </a>
//
// in the onMouseOver statement, there are 4 parameters:
// 1. the image in the 'mouseoff' case
// 2. the image in the 'mouseon' case
// 3. the call to the 'show' function, with 2 parameters:
//      a. the first number is the 'off' indicator
//      b. the second number is the number if the image,by number,
//         in the document, to swap.  The first image to load
//         is called '0', the second is called '1', etc..
//         To change the image at the position occupied by image
//         number '0' (regardless of which image is mouseover'ed
//         at that moment) specify '0' for the second parameter.
//	   Or call the image by name.
// 4. an instruction not to display the image src in the stauts bar
//
// in the onMouseOut statement, there are 2 parameters:
// 1. the call to the 'show' function, with 2 parameters:
//      a. the first number is the 'on' indicator
//      b. the second number is the number if the image,by number,
//         in the document, to swap.  Same as in the onMouseOver.
// 2. an instruction not to display the image src in the stauts bar
//
// the img src tag simply gives the image to display at that location.
// This might be the same as the first image named in the onMouseOver
// statment, if this image will replace itself, or it might be some
// other image, if it is meant only as the 'trigger' event to cause
// some other image on the page to swap.
//
// Happy Swapping!
//
// Code written by Wayne A. Austin,  e-mail: ac568@ncf.ca
