	//etat orginal des variables.

	var hauteurFlashActuelle = ''
	var hauteurFlashOriginale = 600
	
	if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
		document.write('<script language=\"VBScript\"\>\n');
		document.write('On Error Resume Next\n');
		document.write('Sub objetFlash_FSCommand(ByVal command, ByVal args)\n');
		document.write('Call objetFlash_DoFSCommand(command, args)\n');
		document.write('End Sub\n');
		document.write('</script\>\n');
	}
	
	window.onresize = function(){
		redimensionFlash('','oui')
	}
	
	function anchorTop(){
		window.scrollTo(0,0);
	}
	
	function redimensionFlash(args,navigateur){
			//Cas resize appelé par navigateur
			/*
			Dans le cas d'un resize navigateur, il est obligatoire de conserver la hauteur du flash minimum dans la variable
			hauteurFlashActuelle afin de redimensionner le flash que dans le cas d'une fenêtre plus haute que l'originale.
			*/
			if(navigateur == 'oui'){
				if(hauteurFlashActuelle < getWindowHeight()){
					args = getWindowHeight()
				}else{
					args = hauteurFlashActuelle
				}
			}
			
			//Cas resize appelé par flash
			/*
			Dans le cas d'un resize flash, nous allons stocker la variable hauteurFlashActuelle afin de donner la dimension
			réelle minimum à respecter pour un resize.
			*/
			if(args){
			
				var hauteurToInt = 0
				
				if(moz){ hauteurToInt =  parseInt(window.innerHeight); }
				if(moz){ largeurFenetre = window.innerWidth }
				if(ie){ hauteurToInt = parseInt(document.body.clientHeight); }
				if(ie){ largeurFenetre = document.body.clientWidth }
				
				document.getElementById('conteneurFlash').width = largeurFenetre
				document.getElementById('objetFlash').width = largeurFenetre
					
					if(getWindowHeight() < args){
						document.getElementById('objetFlash').height = args
						document.getElementById('conteneurFlash').height = args
						if(moz){ document.getElementById('objetFlash').height = args }
					}else{ 
						document.getElementById('conteneurFlash').height = getWindowHeight() 
						document.getElementById('objetFlash').height = getWindowHeight()
						if(moz){ document.getElementById('objetFlash').height = hauteurToInt }
					}
					if(!navigateur){ hauteurFlashActuelle = args }
			}
	}

	var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
	function objetFlash_DoFSCommand(command, args) {
		var objetFlashObj = isInternetExplorer ? document.all.objetFlash : document.objetFlash;
		if(command == "resizeFlash"){ redimensionFlash(args) }
		if(command == "anchorTop"){ anchorTop() } 
		
}
