var okInitFlash=false;
function WriteMainFlashMap(mapUrlFin, div){
	//document.write(mapUrlFin);
	
	var hasProductInstall = DetectFlashVer(6, 0, 65);
	//alert(hasProductInstall);
	//alert ('ok');
	var hasRequestedVersion = DetectFlashVer(9, 0, 28);
	if (hasRequestedVersion) {
		okInitFlash=true;
		if(div==undefined){
		document.write(mapUrlFin);
		}else{
			document.getElementById(div).innerHTML=mapUrlFin;
		}
	}else{
	
	//"width:800px,height:600px,scrollbars=yes,resize
		//trop vielle version de flash 
		var   alternateContent = '<div style="text-align:center;color:#111;background:#fff;width:580px;padding:100px 10px;margin:auto;">'
 //+'<h3 style="color:#cc0000;">Installation de Adobe Flash Player</h3>'
 +'<p><img src=\'/dynmap/backoffice/images/logo_dynmap.png\' width=\'100px\'> utilise la technologie <b>Flash</b> pour la diffusion de ses cartes</p>'
 +'<p>Vous ne disposez pas du plugin Adobe Flash Player  ©.(Version minimum 9.0.28)</p>'
 +'<p>Pour télécharger et installer la version la plus récente dès maintenant, suivez le lien  ci-dessous.</p>'
 +'<p><script>function openTel(){window.open("http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&Lang=French","");}</script><img alt="Télécharger" onclick="openTel();" style="cursor:pointer;" src="/dynmap/images/get_flash_player.gif" border=0></p>'
 +'<p style="clear:both;height:55px;vertical-align:bottom;"><b>Une fois le plugin installé, rafraichissez la page contenant la carte (touche F5)</b></p>'
 
+'</div>';
		if(div==undefined){
		 document.write(alternateContent); 
		}else{
			document.getElementById(div).innerHTML=alternateContent;
		}
	}
}

