// Make sure toggleImage can't execute by default

rolloversloaded = 0;



function initRollovers() {

	// Step through each image in the document.images collection.

	// If an image's "name" begins with CWR, load its "on" counterpart

	// into the document so it can be accessed later in the toggleImage()

	// function.

	// block ns3.0 from using it



	if ((navigator.appName == "Netscape") && (navigator.appVersion.indexOf("3.0 ") == 0)) {

		// Netscape 3.0 had a memory leak.. it doesn't like this javascript.

	}

	else {

		icount = document.images.length;

		for (i = 0; i < icount; i++) {

			iname = document.images[i].name;

			if (iname.indexOf("CWR") == 0) {

				isrc = document.images[i].src;

				ilength = isrc.length;

				rname = iname.substring(3); 

				ep = isrc.lastIndexOf(".", ilength);

				uname = isrc.substring(0, ep - 4); 

				e = isrc.substring(ep);

				eval("on_" + rname + "= new Image(); on_" + rname + ".src=\"" + uname + "_on" + e + "\"");

				eval("off_" + rname + " = new Image(); off_" + rname + ".src=\"" + uname + "_off" + e +"\"");

			}

		}

		// Now that the images are loaded, allow toggleImage to execute

		rolloversloaded = 1;

	}

}



function toggleImage(iname, istat) {

	if ((document.images) && (rolloversloaded)) { 

		eval("document.images.CWR" + iname + ".src=" + istat + "_" + iname + ".src");

	}

}

