
<!--


// Set up the image files to be used.
var theImages = new Array()
var theImagesAlt = new Array()// do not change this
var resizePath = "inc_php/imgresize.inc.php";  //set this to the path of the resizer - must be correct if using showImageResize
// To add more image files, continue with the
// pattern below, adding to the array. Rememeber
// to increment the theImages[x] index!

theImages[0] = '../images/photos/friends.jpg'
theImages[1] = '../images/photos/massage.jpg'
theImages[2] = '../images/photos/personaltraining.jpg'
theImages[3] = '../images/photos/pool.jpg'
theImages[4] = '../images/photos/racquetball.jpg'
theImages[5] = '../images/photos/runonbeach.jpg'
theImages[6] = '../images/photos/spinning.jpg'
theImages[7] = '../images/photos/transitions.jpg'
theImages[8] = '../images/photos/treadmillphoto.jpg'
theImages[9] = '../images/photos/weights.jpg'
theImages[10] = '../images/photos/yoga.jpg'

theImagesAlt[0] = 'Ocean City Health Club'
theImagesAlt[1] = 'Ocean City Racquetball'
theImagesAlt[2] = 'Ocean City Health Club'
theImagesAlt[3] = 'Ocean City Racquetball'
theImagesAlt[4] = 'Ocean City Health Club'
theImagesAlt[5] = 'Ocean City Racquetball'
theImagesAlt[6] = 'Ocean City Health Club'
theImagesAlt[7] = 'Ocean City Racquetball'
theImagesAlt[8] = 'Ocean City Health Club'
theImagesAlt[9] = 'Ocean City Racquetball'
theImagesAlt[10] = 'Ocean City Health Club'

// ======================================
// do not change anything below this line
// ======================================

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]+'">');
}

// ==============================================================
// 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]+'">');
}

//-->
