var Images = new Array()

Images[0] = 'image01.jpg'
Images[1] = 'image02.jpg'
Images[2] = 'image03.jpg'
Images[3] = 'image04.jpg'
Images[4] = 'image05.jpg'
Images[5] = 'image06.jpg'
Images[6] = 'image07.jpg'

var j = 0
var p = Images.length;

var preBuffer = new Array()

	for (i = 0; i < p; i++){
	   preBuffer[i] = new Image()
	   preBuffer[i].src = Images[i]
	}

var whichOne = Math.round(Math.random()*(p-1));



// PPC: I put these here cause it's the only global js:

// Function to add options to a select box
function addOption(selectbox,text,value )
{
	var optn = document.createElement("OPTION");
	optn.text = text;
	optn.value = value;
	if (text == "Select one:" || text == "(all)")
		optn.value = "";
	selectbox.options.add(optn);
}

// Function to remove all options from a select box
function removeAllOptions(selectbox)
{
	var i;
	for(i=selectbox.options.length-1;i>=0;i--)
		selectbox.remove(i);
}
									
// Function to add a javascript event
function addEvent( obj, type, fn ) {
  if ( obj.attachEvent ) {
    obj['e'+type+fn] = fn;
    obj[type+fn] = function(){obj['e'+type+fn]( window.event );}
    obj.attachEvent( 'on'+type, obj[type+fn] );
  } else
    obj.addEventListener( type, fn, false );
}

// Function to remove a javascript event
function removeEvent( obj, type, fn ) {
  if ( obj.detachEvent ) {
    obj.detachEvent( 'on'+type, obj[type+fn] );
    obj[type+fn] = null;
  } else
    obj.removeEventListener( type, fn, false );
}
