// START OF IMAGE HANDLING FUNCTIONS

if (document.images) {
	// Set up the object so that we can create the array to hold the preloaded images.
	// We can now call preloadRollovers more than once.
	if (typeof(document.preload) == 'undefined') document.preload = new Object();
	document.preload.loadedImages = new Array();	
	}
	

function preloadRollovers() {
// Usage: preloadRollovers('location','filetype','image 1 URL', 'image 2 URL', 'image 3 URL', ...);
  if (document.images) {

	var argLength = preloadRollovers.arguments.length;

	image_path = preloadRollovers.arguments[0]; // directory to source images from
	image_type = preloadRollovers.arguments[1]; // type of images i.e. jpg

	for(arg=2;arg<argLength;arg++) {

		// define the _on.src image

		image_name = preloadRollovers.arguments[arg]+"_on";
		load_image = image_path+image_name+image_type;

     	document.preload.loadedImages[image_name] = new Image();
     	document.preload.loadedImages[image_name].src = load_image;

		// define the _off.src image

		image_name = preloadRollovers.arguments[arg]+"_off";
		load_image = image_path+image_name+image_type;

   		document.preload.loadedImages[image_name] = new Image();
   		document.preload.loadedImages[image_name].src = load_image;
    	}
  }
}


function mson() { 
	if (document.images) {
	argLength = mson.arguments.length;
	for(arg=0;arg<argLength;arg++) 
		{
		imgName = mson.arguments[arg];
		img_on = imgName + "_on";
		document[imgName].src = document.preload.loadedImages[img_on].src;
    	}
	}
}


function msoff() { 
	if (document.images) {
	argLength = msoff.arguments.length;
	for(arg=0;arg<argLength;arg++) 
		{
		imgName = msoff.arguments[arg];
		img_off = imgName + "_off";
		document[imgName].src  = document.preload.loadedImages[img_off].src;
		}
	}
}
// END OF IMAGE HANDLING FUNCTIONS

// POPUP WINDOW - START

	function funOpenWindow(page,name,width,height,scrollbars) {
		
		// Locate centre of screen
		var top=(screen.height-height)/2;
		var left=(screen.width-width)/2;
		
		// Popup window specifications and set focus
		output = window.open(page,name,"top=" + top + ",left=" + left + ",width=" + width + ",height=" + height + ",toolbar=no,location=no,directories=no,status=no,scrollbars=" + scrollbars + ",resizable=no");
		output.focus();
	}

// POPUP WINDOW - END

	