// * * Flashcheck

var isMac		= (navigator.appVersion.indexOf( "Mac" ) != -1);
var isMSIE		= (navigator.appName == "Microsoft Internet Explorer");
var isWin32		= ((navigator.appVersion.indexOf( "3.1" ) == -1) && (navigator.appVersion.indexOf( "Windows" ) != -1));
var hasPlugins	= (navigator.plugins != null);
var flashPlugin	= (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0);
var flashState	= false;

// * * Explorer for Windows with ActiveX Flash
if( isMSIE && isWin32 && flashActiveX )
	flashState = true;

// * * Netscape or other browser with Netscape Plug
if( !isMSIE && flashPlugin )
	flashState = true;

// * * Explorer for Mac, hope thay have it 8-(
if( isMac && isMSIE )
	flashState = true;

function hasFlashPlugin( ) {
	return flashState;
}

function printFlash(flashmovie, image_name, m_width, m_height) {
        if( !hasFlashPlugin( ) ) {
                img_data = "<img src=\"flash/"+image_name+"\" width=\""+m_width+"\" height=\""+m_height+"\" border=0 usemap=\"#Map\">";
                document.write(img_data);
	} else {
		flash_data = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="'+m_width+'" HEIGHT="'+m_height+'">';
		flash_data += '<PARAM NAME=movie VALUE="flash/'+flashmovie+'">';
		flash_data += '<PARAM NAME=wmode VALUE=transparent>';
		flash_data += '<EMBED src="flash/'+flashmovie+'" quality=high WIDTH='+m_width+' HEIGHT='+m_height+' ALIGN=top TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></object>';
		document.write(flash_data);
	}
}
