	// Detect the version of the browser you are using
	var BrowserDetect = {
		init: function () {
			this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
			this.version = this.searchVersion(navigator.userAgent)
				|| this.searchVersion(navigator.appVersion)
				|| "an unknown version";
			this.OS = this.searchString(this.dataOS) || "an unknown OS";
		},
		searchString: function (data) {
			for (var i=0;i<data.length;i++)	{
				var dataString = data[i].string;
				var dataProp = data[i].prop;
				this.versionSearchString = data[i].versionSearch || data[i].identity;
				if (dataString) {
					if (dataString.indexOf(data[i].subString) != -1)
						return data[i].identity;
				}
				else if (dataProp)
					return data[i].identity;
			}
		},
		searchVersion: function (dataString) {
			var index = dataString.indexOf(this.versionSearchString);
			if (index == -1) return;
			return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
		},
		dataBrowser: [
			{ 	string: navigator.userAgent,
				subString: "OmniWeb",
				versionSearch: "OmniWeb/",
				identity: "OmniWeb"
			},
			{
				string: navigator.vendor,
				subString: "Apple",
				identity: "Safari"
			},
			{
				prop: window.opera,
				identity: "Opera"
			},
			{
				string: navigator.vendor,
				subString: "iCab",
				identity: "iCab"
			},
			{
				string: navigator.vendor,
				subString: "KDE",
				identity: "Konqueror"
			},
			{
				string: navigator.userAgent,
				subString: "Firefox",
				identity: "Firefox"
			},
			{
				string: navigator.vendor,
				subString: "Camino",
				identity: "Camino"
			},
			{		// for newer Netscapes (6+)
				string: navigator.userAgent,
				subString: "Netscape",
				identity: "Netscape"
			},
			{
				string: navigator.userAgent,
				subString: "MSIE",
				identity: "Explorer",
				versionSearch: "MSIE"
			},
			{
				string: navigator.userAgent,
				subString: "Gecko",
				identity: "Mozilla",
				versionSearch: "rv"
			},
			{ 		// for older Netscapes (4-)
				string: navigator.userAgent,
				subString: "Mozilla",
				identity: "Netscape",
				versionSearch: "Mozilla"
			}
		],
		dataOS : [
			{
				string: navigator.platform,
				subString: "Win",
				identity: "Windows"
			},
			{
				string: navigator.platform,
				subString: "Mac",
				identity: "Mac"
			},
			{
				string: navigator.platform,
				subString: "Linux",
				identity: "Linux"
			}
		]
	
	};
	BrowserDetect.init();
	//alert(BrowserDetect.browser + ' ' + BrowserDetect.version + ' on ' + BrowserDetect.OS);
	
	
	// Methods for resizing the a div tag (containing flash) at runtime.
	// 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) {
		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;
		
		if (currentWidth < minW) {
			setswfWidthPixels(divid, minW);
		} else {
			setswfWidthPercent(divid, 100);
			//setswfWidthPixels(divid, currentWidth);
		}
		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;
		}
	}
	
	
	// Open a browswer window
	function openBrWindow(theURL,winName,features) {
	  	window.open(theURL,winName,features);
	}
	
	
	// 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="#000000" size="1">'
		+ ' 		<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">'
		+ ' 		  <tr>'
		+ ' 			<td height="15"></td>'
		+ ' 		  </tr>'
		+ ' 		  <tr>'
		+ ' 			<td><img src="images/noFlash_image.jpg" width="324" height="175" /></td>'
		+ ' 		  </tr>'
		+ ' 		  <tr>'
		+ ' 			<td height="10"></td>'
		+ ' 		  </tr>'
		+ ' 		  <tr>'
		+ ' 			<td><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif">The Arkansas Children&apos;ss Hospital Annual Report Website<br>requires a newer flash plugin.</font></td>'
		+ ' 		  </tr>'
		+ ' 		  <tr>'
		+ ' 			<td height="10">'
		+ ' 				'
		+ ' 				<br />'
		+ ' 				<br />'
		+ ' 		  </tr>'
		+ ' 		  <tr>'
		+ ' 			<td height="20"></td>'
		+ ' 		  </tr>'
		+ ' 		  <tr>'
		+ ' 		  <tr>'
		+ ' 			<td height="1" bgcolor="#ffffff"></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 [site name]. 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
		  }
	}