// Map flash function
//
// requires detectflash.js to be included before use
var SwfCount = 0;
function insertSwf( Path, Width, Height, FlashVars, BgColor, Alt)
{
	SwfCount++;
	if( typeof(MM_FlashCanPlay) == "undefined" || MM_FlashCanPlay == false )
	{
		document.write(Alt);
		return;
	}

	var FlashHtml = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + Width + '" height="' + Height + '" id="map_' + SwfCount + '" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="' + Path + '" />';
	if( typeof(FlashVars) == "string" && FlashVars != '')
		FlashHtml += '<param name="FlashVars" value="' + FlashVars + '" />';
	FlashHtml += '<param name="menu" value="false" /><param name="wmode" value="window" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param name="salign" value="lt" /><param name="bgcolor" value="' + BgColor + '" />';
	FlashHtml += '<embed src="' + Path + '" '
		if( typeof(FlashVars) == "string" && FlashVars != '')
			FlashHtml += 'FlashVars="' + FlashVars + '" ';
	FlashHtml += 'menu="false" wmode="window" quality="high" scale="noscale" salign="lt" bgcolor="' + BgColor + '" width="' + Width + '" height="' + Height + '" name="map_' + SwfCount + '" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	FlashHtml += '</object>';
	//alert(FlashHtml);
	document.write(FlashHtml);
}
function getSwf( Path, Width, Height, FlashVars, BgColor, Alt)
{
	SwfCount++;
	if( typeof(MM_FlashCanPlay) == "undefined" || MM_FlashCanPlay == false )
	{
		document.write(Alt);
		return;
	}
	
	var FlashHtml = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + Width + '" height="' + Height + '" id="map_' + SwfCount + '" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="' + Path + '" />';
	if( typeof(FlashVars) == "string" && FlashVars != '')
		FlashHtml += '<param name="FlashVars" value="' + FlashVars + '" />';
	FlashHtml += '<param name="menu" value="false" /><param name="wmode" value="window" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param name="salign" value="lt" /><param name="bgcolor" value="' + BgColor + '" />';
	FlashHtml += '<embed src="' + Path + '" '
		if( typeof(FlashVars) == "string" && FlashVars != '')
			FlashHtml += 'FlashVars="' + FlashVars + '" ';
	FlashHtml += 'menu="false" wmode="window" quality="high" scale="noscale" salign="lt" bgcolor="' + BgColor + '" width="' + Width + '" height="' + Height + '" name="map_' + SwfCount + '" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	FlashHtml += '</object>';
	//alert(FlashHtml);
	return (FlashHtml);
}
function insertIFrameMap( Path, Width, Height, FlashVars, BgColor, Alt, FrameWidth, FrameHeight)
{
	document.write( '<iframe width="'+FrameWidth+'" height="'+FrameHeight+'" id="ifra" scrolling="yes" style="margin:0;padding:0;" ></iframe>' );
	var MapSrc = getSwf( Path, Width, Height, FlashVars, BgColor, Alt);
	var ifra = document.getElementById('ifra');
	ifra.contentWindow.document.write(MapSrc);
	ifra.contentWindow.document.close();
	ifra.contentWindow.document.body.style.padding = 0;
	ifra.contentWindow.document.body.style.margin = 0;
}
function insertSwf2( Path, Width, Height, FlashVars, BgColor, Alt)
{
	SwfCount++;
	if( typeof(MM_FlashCanPlay) == "undefined" || MM_FlashCanPlay == false )
	{
		document.write(Alt);
		return;
	}

	var FlashHtml = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + Width + '" height="' + Height + '" id="map_' + SwfCount + '" align="middle"><param name="allowScriptAccess" value="www.property-krakow.com" /><param name="movie" value="' + Path + '" />';
	if( typeof(FlashVars) == "string" && FlashVars != '')
		FlashHtml += '<param name="FlashVars" value="' + FlashVars + '" />';
	FlashHtml += '<param name="menu" value="false" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param name="salign" value="lt" /><param name="bgcolor" value="' + BgColor + '" />';
	FlashHtml += '<embed src="' + Path + '" '
		if( typeof(FlashVars) == "string" && FlashVars != '')
			FlashHtml += 'FlashVars="' + FlashVars + '" ';
	FlashHtml += 'menu="false" quality="high" scale="noscale" salign="lt" bgcolor="' + BgColor + '" width="' + Width + '" height="' + Height + '" name="map_' + SwfCount + '" align="middle" allowScriptAccess="www.property-krakow.com" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	FlashHtml += '</object>';
	//alert(FlashHtml);
	document.write(FlashHtml);
}