function launchMap(aLanguage, baseFlash)
{
	if (aLanguage != 'en' & aLanguage != 'mi'){
	 	aLanguage = 'en';
	}
	
	if(!FlashCanPlay())
	{
		OutputNoFlash();
		return;
	}
	var aSiteRoot = location.protocol + '//' + location.host;
	//var aSWF = 'nzers-' + aLanguage + '.swf';
	var aSWF = baseFlash + aLanguage + '.swf';
	var aDoc = '<div><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="729" height="278">';
	aDoc += '<param name="movie" value="/FlashResources/maorinewzealanders/subthemehero/'+ aSWF +'">';
	aDoc += '<param name="quality" value="high">';
	aDoc += '<param name="flashVars" value="siteRoot='+ aSiteRoot + '"/>';
	aDoc += '<embed src="/FlashResources/maorinewzealanders/subthemehero/'+ aSWF +'"type="application/x-shockwave-flash" width="729" height="278" flashvars="siteRoot='+ aSiteRoot + '"/>';
	aDoc += '</EMBED></OBJECT></div>';
	document.write(aDoc);
}
//
function FlashCanPlay()
{
	var MM_contentVersion = 6;
	var plugin = (navigator.mimeTypes && navigator.mimeTypes['application/x-shockwave-flash']) ? navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin : 0;
	var MM_FlashCanPlay = false;
	if ( plugin ) 
	{
			var words = navigator.plugins['Shockwave Flash'].description.split(" ");
			for (var i = 0; i < words.length; ++i)
			{
				if (isNaN(parseInt(words[i])))
				continue;
				var MM_PluginVersion = words[i]; 
			}
		MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
	}
	else 
	{
		for(var i=8; i>0; i--)
			{
			MM_FlashVersion = 0;
			try
				{
				var flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i);
				MM_FlashVersion = i;
				break;
				}
			catch(e)
				{}
			}
		MM_FlashCanPlay = MM_FlashVersion >= MM_contentVersion;
	}
	return MM_FlashCanPlay;
}
//
function OutputNoFlash()
{
	var	noflashTags = '<div id="hero-noflash"></div><div id="hero-type-en"><a href="http://www.macromedia.com"><img src="/ENZ/img/x.gif" border="0"></a></div><div id="hero-shado-top"></div>';
	document.write(noflashTags);
}

launchMap('mi', 'nzers-maori-')
