/********************************************************
*    Module: generic rollover scripts
*    Version: 1.1
*    Author: paolo@liquidvision.com
*
*    Description:
*        - preloadImages()
*        - swapImgs(imgName,imgSrc)
*        - changeHTML(id)
*
*    Usage:
*        - Call this JS file from whatever an image rollover function is required.
*        - Populate the IMG_NAMES Array with relevant images.
*        - Call the preloadImages() function ONLY from the homepage. 
*           Eliminates likelihood of incorrect pathing (i.e. broken images).
*        - changeHTML(id) given an id can be used to change the contents 
*        - of an HTML container.
*
*     Change log:
*           - 12-11-2004 - beta version 0.1
*           - 11-01-2005 - version 1.0
*                    - pathing logic removed to make
*                      more generic and reusable.
*           - 28-06-2005 - version 1.1
*                    - changeHTML(id) funciton added for greater rollover option
*                    - preloadImages debugs
*
********************************************************/
function preloadImages () {
	if (document.images) {
		// add images into this array
		IMG_NAMES = new Array ();

		rolloverImgs = new Array();

		for (i=0; i<IMG_NAMES.length; i++) {
			rolloverImgs[i] = new Image();
			rolloverImgs[i].src = IMG_NAMES[i];
		}
	}
}

function swapImgs(imgName,imgSrc) {
    if (document.images) {
		if (document[imgName]!=null) {
			document[imgName].src = imgSrc;
		} else {
			document.getElementById(imgName).src = imgSrc;
		}
    }
}

function changeHTML(id, html) {
	document.getElementById(id).innerHTML = html;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}