	var headerMinimize = "";
	
	
	function resizeScreenOpaleModeSimplifie()
	{
	//alert("resizeScreenOpaleModeSimplifie");
	
		// désactiver DnD	pour firefox //
		document.ondragstart = function(e) 	{	return false; } 
	
		toggle('colonne_gauche');
		toggle('nom');
		toggle('logo1');
		toggle('logo2');
		toggle('profil');


		toggle('menu_principal') ;
		toggle('date');


		//alert("resizeScreenOpale");

		if (document.getElementById('colonne_gauche').style.display=='none')
		{
				headerMinimize = cascadedstyle("header","height","height");

									
				//alert("headerMinimize 1= " + headerMinimize);
				
				document.getElementById('header').style.height = "45px" ; // px pour mozilla
				
				//document.getElementById('menu_principal').style.top = 0 ;
				//document.getElementById('date').style.height = 15;
				
				
				if (document.getElementById("img_resize") != null)
				{
					//alert("maximize yes");

					//	 changer l'icone agrandir/réduire pour mettre un texte plus explicite
					var html = "" + document.getElementById("img_resize").innerHTML;
					html = html.replace("agrandir_fenetre.gif" , "big_agrandir_fenetre.gif");
					document.getElementById("img_resize").innerHTML = html;
					
				}
				
				
			}
			

		resizeIframeOpale() ;
	
	}

	function resizeScreenOpale()
	{
		//alert("resizeScreenOpale");
		
		toggle('colonne_gauche');
		toggle('nom');
		toggle('logo1');
		toggle('logo2');
		toggle('profil');


		toggle('menu_principal') ;
		toggle('date');


		//alert("resizeScreenOpale");

		if (document.getElementById('colonne_gauche').style.display=='none')
		{
				headerMinimize = cascadedstyle("header","height","height");

									
				

				//alert("headerMinimize 1= " + headerMinimize);
				
				document.getElementById('header').style.height = "30px" ; // px pour mozilla
				
				//document.getElementById('menu_principal').style.top = 0 ;
				//document.getElementById('date').style.height = 15;
				
				
				if (document.getElementById("img_resize") != null)
				{
					//alert("maximize yes");

					//	 changer l'icone agrandir/réduire pour mettre un texte plus explicite
					var html = "" + document.getElementById("img_resize").innerHTML;
					html = html.replace("agrandir_fenetre.gif" , "big_agrandir_fenetre.gif");
					document.getElementById("img_resize").innerHTML = html;
					
				}
				
				
			} else 
			{
			
				//alert("headerMinimize 2= " + headerMinimize);
			
				if (headerMinimize != "")
					document.getElementById('header').style.height = headerMinimize;
				else
					document.getElementById('header').style.height = "100px";
					
				
				if (document.getElementById("img_resize") != null)
				{
					//alert("minimize yes");
					
					//	 changer l'icone agrandir/réduire pour mettre un texte plus explicite
					var html = "" + document.getElementById("img_resize").innerHTML;
					html = html.replace("big_agrandir_fenetre.gif" , "agrandir_fenetre.gif");
					document.getElementById("img_resize").innerHTML = html;
					
				}
				
				
				//document.getElementById('menu_principal').style.top = 70 ;
				//document.getElementById('date').style.height = 13;
			}
			

		resizeIframeOpale() ;
	}


	function cascadedstyle(eltName, cssproperty, csspropertyNS)
	{
		var el = document.getElementById(eltName);
		var ret = "";

		if (el != null)
		{
			if (el.currentStyle) //if IE5+
				ret =  el.currentStyle[cssproperty]
			else if (window.getComputedStyle)
			{ //if NS6+
				var elstyle=window.getComputedStyle(el, "")
				ret = elstyle.getPropertyValue(csspropertyNS)
			}
		}
		
		return ret;
	}	

	function isdefined(val)
	{
		var indefini;
	
		return !(val == indefini);
	}

	function cascadedstyleToInt(sValue)
	{
		var val = 0;
		var sTmp = "";
		
		
		
		if (isdefined(sValue))
		{
			// garder juste la partie numérique
			for (var i=0; i<sValue.length; i++)
			{
				if ( (sValue.charAt(i) >= '0') && (sValue.charAt(i) <= '9') )
				{
					sTmp += sValue.charAt(i);
				}
				else
					break;
			}


			//alert("sValue=" + sValue + "  -->sTmp=" + sTmp);


			if (sTmp != "")
				val = parseInt(sTmp);
		}
		
		return val;
	}


	function getWindowHeight() {
		var windowHeight=0;
		if (typeof(window.innerHeight)=='number') {
			windowHeight=window.innerHeight;
		}
		else {
		 if (document.documentElement&&
		   document.documentElement.clientHeight) {
			 windowHeight = document.documentElement.clientHeight;
		}
		else {
		 if (document.body&&document.body.clientHeight) {
			 windowHeight=document.body.clientHeight;
		  }
		 }
		}
		return windowHeight;
	}

	function getWindowWidth() {
		var windowWidth=0;
		if (typeof(window.innerWidth)=='number') {
			windowWidth=window.innerWidth;
		}
		else {
		 if (document.documentElement&&
		   document.documentElement.clientWidth) {
			 windowWidth = document.documentElement.clientWidth;
		}
		else {
		 if (document.body&&document.body.clientWidth) {
			 windowWidth=document.body.clientWidth;
		  }
		 }
		}
		return windowWidth;
	}

	function calculIframeSize()
	{
		var newSize = new array(0,0);
		var newWidth = 0;
		var newHeight = 0;
		
		
		
	
		var headerHeight = 0;
		
		if (document.getElementById('header') != null)
			headerHeight = document.getElementById('header').clientHeight;
		//alert("headerHeight=" + headerHeight);
		
		
		var menuGaucheWidth;
		
		if (document.getElementById('colonne_gauche').style.display=='none')
			menuGaucheWidth = 0;
		else	
			menuGaucheWidth = document.getElementById('colonne_gauche').clientWidth;
			
		//alert("menuGaucheWidth=" + menuGaucheWidth);
		
		
		var offsetX = 0;
		var offsetY = 0;
		

		sTmp = cascadedstyle("contenu","marginLeft","margin-left");
		offsetX = cascadedstyleToInt(sTmp);
		//alert("offsetX = " + offsetX);
		

		if (document.getElementById('header') != null)
		{
			sTmp = cascadedstyle("header","borderBottomWidth","border-bottom-width");
			
			//alert("sTmp = " + sTmp);
			
			offsetY = cascadedstyleToInt(sTmp);
		}
		//alert("offsetY = " + offsetY);


		
		// MOZ
		//if (top.window.innerHeight)
		
		//alert("getWindowWidth=" + getWindowWidth());
		//alert("getWindowHeight=" + getWindowHeight());
			
		newWidth  = getWindowWidth()  - menuGaucheWidth - (2 * offsetX) - 1; 
		newHeight = getWindowHeight() - headerHeight    - (2 * offsetY) - 1;
		
		// IE
		//alert("document.documentElement.clientWidth=" + document.documentElement.clientWidth);
			
		
		if (newWidth < 400)
			newWidth = 400;

		if (newWidth > screen.width)				
			newWidth = screen.width;
		
		if (newHeight < 180)
			newHeight= 180;

		if (newHeight > screen.height)				
			newHeight = screen.height;
			
			
		newSize [0] = newWidth;
		newSize [1] = newHeight;
		
		//alert("newWidth = " + newWidth);
		//alert("newHeight = " + newHeight);

		return 	newSize;		
	}


	function majTempsConnexion(url)
	{
		//alert(url);
		
		/*
		
		SUITE PB DE blocages : utilisation de http global
		
		var XhrObj=null;
		
		
		if (XhrObj == null)
		{
			//alert('XhrObj  NULL');
		
			if(window.XMLHttpRequest) // Firefox 
			{
				XhrObj = new XMLHttpRequest(); 
			}
			else 
			{	
				if(window.ActiveXObject) // Internet Explorer 
				{
					XhrObj = new ActiveXObject("Microsoft.XMLHTTP"); 
				}
				else 
				{ // XMLHttpRequest non supporté par le navigateur 
				//alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest..."); 
				return; 
				} 
			}
		}
		
		// pas besoin de réponse
		XhrObj.open("POST", url, true);
		
		//alert(url);
		XhrObj.send(null);
		
		*/

		
		/*
		if (http == null)
			alert("http null");
		else
			alert("http ok");
			*/
		
		http.open("POST", url, true);
		http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=iso-8859-1');
		http.send(null);
	}

	function dechargePage(url)
	{
		//alert(url);
		
		majTempsConnexion(url);
	}




	function onresizeIframe()
	{
	//alert("onresizeIframe");
		resizeIframeOpale();
	}


	function onclickAgrandir()
	{
		if (document.getElementById("img_resize") != null) 
		{
			document.getElementById("img_resize").onclick=function () 
			{
			  parent.resizeScreenOpale();
			};

		}
	}

	function AssetLoaded()
	{
		//alert("AssetLoaded");
		
		onclickAgrandir();
	}


	function waitPreloadPage() 
	{ //DOM
		if (document.getElementById)
		{
			document.getElementById('loading').style.visibility='hidden';
		}
		else
		{
			if (document.layers)
			{ //NS4
				document.loading.visibility = 'hidden';
			}
			else 
			{ //IE4
				document.all.loading.style.visibility = 'hidden';
			}
		}
	}

	function IframeLoaded()
	{
		//alert("IframeLoaded");
		
		waitPreloadPage();
		
		var bAsset = false;
		
		if ( (top.idframe != null) && (top.idframe.mainFrame != null) )
			bAsset = true;
		
		//if (bAsset == false)
			onclickAgrandir();
	}





	function resizeIframeOpale()
	{
	
		//alert("resizeIframeOpale");
		
		if (top.idframe != null)
		{
			//alert("idframe non  null");
			
			/*
				alert("idframe nb frames = " + idframe.frames.length );
			
			 if (idframe.frames.length > 0)  
			 {
				 for (var i = 0 ; i < idframe.frames.length ; i++)
				{
					alert("nom frame=" + idframe.frames[i].name);

				 }
			  }			
			  */
			
			if (top.idframe.mainFrame != null)
			{

				if (top.idframe.mainFrame.p_asset != null)
				{
					//alert("p_asset de mainFrame non  null");


					if (top.idframe.mainFrame.p_asset.principal != null)
					{
						if (top.idframe.mainFrame.p_asset.principal.etatFenetreGanesha != null)
						{
							if (document.getElementById('colonne_gauche').style.display=='none')
							{
								// maximisée
								top.idframe.mainFrame.p_asset.principal.etatFenetreGanesha(1);
							}
							else
								top.idframe.mainFrame.p_asset.principal.etatFenetreGanesha(0);
						}
					}
				}					

			}
		}

		

		if (document.getElementById('idframe') != null)
		{
			if (top.idframe.principal != null)
			{
				if (top.idframe.principal.etatFenetreGanesha)
				{
					if (document.getElementById('colonne_gauche').style.display=='none')
					{
						// maximisée
						top.idframe.principal.etatFenetreGanesha(1);
					}
					else
						top.idframe.principal.etatFenetreGanesha(0);
				}

			}
				
			var newsize = calculIframeSize();
			
		
			
			document.getElementById('idframe').width = newsize[0];
			document.getElementById('idframe').height = newsize[1];
		}

	}


	/************************************************/
	function DeleteTrackingGroupe(url,mess) 
	{
		ans = window.confirm(mess);
		if(ans)	{
			window.location.href=url;
		}
	}
	
	function isNetscape()
	{
		if (navigator.appName.indexOf('Netscape') != -1)
			return true;
		else
			return false;
	};

	function sound(soundsrc)
	{
		if (isNetscape())
		{
			var thissound = document.getElementById("sound_embed");
	
			if (thissound != null)
			{
				var code = '<embed src="' + soundsrc + '"  hidden=true autostart=true loop=false />';
	
				thissound.innerHTML = code;
			}
		}
		else
		{
				// BGSOUND avec IE car temps de réaction plus rapide que EMBED */
				var bgsound = document.getElementById("id_bgsound");

				if (bgsound != null)
				{
					//alert(thissound.src); 
					bgsound.src= soundsrc;
				}
		}
	};

	/************************************************/
	function confirmExit(url,mess,url_sound) 
	{
		if (url_sound != '')
			sound(url_sound);
		
		ans = window.confirm(mess);
		if(ans)	{
			window.location.href=url;
		}
	}

