<!--
// ---------------------------------------------------------------------------
// utils.js: js utilites for Juniper's flash-wrapper package
// ---------------------------------------------------------------------------
// Part of the Juniper website rendering framework, 
// http://immortalcookie.com/juniper
// Copyright (C) 2006 Eric Miller 
// eric@immortalcookie.com
//
// ---------------------------------------------------------------------------
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
//version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
//
// Lesser GPL license text:
// http://www.gnu.org/licenses/lgpl.txt
//
// The Creative Commons GNU-LGPL Summary:
// http://creativecommons.org/licenses/LGPL/2.1/
// ---------------------------------------------------------------------------
function userHasFlash()
{
	var hasFlash = false;
	var contentVersion = 6;
	var plugin = ( 	navigator.mimeTypes && 
					navigator.mimeTypes["application/x-shockwave-flash"] ) ? 
					navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
	if ( plugin ) 
	{
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
		var pluginVersion;
		for( var i = 0; i < words.length; ++i )
		{
			if( isNaN( parseInt( words[ i ] ) ) )
				continue;
			pluginVersion = words[ i ]; 
		}
	
		hasFlash = pluginVersion >= contentVersion;
	}
	else if ( navigator.userAgent && navigator.userAgent.indexOf( "MSIE" ) >= 0 && 
			( navigator.appVersion.indexOf( "Win" ) != -1 ) ) 
	{
		// temp: 
		// this doesn't seem to be reporting flash presence correctly on msie.
		// for now, just return true.
		hasFlash = true;
		/*
		document.write( '<SCR' + 'IPT LANGUAGE=VBScript\> \n' ); //FS hide this from IE4.5 Mac by splitting the tag
		document.write( 'on error resume next \n' );
		document.write( 'hasFlash = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & contentVersion)))\n' );
		document.write( '</SCR' + 'IPT\> \n' );
		*/
	}
	
	return hasFlash;
}

// very silly.
function foilEolas( iWriteMe )
{
	document.write( iWriteMe );
}

-->