// header graphics array
var header = new Array();
header[0] = "pagepic0.gif";
header[1] = "pagepic1.gif";
header[2] = "pagepic2.gif";
header[3] = "pagepic3.gif";
header[4] = "pagepic4.gif";
header[5] = "pagepic5.gif";
header[6] = "pagepic6.gif";
header[7] = "pagepic7.gif";
header[8] = "pagepic8.gif";
header[9] = "pagepic9.gif";
header[10] = "pagepic10.gif";
header[11] = "pagepic11.gif";
header[12] = "pagepic12.gif";


/***************************** Image swapping ***************************/
// write the swapping image
function swap(array_name) {
	var array_length = eval(array_name+".length"); // dynamically evaluate the length of the array
	var array_slot = Math.round(Math.random() * (array_length - 1)); // select a random number based on the array's length
	var pick = eval(array_name+"["+array_slot+"]"); // pull the image name from the array
	// return the image name
	return pick;
}


