<!--
var theImages		= new Array();
var theImagesAlt	= new Array();
var tmpAllAlts		= new Array();
var resizePath		= "inc_php/imgresize.inc.php";  //set this to the path of the resizer - must be correct if using showImageResize

// change this number to the total number of images!
var numImages = 22;

// add all possible alt tags here
tmpAllAlts[0] = 'Worcester Preparatory School Students'
tmpAllAlts[1] = 'Worcester Preparatory School Activities'
tmpAllAlts[2] = 'Worcester Preparatory School Curriculum'



// ======================================
// do not change anything below this line
// ======================================

for (i=0; i<numImages; i++) {
	theImages[i]	= 'images/rotate/'+i+'.jpg';
	theImagesAlt[i]	= tmpAllAlts[(i % (tmpAllAlts.length))];
}

var j = 0
var p = theImages.length;

var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}

var whichImage = Math.round(Math.random()*(p-1));

/* ================================================================ */
/*  Paste the following code wherever you want the image to appear  */
/*  <script type="text/javascript">showImage();</script>            */
/* ================================================================ */

function showImage(){
	document.write('<img src="'+theImages[whichImage]+'" alt="'+theImagesAlt[whichImage]+'" title="'+theImagesAlt[whichImage]+'">');
}

// ==============================================================
// w = width , h = height, contrain = 1 or 0 
// constrain = 1 - this will scale the image to fit within the given
//                 w and h while maintaining proportions
// constrain = 0 - this will scale the image to the exact w and h
//
/*  Paste the following code wherever you want the image to appear  */
/*  <script type="text/javascript">showImage(100,100,1);</script>            */
//
// ================================================================
function showImageResize(w,h,constrain){ 
	document.write('<img src="' + resizePath + "?constrain="+constrain+"&img=/" +theImages[whichImage]+"&w="+w+"&h="+h+'" alt="'+theImagesAlt[whichImage]+'"> title="'+theImagesAlt[whichImage]+'">');
}

//-->

