///////////////////////////////////////
// Communication Flash -> Javascript //
///////////////////////////////////////

Ie4=(document.all)?true:false;
Ns4=(document.layers)?true:false;
Ns6=document.getElementById&&!document.all;

var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Pour Mozilla / Firefox
function menuNavigation_DoFSCommand(command, args)                {
  var menuNavigationObj = InternetExplorer ? menuNavigation : document.menuNavigation;
  executeJSfromFlash (args);
}
/*
// Pour Internet Explorer : on le bloque ici, seul Mozilla(Firefox) à un pb de couche
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows")!= -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
  document.write('<SCR'+'IPT LANGUAGE=VBScript\> \n');
  document.write('on error resume next \n');
  document.write('Sub menuNavigation_FSCommand(ByVal command, ByVal args)\n');
  document.write(' call menuNavigation_DoFSCommand(command, args)\n');
  document.write('end sub\n');
  document.write('</SCR'+'IPT\> \n');
}
*/

function executeJSfromFlash(etat) {
	if(etat=='open') {
		if(document.getElementById('menuNavigation'))
			document.getElementById('menuNavigation').style.zIndex = '32';
	}
	else {
		if(document.getElementById('menuNavigation'))
			document.getElementById('menuNavigation').style.zIndex = '28';
	}
}

/////////////////////////////////////////
// Communication Javascript -> Flash   //
// Uniquement variable TEXT DYNAMIQUE  //
/////////////////////////////////////////
function closeMenu(args){
	if(window.document.menuNavigation)
		window.document.menuNavigation.SetVariable("test", "1");
	//document.getElementById('menuNavigation').SetVariable("test", "1");
}