	
	//********************************************************
	//
	//	findObject() function
	//
	//	DESCRIPTION
	//	this function searches a parent container (such as a form
	//	or document) for an element and returns an object reference
	//	to that element.
	//
	//	INPUTS:
	//		strObjectName : String (Required)
	//			- the name of the object being sought
	//		objDoc : Object (Optional)
	//			- the name of the parent container being searched
	//
	//	OUTPUTS:
	//		Reference to the object
	//
	//********************************************************

	function findObject(strObjectName, objDoc)
		{

			var intQuestionMarkPosition;
			var i;
			var obj;


			// if no parent container is supplied, the default will be set to document level
			if (!objDoc)
				{
					objDoc = document;
				}


			// the following IF clauses evaluate several permutations of browser/syntax
			// to return the appropriate object reference
			if ((intQuestionMarkPosition = strObjectName.indexOf("?")) > 0 && parent.frames.length)
				{
					objDoc = parent.frames[strObjectName.substring(intQuestionMarkPosition + 1)].document;
					strObjectName = strObjectName.substring(0, intQuestionMarkPosition);
				}


			if (!(obj = objDoc[strObjectName]) && objDoc.all)
				{
					obj = objDoc.all[strObjectName];
				}


			for (i=0; !obj && i < objDoc.forms.length; i++)
				{
					obj = objDoc.forms[i][strObjectName];
				}


			for (i=0; !obj && objDoc.layers && i < objDoc.layers.length; i++)
				{
					obj = findObject(strObjectName, objDoc.layers[i].document);
				}


			if (!obj && objDoc.getElementById)
				{
					obj = objDoc.getElementById(strObjectName);
				}


			return obj;

		}

	
	//********************************************************
	//
	//	preloadImages() function
	//
	//	DESCRIPTION
	//	this function populates the selected images of a page
	//	en masse, rather than piecemeal
	//
	//	INPUTS:
	//		Dynamic list of arguments : String (Required)
	//
	//	OUTPUTS:
	//		None
	//
	//********************************************************

	function preloadImages()
		{

			var objDoc = document;
			var i;
			var j;
			var a = preloadImages.arguments;


			if(objDoc.images)
				{

					if(!objDoc.arrPreload)
						{
							objDoc.arrPreload = new Array();
						}

					j = objDoc.arrPreload.length;

					for(i=0; i < a.length; i++)
						{
							if (a[i].indexOf("#") != 0)
								{
									objDoc.arrPreload[j] = new Image;
									objDoc.arrPreload[j++].src = a[i];
								}
						}
				}
		}


	//********************************************************
	//
	//	restoreImage() function
	//
	//	DESCRIPTION
	//	this function returns a rollover image to its original source
	//
	//	INPUTS:
	//		None
	//
	//	OUTPUTS:
	//		None
	//
	//********************************************************

	function restoreImage()
		{

			var obj;
			var a = document.arrImage;

			obj = a[0];
			obj.src = obj.oSrc;

		}


	//********************************************************
	//
	//	swapImage() function
	//
	//	DESCRIPTION
	//	this function replaces an existing image with a new image
	//
	//	INPUTS:
	//		strOldImage : String (Required)
	//			- the name of the image being replaced
	//		strNewImage : String (Required)
	//			- the name of the new image
	//
	//	OUTPUTS:
	//		None
	//
	//********************************************************

	function swapImage(strOldImage, strNewImage)
		{

			var x = 0;
			var obj;


			document.arrImage = new Array;


			if ((obj = findObject(strOldImage)) != null)
				{
					document.arrImage[x++] = obj;
					if (!obj.oSrc)
						{
						 	obj.oSrc = obj.src;
						}
					obj.src = strNewImage;
				}
		}

		
		
	//flash detect
    var flashVersion = 0;
    function getFlashVersion() {
    	var agent = navigator.userAgent.toLowerCase(); 
    	
       // NS3 needs flashVersion to be a local variable
       if (agent.indexOf("mozilla/3") != -1 && agent.indexOf("msie") == -1) {
          flashVersion = 0;
       }
       
    	// NS3+, Opera3+, IE5+ Mac (support plugin array):  check for Flash plugin in plugin array
    	if (navigator.plugins != null && navigator.plugins.length > 0) {
    		var flashPlugin = navigator.plugins['Shockwave Flash'];
    		if (typeof flashPlugin == 'object') { 
    			if (flashPlugin.description.indexOf('20.') != -1) flashVersion = 20;
				else if (flashPlugin.description.indexOf('19.') != -1) flashVersion = 19;
				else if (flashPlugin.description.indexOf('18.') != -1) flashVersion = 18;
				else if (flashPlugin.description.indexOf('17.') != -1) flashVersion = 17;
				else if (flashPlugin.description.indexOf('16.') != -1) flashVersion = 16;
				else if (flashPlugin.description.indexOf('15.') != -1) flashVersion = 15;
				else if (flashPlugin.description.indexOf('14.') != -1) flashVersion = 14;
				else if (flashPlugin.description.indexOf('13.') != -1) flashVersion = 13;
				else if (flashPlugin.description.indexOf('12.') != -1) flashVersion = 12;
				else if (flashPlugin.description.indexOf('11.') != -1) flashVersion = 11;
				else if (flashPlugin.description.indexOf('10.') != -1) flashVersion = 10;
				else if (flashPlugin.description.indexOf('9.') != -1) flashVersion = 9;	
				else if (flashPlugin.description.indexOf('8.') != -1) flashVersion = 8;
				else if (flashPlugin.description.indexOf('7.') != -1) flashVersion = 7;
	  			else if (flashPlugin.description.indexOf('6.') != -1) flashVersion = 6;
	  			else if (flashPlugin.description.indexOf('5.') != -1) flashVersion = 5;
	  			else if (flashPlugin.description.indexOf('4.') != -1) flashVersion = 4;
	  			else if (flashPlugin.description.indexOf('3.') != -1) flashVersion = 3;
    		}
    	}
    
    	// IE4+ Win32:  attempt to create an ActiveX object using VBScript
    	else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1) {
    	  	document.write('<scr' + 'ipt language="VBScript"\> \n');
	  		document.write('on error resume next \n');
	  		document.write('dim obFlash \n');
	  		document.write('set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.20") \n');
	  		document.write('if IsObject(obFlash) then \n');
	  		document.write('flashVersion = 20 \n');											
			document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.19") end if \n');
	  		document.write('if flashVersion < 20 and IsObject(obFlash) then \n');
	  		document.write('flashVersion = 19 \n');											
			document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.18") end if \n');
	  		document.write('if flashVersion < 19 and IsObject(obFlash) then \n');
	  		document.write('flashVersion = 18 \n');											
			document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.17") end if \n');
	  		document.write('if flashVersion < 18 and IsObject(obFlash) then \n');
	  		document.write('flashVersion = 17 \n');											
			document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.16") end if \n');
	  		document.write('if flashVersion < 17 and IsObject(obFlash) then \n');
	  		document.write('flashVersion = 16 \n');											
			document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.15") end if \n');
	  		document.write('if flashVersion < 16 and IsObject(obFlash) then \n');
	  		document.write('flashVersion = 15 \n');											
			document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.14") end if \n');
	  		document.write('if flashVersion < 15 and IsObject(obFlash) then \n');
	  		document.write('flashVersion = 14 \n');											
			document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.13") end if \n');
	  		document.write('if flashVersion < 14 and IsObject(obFlash) then \n');
	  		document.write('flashVersion = 13 \n');											
			document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.12") end if \n');
	  		document.write('if flashVersion < 13 and IsObject(obFlash) then \n');
	  		document.write('flashVersion = 12 \n');											
			document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.11") end if \n');
	  		document.write('if flashVersion < 12 and IsObject(obFlash) then \n');
	  		document.write('flashVersion = 11 \n');											
			document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.10") end if \n');
	  		document.write('if flashVersion < 11 and IsObject(obFlash) then \n');
	  		document.write('flashVersion = 10 \n');												
			document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.9") end if \n');
	  		document.write('if flashVersion < 10 and IsObject(obFlash) then \n');
	  		document.write('flashVersion = 9 \n');												
			document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.8") end if \n');
	  		document.write('if flashVersion < 9 and IsObject(obFlash) then \n');
	  		document.write('flashVersion = 8 \n');		
			document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.7") end if \n');
	  		document.write('if flashVersion < 8 and IsObject(obFlash) then \n');
	  		document.write('flashVersion = 7 \n');		
	  		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.6") end if \n');
	  		document.write('if flashVersion < 7 and IsObject(obFlash) then \n');
	  		document.write('flashVersion = 6 \n');
	  		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.5") end if \n');
	  		document.write('if flashVersion < 6 and IsObject(obFlash) then \n');
	  		document.write('flashVersion = 5 \n');
	  		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.4") end if \n');
	  		document.write('if flashVersion < 5 and IsObject(obFlash) then \n');
	  		document.write('flashVersion = 4 \n');
	  		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.3") end if \n');
	  		document.write('if flashVersion < 4 and IsObject(obFlash) then \n');
	  		document.write('flashVersion = 3 \n');
	  		document.write('end if');
	  		document.write('</scr' + 'ipt\> \n');
      }
    		
    	// WebTV 2.5 supports flash 3
    	else if (agent.indexOf("webtv/2.5") != -1) flashVersion = 3;
    
    	// older WebTV supports flash 2
    	else if (agent.indexOf("webtv") != -1) flashVersion = 2;
    
    	// Can't detect in all other cases
    	else {
    		flashVersion = flashVersion_DONTKNOW;
    	}
    
    	return flashVersion;
    }
    
    flashVersion_DONTKNOW = -1;

