var filename='';
	var i=0;
	function launch_div(filename,params,w,h){		
		flashContainer.style.position="absolute";
		flashContainer.style.width="100%";
		flashContainer.style.height="100%";		
		theFlash.style.position="absolute";
		theFlash.style.backgroundColor="#000000";
		t=window.setInterval("doResize("+w+","+h+")",25);		
		theFlash.style.visibility="visible";
	}
	function doResize(w,h){
		if(i<20){
		theFlash.style.width=w*i/19+"px";
		theFlash.style.height=h*i/19+"px";
		centerPopup('theFlash');
		i++;
		}
		else{
		flashContainer.style.background = "url(js/transparent-background.png)";
		
		theFlash.style.width=w+20+"px";
		theFlash.style.height=h+60+"px";
		
		titleContainer.style.position="relative";
		titleContainer.style.width=w+"px";
		titleContainer.style.height=40+"px";
		titleContainer.style.left+=10+"px";
		centerPopup('titleContainer',true);
		
		close.style.position="absolute";		
		close.style.left=w-80+"px";
		centerPopup('close',false,true);
		close.style.visibility="visible";
		
		divTitle.style.position="absolute";				
		centerPopup('divTitle');
		divTitle.style.visibility="visible";
		
		flashObject.style.position="relative";
		flashObject.style.width=w+"px";
		flashObject.style.height=h+"px";
		flashObject.style.top+=5+"px";
		flashObject.style.left+=10+"px";
		flashObject.style.visibility="visible";
		clearInterval(t);
		}
	}
	function resize(){		
		centerPopup('theFlash')
	}
	function scroll(){
		if(navigator.userAgent.indexOf('MSIE')>=0){
			//closeDiv('flashContainer');closeDiv('theFlash');closeDiv('divTitle');closeDiv('close');closeDiv('flashObject');return;
		}
		centerPopup('flashContainer',false,true)
	}
	function centerPopup(element,horizontalAlign,verticalAlign) {		
		var height=document.getElementById(element).offsetHeight;//hauteur de l'élément à positionner
		var width=document.getElementById(element).offsetWidth;//largeur de l'élément à positionner
		myParent=document.getElementById(element).parentNode;		
		var pHeight=myParent.offsetHeight;//Hauteur de l'élément parent		
		var pWidth=myParent.offsetWidth;//Largeur de l'élément parent		
		var sTop=myParent.scrollTop;//Hauteur de défilement de l'élément parent
		var sLeft=myParent.scrollLeft;//Longueur de défilement de l'élément parent
		if(element=="flashContainer"){
			if(navigator.userAgent.indexOf('MSIE')<0){
			sTop=window.scrollY;
			sLeft=window.scrollX;
			
			}
			else {				
				//pWidth=document.body.style.width;
				//sTop=document.body.scrollTop;
				//alert("myParent="+myParent.id);
				//alert("myParent="+myParent.scrollTop);
				sTop=document.documentElement.scrollTop;				
			}
			//alert("myParent="+myParent);
			//alert("myParent.id="+myParent.id);
			//alert("width="+width);
			//alert("height="+height);
			//alert("pWidth="+pWidth);
			//alert("pHeight="+pHeight);
			//alert("sLeft="+sLeft);
			//alert("sTop="+sTop);			
		}
		var posX=(pWidth/2)-(width/2)+sLeft;//Calcul de la position en X
		var posY=(pHeight/2)-(height/2)+sTop;//Calcul de la position en Y
		if(horizontalAlign){			
			document.getElementById(element).style.left=posX+"px";
		}
		else if(verticalAlign){			
			document.getElementById(element).style.top=posY+"px";
		}
		else{
			document.getElementById(element).style.top=posY+"px";
			document.getElementById(element).style.left=posX+"px";
		}
		
	}
	function closeDiv(id){		
		var theDiv=document.getElementById(id);		
		theDiv.style.visibility='hidden';
		/*	if(theDiv.hasChildNodes()){
				for(var i=0;i<theDiv.childNodes.length;i++){				
					if(theDiv.childNodes[i].id!=undefined){					
						var tempObj=document.getElementById(theDiv.childNodes[i].id);
						if(tempObj!=null)closeDiv(tempObj.id);
					}
				}
			}
		*/
	}
	function nop(){}
	window.onresize=resize;
	window.onscroll=scroll;