/*
 Usage: Simply include this .js file in your header file and as you can see below,
 the preLoadImages function will simply run so long as browser check at top of
 this file does set 'version' variable to 'n4' value (which will be the case in
 most/all of the current modern browsers
*/

/* this set of code simply does a browser version check */
if (document.images) {
	version = "n4";  
} else if (navigator.userAgent.indexOf("Mozilla/2.0") != -1) {
	version = "n3";
} else {
	version = "n2";
}

/* config of the JavaScript function */
function preLoadImages() {
	var t = '<layer top="-100" left="0" visibility="hide"><div style="position:absolute; top:-100px; left:0px; visibility:hidden">';
	for(i=0; i < arguments.length; i++)	t += '<img src="/images/' + arguments[i] + '" height="10" width="10">';
	t += '</div></layer>';
	document.write(t);
}

/* if browser version allows it, the function is run */
if (version == "n4") {
	/*
	 EDIT HERE: Type in below the specific image names you want to pre-load
	 "off" versions of each nav button shouldn't have to be pre-loaded, only because home page does that by default
	*/
	preLoadImages('btn_home_on.gif','btn_ourarea_on.gif','btn_places_on.gif', 'btn_things_on.gif', 'btn_events_on.gif', 'btn_heritageculture_on.gif', 'btn_vacationideas_on.gif');
	/* This code could be moved to a .CFM template so it could be dynamically generated from CMS content */
}
