function EcrireCookie(nom, valeur)
{
	var argv=EcrireCookie.arguments;
	var argc=EcrireCookie.arguments.length;
	var expires=(argc > 2) ? argv[2] : null;
	var path=(argc > 3) ? argv[3] : null;
	var domain=(argc > 4) ? argv[4] : null;
	var secure=(argc > 5) ? argv[5] : false;
	document.cookie=nom+"="+escape(valeur)+
	((expires==null) ? "" : ("; expires="+expires.toGMTString()))+
	((path==null) ? "" : ("; path="+path))+
	((domain==null) ? "" : ("; domain="+domain))+
	((secure==true) ? "; secure" : "");
	//alert(document.cookie);
}

function showhideSousCat(what)
{
	SousCat = document.getElementById("SousMenu"+what);	
	if (SousCat) var Mode = document.getElementById("SousMenu"+what).style.display;
	for (i=0;i<8;i++ )
	{
		SousCatBis = document.getElementById("SousMenu"+i);	
		if (SousCatBis)
		{
			CatIcone = document.getElementById("CatIcone"+i);
			SousCatBis.style.display='none';
			CatIcone.src='/custom/welcoop/images/accueil/ann_tr.gif';
			EcrireCookie(SousCatBis.id, 0);
		}
	}

	
	CatIcone = document.getElementById("CatIcone"+what);
	if (!SousCat) return;
	
	if (Mode == 'none')
	{
		EcrireCookie(SousCat.id, 1);
		SousCat.style.display='';
		CatIcone.src='/custom/welcoop/images/accueil/ann_tr_ver.gif'
	}
	else
	{
		EcrireCookie(SousCat.id, 0);
		SousCat.style.display='none';
		CatIcone.src='/custom/welcoop/images/accueil/ann_tr.gif'
	}
}

function ChangeSize(Video)
{
	return;
	 document.getElementById("image"+Video).style.width=253;
	 document.getElementById("image"+Video).style.height=170;
	 document.getElementById("Video"+Video).style.width=253;
	 document.getElementById("Video"+Video).style.height=170;

	 for (i=1;i<10;i++ )
	{
		if (i!=Video)
		{
			document.getElementById("Video"+i).style.width=195;
			document.getElementById("Video"+i).style.height=131;
		}
		//document.getElementById("image"+i).style.width=195;
		//document.getElementById("image"+i).style.height=131;
	}
}
function MM_CheckFlashVersion(reqVerStr,msg){
  with(navigator){
    var isIE  = (appVersion.indexOf("MSIE") != -1 && userAgent.indexOf("Opera") == -1);
    var isWin = (appVersion.toLowerCase().indexOf("win") != -1);
    if (!isIE || !isWin){  
      var flashVer = -1;
      if (plugins && plugins.length > 0){
        var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";
        desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;
        if (desc == "") flashVer = -1;
        else{
          var descArr = desc.split(" ");
          var tempArrMajor = descArr[2].split(".");
          var verMajor = tempArrMajor[0];
          var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");
          var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
          flashVer =  parseFloat(verMajor + "." + verMinor);
        }
      }
      // WebTV has Flash Player 4 or lower -- too low for video
      else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 4.0;

      var verArr = reqVerStr.split(",");
      var reqVer = parseFloat(verArr[0] + "." + verArr[2]);
  
      if (flashVer < reqVer){
        if (confirm(msg))
          window.location = "http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
      }
    }
  } 
}