/**************************************************************
	FILE:			Image.js

	DESCRIPTION:	This file contains javascript to preload
					images and control image rollovers
	
***************************************************************/


/**
 * changeImage()
 *
 * This function changes the source of the object
 * specified to the image specified
 *
 * VERSIONS:
 *	12.13.2001 by fred.peck
 *		Wrote original function.
 *
 * VARIABLES:
 *	imageName:	The name of the image object in the
 *				DOM
 *	newSource:	Path to the new source for the image
 */
function changeImage(imageName, imageSource)
{
	document.images[imageName].src = imageSource;
}


 
function checkFlash() 
{
        isFlash = false;
        daOSType = "X";
        daBrowser = "X";
        if (navigator.userAgent.indexOf("Win") != -1) { daOSType = "Win"; }
        if (navigator.appName.indexOf("Microsoft") != -1) { daBrowser = "IE"; }
        if (daBrowser == "IE" && daOSType == "Win") {
               document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
               document.write('on error resume next \n');
               document.write('isFlash = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');
               document.write('isFlash = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n');
               document.write('</SCR' + 'IPT\> \n');
        } else {
               if (navigator.plugins){
                       if (navigator.plugins["Shockwave Flash"]){
                               var flashDescription = navigator.plugins["Shockwave Flash"].description;
                              var flashVersion = parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1));
                               if (flashVersion == 4) { isFlash = true; }
                               if (flashVersion == 5) { isFlash = true; }
                       }
               }
        }
        if (isFlash == true) { doFlash = "yes" }
}
