<!-- 

//** multiple onload handler
//*****************************************************************************
//** If window.onload has not already been assigned a function, the function passed to addLoadEvent is simply assigned to window.onload.
//** If window.onload has already been set, a brand new function is created which first calls the original onload handler, then calls the new handler afterwards
function addLoadEvent(func){
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			if (oldonload) {
				oldonload();
			}
			func();
		}
	}
}

//** example #1
//addLoadEvent(nameOfSomeFunctionToRunOnPageLoad);

//** example #2
//addLoadEvent(function() {
//  /* more code to run on page load */
//});

//*****************************************************************************




//** rollovers
//*****************************************************************************
function imgRollover(strImages, lngItem, strState) {
	var aStrImages = strImages.split(",");
	if (document.images) {
		for (i=0; i<aStrImages.length; i++){
			strImageSrc = new String(document[aStrImages[i] + lngItem].src)
			
			var aStrImageComponents = strImageSrc.split(".")
			var strExtension = aStrImageComponents[aStrImageComponents.length - 1]
			
			
			whichChar = strImageSrc.charAt(strImageSrc.length - 1)
			while (whichChar != '_' & strImageSrc.length > 0){
				strImageSrc = strImageSrc.slice(0, [strImageSrc.length - 1])
				whichChar = strImageSrc.charAt(strImageSrc.length - 1)					
			}		
			if (strImageSrc.length > 0){
				document[aStrImages[i] + lngItem].src = (strImageSrc + strState + "." + strExtension);
			}
		}
	}
}
//*****************************************************************************



//** jQuery global document ready
//*****************************************************************************
$(document).ready(function() {
	// set up info box controls
	$('a.infoBoxToggle').click(function() {$('#infoBox' + this.id).slideToggle(400); return false;});
});
//*****************************************************************************



//** jQuery transitions for tables
//*****************************************************************************
function tableItemTransition(tableDetails) {
	tableDetails.currentItem = (tableDetails.oldItem + 1) % tableDetails.itemCount;	
	$("#" + tableDetails.tableName + " div.tableItem:eq(" + tableDetails.oldItem + ")").animate({'top': -(tableDetails.height + tableDetails.padding)}, "slow", tableItemReset(tableDetails, tableDetails.currentItem));
	$("#" + tableDetails.tableName + " div.tableItem:eq(" + tableDetails.currentItem + ")").animate({'top': tableDetails.padding}, "slow");
	tableDetails.oldItem = tableDetails.currentItem;
}


function tableItemReset(tableDetails, itemIndex) {
	$("#" + tableDetails.tableName + " div.tableItem:eq(" + itemIndex + ")").css('top', (tableDetails.height + (tableDetails.height * 2)) + "px");
}
//*****************************************************************************	
	
// -->
