var enable = true;
var flashfile = "/flash/map.swf";
var width = 246;
var height = 144;
var background = "#ffffff";
var alternative = "<img alt=\"\" src=\"/images/map.png\" width=\"" + width + "\" height=\"128\" />";
var minFlashVer	= 6;
var wmode = "window"; // window | opaque | transparent

/* cut here */
function trace(str) {
	document.write(str);
}
var plugin = 0;
if(navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {
	if (navigator.plugins && navigator.plugins["Shockwave Flash"]) pos = navigator.plugins["Shockwave Flash"].description.indexOf("Shockwave Flash");
	pos += 16;
	var swver = navigator.plugins["Shockwave Flash"].description.substr(pos, 1);
	if (swver >= minFlashVer);
	plugin = 1;
} else if(navigator.userAgent && navigator.userAgent.indexOf("MSIE") >= 0 && (navigator.userAgent.indexOf("Windows") >= 0)) {
	trace('<script language="vbscript"> \n');
	trace('on error resume next \n');
	trace('if ( minFlashVer = 3 ) then plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3")))\n');
	trace('if (( minFlashVer <= 4) and (plugin <= 0 )) then plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4")))\n');
	trace('if (( minFlashVer <= 5) and (plugin <= 0 )) then plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")))\n');
	trace('if (( minFlashVer <= 6) and (plugin <= 0 )) then plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6")))\n');
	trace("</scr"+"ipt> \n");
}
if(enable && plugin) {
	trace('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + minFlashVer + ',0,0,0" id="movie" width="' + width + '" height="' + height + '">');
	trace('<param name="movie" value="' + flashfile + '" /><param name="quality" value="high" /><param name="bgcolor" value="' + background + '" /><param name="wmode" value="' + wmode + '" />');
	trace('<embed src="' + flashfile + '" bgcolor="' + background + '" quality="high" wmode="' + wmode + '" swLiveConnect="false" width="' + width + '" height="' + height + '"');
	trace('type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');
	trace('</embed>');
	trace('</object>');
} else if (!(navigator.appName && navigator.appName.indexOf("Netscape") >= 0 && navigator.appVersion.indexOf("2.") >= 0)) {
	trace(alternative);
}
