

function hasFlash()
{
	if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] ) 
		return true;
		
	// ie crap
	if ((navigator.userAgent.indexOf('MSIE') != -1) && (navigator.userAgent.indexOf('Win') != -1))
	{
		var flash;
		for(var i=7; i>0; i--)
		{			
			try
			{
				flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i);				
				return true;
			}
			catch(e){;}
		}
	}
	return false;
}

function flashSniff(width,height,alt,flashLocation,imageLocation,showImage)
{

	if(hasFlash())
	{
	   // Use Flash player
	   // Although these alt tags do not apparently seem to be supported with the plug-in,
	   // they are included on the chance they are supported in an upgrade
	  document.write ('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ' +
			' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" ' +
			' width="' + width + '" height="' + height + '" title="' + alt + '">');
	
	  document.write ('<param name="movie" value="' + flashLocation+ '" />');
      document.write ('<param name="wmode" value="opaque" />');
	  document.write ('<param name="quality" value="high" />');
      document.write ('<embed wmode="opaque" src="' + flashLocation + '" ' +
			' quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" ' +
			'type="application/x-shockwave-flash" width="' + width + '" height="' + height + '"></embed>');
	  document.write ('</object>');
	   
	   
	} else if (showImage) {
	   
	   // Netscape 2 will display the IMG tag below so don't write an extra one
	   // You will need to modify the SRC param
	   document.write('<img src="' + imageLocation + '" ' +
	   ' alt="' + alt + '" ' +
	   ' width="' + width + '" height="' + height + '" border="0"> ');

	}
}



