	
	//--------------------------------------------
	// METRICS FUNCTIONS
	//--------------------------------------------
	function metricsFunction (value1, value2) {
		//alert("in sendMetrics: " + value1 + ", " + value2);	
	}
	
	//--------------------------------------------
	// Open a browswer window
	//--------------------------------------------
	function openBrWindow(theURL,winName,features) {
	  	window.open(theURL,winName,features);
	}
	
	//--------------------------------------------
	// Resize DIV Tags
	//--------------------------------------------
	// BY PIXEL
	function setswfWidthPixels(divid, newW){
		document.getElementById(divid).style.width = newW+"px";
		document.getElementById(divid).width = newW+"px";
	}
	function setswfHeightPixels(divid, newH, newTitle){
		document.getElementById(divid).style.height = newH+"px";
		document.getElementById(divid).height = newH+"px";
	}
	function setFlashSizePixels(divid, newW, newH){
		setswfWidth(divid, newW);
		setswfHeight(divid, newH);
	}
	// BY PERCENT
	function setswfWidthPercent(divid, newW){
		document.getElementById(divid).style.width = newW+"%";
		document.getElementById(divid).width = newW+"%";
	}
	function setswfHeightPercent(divid, newH, newTitle){
		document.getElementById(divid).style.height = newH+"%";
		document.getElementById(divid).height = newH+"%";
	}
	function setFlashSizePercent(divid, newW, newH){
		setswfWidth(divid, newW);
		setswfHeight(divid, newH);
	}
	function checkMinFlashSize(divid, minW, minH) {
		// Browser Current Width / Height
		if (self.innerWidth) {
			var currentWidth = self.innerWidth;
			var currentHeight = self.innerHeight;
		} else if (document.documentElement && document.documentElement.clientWidth) {
			var currentWidth = document.documentElement.clientWidth;
			var currentHeight = document.documentElement.clientHeight;
		} else if (document.body) {
			var currentWidth = document.body.clientWidth;
			var currentHeight = document.body.clientHeight;
		}
		else return;
		
		// Width
		if (currentWidth < minW) {
			setswfWidthPixels(divid, minW);
		} else {
			setswfWidthPercent(divid, 100);
			//setswfWidthPixels(divid, currentWidth);
		}
		
		// Height
		if (currentHeight  < minH) {
			setswfHeightPixels(divid, minH);
		} else {
			setswfHeightPercent(divid, 100);
			//setswfHeightPixels(divid, currentHeight);
		}
	}	
	
	//--------------------------------------------
	// Set the Browser's hash - works for IE only
	//--------------------------------------------
	function setHash(newHash) {
		var ua = navigator.userAgent.toLowerCase();
		var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
		if (newHash != "" && isInternetExplorer) {
			parent.document.location.hash = newHash;
		}
	}
	
	//--------------------------------------------
	// FLASH DETECTION FUNCTIONALLITY
	//--------------------------------------------
	// Set the global version of required Flash and Javascript version for the site
	// -----------------------------------------------------------------------------
	// Major version of Flash required
	var requiredMajorVersion = 8;
	// Minor version of Flash required
	var requiredMinorVersion = 0;
	// Revision of Flash required
	var requiredRevision = 0;
	// the version of javascript supported
	var jsVersion = 1.0;
	// -----------------------------------------------------------------------------
	
	// Embed VB script for IE on Windows
	var vb= '';	
	vb += '<SCR' + 'IPT LANGUAGE=VBScript\> \n';
	vb += 'Function VBGetSwfVer(i) \n'
	vb += 'on error resume next \n'
	vb += 'Dim swControl, swVersion \n'
	vb += 'swVersion = 0 \n'
	vb += 'set swControl = CreateObject("ShockwaveFlash.ShockwaveFlash." + CStr(i)) \n'
	vb += 'if (IsObject(swControl)) then \n'
	vb += 'swVersion = swControl.GetVariable("$version") \n'
	vb += 'end if \n'
	vb += 'VBGetSwfVer = swVersion \n'
	vb += 'End Function \n'
	vb += '</SCR' + 'IPT\> \n';
	document.write(vb)
	
	<!-- // Detect Client Browser type
	var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
	var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
	var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
	jsVersion = 1.1;
	// JavaScript helper required to detect Flash Player PlugIn version information
	function JSGetSwfVer(i){
		// NS/Opera version >= 3 check for Flash plugin in plugin array
		if (navigator.plugins != null && navigator.plugins.length > 0) {
			if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
				var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
				var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
				descArray = flashDescription.split(" ");
				tempArrayMajor = descArray[2].split(".");
				versionMajor = tempArrayMajor[0];
				versionMinor = tempArrayMajor[1];
				if ( descArray[3] != "" ) {
					tempArrayMinor = descArray[3].split("r");
				} else {
					tempArrayMinor = descArray[4].split("r");
				}
				versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;
				flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
			} else {
				flashVer = -1;
			}
		}
		// MSN/WebTV 2.6 supports Flash 4
		else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
		// WebTV 2.5 supports Flash 3
		else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
		// older WebTV supports Flash 2
		else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
		// Can't detect in all other cases
		else {
			
			flashVer = -1;
		}
		return flashVer;
	} 
	// If called with no parameters this function returns a floating point value 
	// which should be the version of the Flash Player or 0.0 
	// ex: Flash Player 7r14 returns 7.14
	// If called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
	function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision) {
		reqVer = parseFloat(reqMajorVer + "." + reqRevision);
		// loop backwards through the versions until we find the newest version	
		for (i=25;i>0;i--) {	
			if (isIE && isWin && !isOpera) {
				versionStr = VBGetSwfVer(i);
			} else {
				versionStr = JSGetSwfVer(i);		
			}
			if (versionStr == -1 ) { 
				return false;
			} else if (versionStr != 0) {
				if(isIE && isWin && !isOpera) {
					tempArray         = versionStr.split(" ");
					tempString        = tempArray[1];
					versionArray      = tempString .split(",");				
				} else {
					versionArray      = versionStr.split(".");
				}
				versionMajor      = versionArray[0];
				versionMinor      = versionArray[1];
				versionRevision   = versionArray[2];
				
				versionString     = versionMajor + "." + versionRevision;   // 7.0r24 == 7.24
				versionNum        = parseFloat(versionString);
				// is the major.revision >= requested major.revision AND the minor version >= requested minor
				if ( (versionMajor > reqMajorVer) && (versionNum >= reqVer) ) {
					return true;
				} else {
					return ((versionNum >= reqVer && versionMinor >= reqMinorVer) ? true : false );	
				}
			}
		}	
		return (reqVer ? false : 0.0);
	}
	
	//--------------------------------------------
	// Place SWF File on the page
	//--------------------------------------------
	//  - Set the width, height, bg color, swf file, and object name (for javascript use)
	//	- You can also set alternate content that will display instead of the swf (if a proper version of Flash is not detected)
	//  - VERSION INFO SHOULD COME FROM detect_flash.js
	function placeSWF (swfWidth, swfHeight, swfFile, swfBgColor) {
		var swfId			= swfFile; // Change this later if you wish to designate a different name to the swf
		
		// Alternate Content	
		var alternateContent = '<font face="Verdana, Arial, Helvetica, sans-serif" color="#404040" size="1">'
		+ ' 		<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">'
		+ ' 		  <tr>'
		+ ' 			<td height="15"></td>'
		+ ' 		  </tr>'
		+ ' 		  <tr>'
		+ ' 			<td><img src="images/html_header.jpg" width="680" height="170" /></td>'
		+ ' 		  </tr>'
		+ ' 		  <tr>'
		+ ' 			<td height="10"></td>'
		+ ' 		  </tr>'
		+ ' 		  <tr>'
		+ ' 			<td><font color="#404040" size="1" face="Verdana, Arial, Helvetica, sans-serif">Alternate content for site goes here: </font></td>'
		+ ' 		  </tr>'
		+ ' 		  <tr>'
		+ ' 			<td height="10">'
		+ ' 				'
		+ ' 				<br />'
		+ ' 				<br />'
		+ ' 		  </tr>'
		+ ' 		  <tr>'
		+ ' 			<td height="20"></td>'
		+ ' 		  </tr>'
		+ ' 		  <tr>'
		+ ' 		  <tr>'
		+ ' 			<td height="1" bgcolor="#666666"></td>'
		+ ' 		  </tr>'
		+ ' 		  <tr>'
		+ ' 		  <tr>'
		+ ' 			<td height="20"></td>'
		+ ' 		  </tr>'
		+ ' 		  <tr>'
		+ ' 			<td height="10"><i>* We have detected that you may not have everything you need to view Babos Great Adventure. Please see our site requirements below.</i></td>'
		+ ' 		  </tr>'
		+ ' 		  <tr>'
		+ ' 			<td height="10"></td>'
		+ ' 		  </tr>'
		+ ' 		  <tr>'
		+ ' 			<td><b>Site requirements for this site</b></td>'
		+ ' 		  </tr>'
		+ ' 		  <tr>'
		+ ' 			<td height="10"></td>'
		+ ' 		  </tr>'
		+ ' 		  <tr><td>'
		+ ' 			<table width="600" border="0" cellspacing="0" cellpadding="0">'
		+ ' 			  <tr>'
		+ ' 				<td width="40" align="right" valign="top">*&nbsp;</td>'
		+ ' 				<td><b>Javascript</b><br />JavaScript is used for key functionality on [site name]. Because of this Javascript 1.2 or later must be enabled. Consult your browser&apos;s Help section for information on how to change this setting or upgrade your browser to a version that supports JavaScript 1.2 or higher.</td>'
		+ ' 			  </tr>'
		+ ' 			  <tr>'
		+ ' 				<td width="40" height="20"></td>'
		+ ' 				<td height="20"></td>'
		+ ' 			  </tr>'
		+ ' 			  <tr>'
		+ ' 				<td width="40" align="right" valign="top">*&nbsp;</td>'
		+ ' 				<td><b>Flash</b><br />We make use of features found in Macromedia Flash Player version '+requiredMajorVersion+','+requiredMinorVersion+','+requiredRevision+' and higher. You will not be able to see the site without this player.<br /><a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&promoid=BIOW">Download it now for free:</a></td>'
		+ ' 			  </tr>'
		+ ' 			  <tr>'
		+ ' 				<td width="40" height="20"></td>'
		+ ' 				<td height="20"></td>'
		+ ' 			  </tr>'
		+ ' 			  <tr>'
		+ ' 				<td width="40" align="right" valign="top"></td>'
		+ ' 				<td><a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&promoid=BIOW"><img src="images/get_flash_player.gif" alt="flashLogo" width="88" height="31" border="0"></a></td>'
		+ ' 			  </tr>'
		+ ' 			</table>'
		+ ' 		  </td></tr>'
		+ ' 		</table>'
		+ ' 	</font>'
		
		// Detect Flash and display it - or alternate content (defined above)
		var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
		if(hasRightVersion) {
			// if we've detected an acceptable version
			var oeTags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
			+ 'width="'+swfWidth+'" height="'+swfHeight+'" name="'+swfId+'" id="'+swfId+'" '
			+ 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
			+ '<param name="movie" value="'+swfFile+'" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param name="salign" value="t" /><param name="bgcolor" value="'+swfBgColor+'" />'
			+ '<embed src="'+swfFile+'" quality="high" scale="noscale" salign="t" bgcolor="'+swfBgColor+'" '
			+ 'width="'+swfWidth+'" height="'+swfHeight+'" name="'+swfId+'" align="top" swLiveConnect="true"'
			+ 'play="true"'
			+ 'loop="false"'
			+ 'quality="high"'
			+ 'allowScriptAccess="sameDomain"'
			+ 'type="application/x-shockwave-flash"'
			+ 'pluginspage="http://www.macromedia.com/go/getflashplayer">'
			+ '<\/embed>'
			+ '<\/object>';
			document.write(oeTags); // write the flash	
		  } else {  // flash is too old or we can't detect the plugin
			document.write(alternateContent);  // insert non-flash content
		  }
	}
