function popUp(URL,vWidth,vHeight) 

{

day = new Date();

id = day.getTime();

var scr_w = screen.availWidth;

var scr_h = screen.availHeight;

var haut = (scr_w-vWidth)/2;

var gauche = (scr_h-vHeight)/2;

eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width="+vWidth+",height="+vHeight+",left = "+haut+",top = "+gauche+"');");}




function submitus(NomFormulaire)
{
var arg = submitus.arguments;

if (arg[1] != null)
  {NomFormulaire.owHrefP1.value = arg[1];}
if (arg[2] != null)
  {NomFormulaire.owHrefP2.value = arg[2];}
if (arg[3] != null)
  {NomFormulaire.owHrefP3.value = arg[3];}
if (arg[4] != null)
  {NomFormulaire.owHrefP4.value = arg[4];}
if (arg[5] != null)
  {NomFormulaire.owHrefP5.value = arg[5];}
if (arg[6] != null)
  {NomFormulaire.owHrefP6.value = arg[6];}
if (arg[7] != null)
  {NomFormulaire.owHrefP6.value = arg[7];}
if (NomFormulaire.owHrefP1.value == "")
  {
  return false;}
else
  {
  NomFormulaire.submit();}
}


function ClicBouton ()
{
var arg = ClicBouton.arguments;
document.orgform.owHrefP1.value = arg[0] ;
document.orgform.owHrefP2.value = arg[1] ;
document.orgform.owHrefP3.value = arg[2] ;
document.orgform.owHrefP4.value = arg[3] ;
document.orgform.owHrefP5.value = arg[4] ;
document.orgform.owHrefP6.value = arg[5] ;
document.orgform.owHrefP7.value = arg[6]
document.orgform.submit() ;
}

function SubmitBouton ()
{
var arg = SubmitBouton.arguments;
document.arg[0].owHrefP1.value = arg[1] ;
owHrefP2.value = arg[2] ;
owHrefP3.value = arg[3] ;
owHrefP4.value = arg[4] ;
owHrefP5.value = arg[5] ;
owHrefP6.value = arg[6] ;
owHrefP7.value = arg[7] ;
submit() ;
}


function checkform2 (valeur)
{
if (valeur == "")
{
  alert("Faux");
 return false;

}
else
  alert("Vai");
 return true;
}


function checkform ()
{
if (document.orgform.owHrefP1.value == "")
{
  alert("Faux");
 return false;

}
else
  alert("Vai");
 return true;
}

function MM_reloadPage(init) {
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) {
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_preloadImages() {
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() {
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() {
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function MM_showHideLayers() {
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function fenedit( desturl , fennom){
varRefWin=window.open(desturl , fennom ,'toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=1,copyhistory=0,menuBar=0,width=750,height=600');
}

function commtot (n, p, f) {
{
var nn = Number(n);
x=(nn*p)+f
x=x+' Eur'
return x
}
}

function dateValide(jour,mois,annee){
var vDate;
//set up a Date object based on the day, month and year arguments
//javascript months start at 0 (0-11 instead of 1-12)
vDate=new Date(annee,mois-1,jour);

/*
Javascript Dates are a little too forgiving and will change the date to a reasonable guess if it's invalid. We'll use this to our advantage by creating the date object and then comparing it to the details we put it. If the Date object is different, then it must have been an invalid date to start with...
*/
return ((jour==vDate.getDate()) && ((mois-1)==vDate.getMonth()) && (annee==vDate.getFullYear()));
}

function LoadMap(address,htmlInfo) {
	 if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("googlemap"));
		var geocoder = new GClientGeocoder();
		geocoder.getLatLng(address,function (point) {
									if (!point) {
										document.getElementById("googlemap").innerHTML="";
									} else {	
										map.setCenter(new GLatLng(point.lat()+0.007,point.lng()), 13);
										var marker = new GMarker(point);
										map.addOverlay(marker);
										marker.openInfoWindowHtml(htmlInfo);
										map.addControl(new GSmallMapControl());	
										map.addControl(new GMapTypeControl());
										map.enableScrollWheelZoom();
									}
								}
								);
	 }
}


function Remplacer(chaine)
 {
 var a, tmp;
 tmp = "";
 a = chaine;

 for(var i = 0; i < a.length; i++)
	{
 	tmp = tmp + a.charAt(i);
	if (a.charAt(i) == " ")
 		{
		 tmp = tmp.replace(" ","");
 		}
 	if (a.charAt(i) == ",")
 		{
		 tmp = tmp.replace(",",".");
 		}
	if (a.charAt(i) == "W")
 		{
		 tmp = tmp.replace("W","");
 		}
	if (a.charAt(i) == "I")
 		{
		 tmp = tmp.replace("I","");
 		}
	if (a.charAt(i) == "N")
 		{
		 tmp = tmp.replace("N","");
 		}
 	}

 a = tmp;
 return a
 } 

function RecupIndice(chaine)
 {
 var a, tmp;
 tmp = "";
 a = chaine;

 for(var i = 0; i < a.length; i++)
	{
	if (a.charAt(i) == ".")
 		{
		i=a.length;
 		} 
	else
		{
 		tmp = tmp + a.charAt(i);
		}
		
 	}

 a = tmp;
 return a
 } 
 
function InsertFlashByNav(LienFlv)
{
var strChUserAgent = navigator.userAgent;
           var intSplitStart = strChUserAgent.indexOf("(",0);
           var intSplitEnd = strChUserAgent.indexOf(")",0);
           var strChStart = strChUserAgent.substring(0,intSplitStart);
           var strChMid = strChUserAgent.substring(intSplitStart, intSplitEnd);
           var strChEnd = strChUserAgent.substring(strChEnd); 
			
        var hasReqestedVersionAvant = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);		
	
	if (hasReqestedVersionAvant) 
	{             
		var version = GetSwfVer();
		version = Remplacer(version);
		version = RecupIndice(version);		
		version = parseInt(version); 
		document.write("<p id='Lien_Adobe' class='contact' style='font-size:12px;'>Le lecteur vid&eacute;o est indisponible car le <i><A onclick='window.open(this.href);return false' HREF='http://www.macromedia.com/go/getflashplayer'>Flash Player</a></i> est inf&eacute;rieur &agrave; la version 9 requise.<br><br><A onclick='window.open(this.href);return false' HREF='http://www.macromedia.com/go/getflashplayer'><IMG SRC='www2.academieroyale.be/academie/ows/images/get_flash_player.gif' BORDER='0'></A></p>");
		document.getElementById("Lien_Adobe").style.display="none";	
		if (version > 8)
		{
              if((strChEnd.indexOf("Firefox/3") != -1)|(strChEnd.indexOf("Firefox/2") != -1)|(strChEnd.indexOf("Firefox") != -1))
           		{
                //FIREFOX
		document.write("<div id='MasqueObjet' style='margin-left:-5px;'>");
		document.write("<object id='myFlash' type='application/x-shockwave-flash' data='/academie/ows/flash/flv_player_multi.swf' width='589' height='472'>");
		document.write("<param name='movie' value='/academie/ows/flash/flv_player_multi.swf'/>");
		document.write("<param name='allowFullScreen' value='true'/>");	 	
		document.write("<param name='FlashVars' value='flv="+LienFlv+"&showopen=0&showprevious=0&shownext=0&showstop=1&showvolume=1&showtime=1&showfullscreen=1&autoplay=1&bgcolor1=0xE2E2E2&bgcolor2=0xE2E2E2&buffermessage=Chargement en cours ..._n_&autoload=1&listener=myListener'/>");
		document.write("<EMBED movie='flv_player_multi.swf' type='application/x-shockwave-flash' SRC='/academie/ows/flash/flv_player_multi.swf' PLUGINSPAGE='http:www.macromedia.com/go/getflash' WIDTH='589' HEIGHT='472' NAME='movie'>");
		document.write("</EMBED>");
		document.write("</object>");
		document.write("</div>");
           	}                               
           	else 
                {
		document.write("<div id='MasqueObjet' style='margin-left:-5px;'>");       
	   document.write("<object id='myFlash' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0' type='application/x-shockwave-flash' data='/academie/ows/flash/flv_player_multi.swf' width='589' height='472'>");
	   document.write("<param name='movie' value='/academie/ows/flash/flv_player_multi.swf'/>");
	   document.write("<param name='allowFullScreen' value='true'/>");	 	
	   document.write("<param name='FlashVars' value='flv="+LienFlv+"&showopen=0&showprevious=0&shownext=0&autoplay=1&showstop=1&showvolume=1&showtime=1&showfullscreen=1&bgcolor1=0xE2E2E2&bgcolor2=0xE2E2E2&buffermessage=Chargement en cours ..._n_&autoload=1&listener=myListener'/>");
	   document.write("</object>");
	   document.write("</div>");	   
                } 
				document.getElementById("Lien_Adobe").style.display="none";              	
		}
		else
		{	
		document.write("<div id='MasqueObjet' style='margin-left:-5px;'><div>"); 
		document.getElementById("Lien_Adobe").style.display="";	
		}                                
						
	}
	else
	{
	document.write("<p id='Lien_Adobe' class='contact' style='font-size:12px;'>Le lecteur vid&eacute;o est indisponible car le <i><A onclick='window.open(this.href);return false' HREF='http://www.macromedia.com/go/getflashplayer'>Flash Player</a></i> n'est pas install&eacute; sur ce navigateur.<br><br><A onclick='window.open(this.href);return false' HREF='http://www.macromedia.com/go/getflashplayer'><IMG SRC='www2.academieroyale.be/academie/ows/images/get_flash_player.gif' BORDER='0'></A></p>");		       	   


           if((strChMid.indexOf("MSIE 7") != -1)|(strChMid.indexOf("MSIE 6") != -1))
           {
			   //IE
           document.write("<div id='MasqueObjet' style='margin-left:-5px;'>");       
	   document.write("<object id='myFlash' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0' type='application/x-shockwave-flash' data='/academie/ows/flash/flv_player_multi.swf' width='589' height='472'>");
	   document.write("<param name='movie' value='/academie/ows/flash/flv_player_multi.swf'/>");
	   document.write("<param name='allowFullScreen' value='true'/>");	 	
	   document.write("<param name='FlashVars' value='flv="+LienFlv+"&showopen=0&showprevious=0&shownext=0&showstop=1&showvolume=1&showtime=1&showfullscreen=1&autoplay=1&bgcolor1=0xE2E2E2&bgcolor2=0xE2E2E2&buffermessage=Chargement en cours ..._n_&autoload=1&listener=myListener'/>");
	   document.write("</object>");
	   document.write("</div>");
           }            
           else if((strChEnd.indexOf("Firefox/3") != -1)|(strChEnd.indexOf("Firefox/2") != -1)|(strChEnd.indexOf("Firefox") != -1))
           	{
                //FIREFOX
		document.write("<div id='MasqueObjet' style='margin-left:-5px;'>");
		document.write("<object id='myFlash' type='application/x-shockwave-flash' data='/academie/ows/flash/flv_player_multi.swf' width='589' height='472'>");
		document.write("<param name='movie' value='/academie/ows/flash/flv_player_multi.swf'/>");
		document.write("<param name='allowFullScreen' value='true'/>");	 	
		document.write("<param name='FlashVars' value='flv="+LienFlv+"&showopen=0&showprevious=0&shownext=0&showstop=1&showvolume=1&showtime=1&showfullscreen=1&autoplay=1&bgcolor1=0xE2E2E2&bgcolor2=0xE2E2E2&buffermessage=Chargement en cours ..._n_&autoload=1&listener=myListener'/>");
		document.write("<EMBED movie='flv_player_multi.swf' type='application/x-shockwave-flash' SRC='/academie/ows/flash/flv_player_multi.swf' PLUGINSPAGE='http:www.macromedia.com/go/getflash' WIDTH='589' HEIGHT='472' NAME='movie'>");
		document.write("</EMBED>");
		document.write("</object>");
		document.write("</div>");
           	}                               
           	else if((strChStart.indexOf("Opera/9") != -1)|(strChStart.indexOf("Opera/9") != -1))
			{
           		//OPERA
			document.write("<div id='MasqueObjet' style='margin-left:-5px;'>");
			document.write("<object id='myFlash' type='application/x-shockwave-flash' data='/academie/ows/flash/flv_player_multi.swf' width='589' height='472'>");
			document.write("<param name='movie' value='/academie/ows/flash/flv_player_multi.swf'/>");
			document.write("<param name='allowFullScreen' value='true'/>");	 	
			document.write("<param name='FlashVars' value='flv="+LienFlv+"&showopen=0&showprevious=0&shownext=0&showstop=1&showvolume=1&showtime=1&showfullscreen=1&autoplay=1&bgcolor1=0xE2E2E2&bgcolor2=0xE2E2E2&buffermessage=Chargement en cours ..._n_&autoload=1&listener=myListener'/>");
			document.write("<EMBED movie='flv_player_multi.swf' type='application/x-shockwave-flash' SRC='/academie/ows/flash/flv_player_multi.swf' PLUGINSPAGE='http:www.macromedia.com/go/getflash' WIDTH='589' HEIGHT='472' NAME='movie'>");
			document.write("</EMBED>");
			document.write("</object>");
			document.write("</div>");
			}           	     
           		else
			{	
			//SAFARI
           	document.write("<div id='MasqueObjet' style='margin-left:-5px;'>");
			document.write("<object id='myFlash' type='application/x-shockwave-flash' data='/academie/ows/flash/flv_player_multi.swf' width='589' height='472'>");
			document.write("<param name='movie' value='/academie/ows/flash/flv_player_multi.swf'/>");
			document.write("<param name='allowFullScreen' value='true'/>");	 	
			document.write("<param name='FlashVars' value='flv="+LienFlv+"&showopen=0&showprevious=0&shownext=0&showstop=1&showvolume=1&showtime=1&showfullscreen=1&autoplay=1&bgcolor1=0xE2E2E2&bgcolor2=0xE2E2E2&buffermessage=Chargement en cours ..._n_&autoload=1&listener=myListener'/>");
			document.write("<EMBED movie='flv_player_multi.swf' type='application/x-shockwave-flash' SRC='/academie/ows/flash/flv_player_multi.swf' PLUGINSPAGE='http:www.macromedia.com/go/getflash' WIDTH='589' HEIGHT='472' NAME='movie'>");
			document.write("</EMBED>");
			document.write("</object>");
			document.write("</div>");
			} 
			document.getElementById('Lien_Adobe').style.display="";	
	}
       	      
		   		   		
}

 

function VerifVersionLecteurInstal(IndexVideo)
{
var hasReqestedVersionApres = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
			
        if (hasReqestedVersionApres)
		{ 			     		
	    var version = GetSwfVer();
		version = Remplacer(version);
		version = RecupIndice(version);		
		version = parseInt(version); 		
		
		if (version > 8)
		{
		document.getElementById("Lien_Adobe").style.display="none";
                document.getElementById("myFlash").SetVariable("player:jsPlay", IndexVideo);		
		}
		else
		{
		document.getElementById("Lien_Adobe").style.display="";	
		}
			   if(document.getElementById("Lien_Adobe").style.display=="")
				{
					document.getElementById("ListeVideo").style.display="none";					
				}
				else
				{
					document.getElementById("ListeVideo").style.display="";
				}
				
				
				document.getElementById("MasqueObjet").style.display="";
		}
		else 
		{ 		
		document.getElementById("MasqueObjet").style.display="none";
		document.getElementById("Lien_Adobe").style.display=""; 
		document.getElementById("ListeVideo").style.display="none";                																					 		  		        
		}
ResizeRightDiv();		

}


function ResizeRightDiv()
{

document.getElementById("sponsor_aca").style.display="";
var hauteur1=document.getElementById("leftContent").offsetHeight;
var hauteur2=document.getElementById("rightContent").offsetHeight;
var hauteur3=document.getElementById("menu_table").offsetHeight;
if (hauteur1>hauteur2)
{
	document.getElementById("rightContent").style.height=hauteur1+"px";
}
else
{
	document.getElementById("leftContent").style.height=(hauteur2-23)+"px";
	document.getElementById("myTable").style.height=(hauteur2-23)+"px";
	document.getElementById("sponsor_table").style.height=(hauteur2-23-hauteur3)+"px";
}	
}


function ResizeRightDivAudio()
{

document.getElementById("sponsor_aca").style.display="";
var hauteur1=document.getElementById("leftContent").offsetHeight;
var hauteur2=document.getElementById("rightContent").offsetHeight;
var hauteur3=document.getElementById("menu_table").offsetHeight;

document.getElementById("leftContent").style.height=(hauteur2+400-23)+"px";
document.getElementById("myTable").style.height=(hauteur2+400-23)+"px";
document.getElementById("sponsor_table").style.height=(hauteur2+400-23-hauteur3)+"px";
}

function InsertFlashForAudioFile()
{
	var strChUserAgent = navigator.userAgent;
    var intSplitStart = strChUserAgent.indexOf("(",0);
    var intSplitEnd = strChUserAgent.indexOf(")",0);
    var strChStart = strChUserAgent.substring(0,intSplitStart);
    var strChMid = strChUserAgent.substring(intSplitStart, intSplitEnd);
    var strChEnd = strChUserAgent.substring(strChEnd); 
	
	var hasReqestedVersionAvant = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);		
	
	if (hasReqestedVersionAvant) 
	{             
		var version = GetSwfVer();
		version = Remplacer(version);
		version = RecupIndice(version);		
		version = parseInt(version); 
		
		if (version < 9){  		               																					 		  		        
		document.write("<p id='Lien_Adobe' class='contact' style='font-size:12px;'>Le lecteur mp3 est indisponible car le <i><A onclick='window.open(this.href);return false' HREF='http://www.macromedia.com/go/getflashplayer'>Flash Player</a></i> est inf&eacute;rieur &agrave; la version 9 requise.<br><br><A onclick='window.open(this.href);return false' HREF='http://www.macromedia.com/go/getflashplayer'><IMG SRC='www2.academieroyale.be/academie/ows/images/get_flash_player.gif' BORDER='0'></A></p>");               																					 		  		        
		}  
		else
		{
		if((strChMid.indexOf("MSIE 7") != -1)|(strChMid.indexOf("MSIE 6") != -1))
			{
			//IE   
			document.write("<object class='playerpreview' id='myFlash' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0' type='application/x-shockwave-flash' data='/academie/ows/flash/flv_player_multi.swf' width='1' height='1'>");
			document.write("<param name='movie' value='/academie/ows/flash/player_mp3.swf' />");
			document.write("<param name='AllowScriptAccess' value='always' />");
			document.write("<param name='FlashVars' value='listener=myListener&amp;interval=500' />");
			document.write("</object>")	
           }            
           else if((strChEnd.indexOf("Firefox/3") != -1)|(strChEnd.indexOf("Firefox/2") != -1)|(strChEnd.indexOf("Firefox") != -1))
				{
				//FIREFOX
				document.write("<object class='playerpreview' id='myFlash' type='application/x-shockwave-flash' data='/academie/ows/flash/player_mp3.swf' width='1' height='1'>");
				document.write("<param name='movie' value='/academie/ows/flash/player_mp3.swf' />");
				document.write("<param name='AllowScriptAccess' value='always' />");
				document.write("<param name='FlashVars' value='listener=myListener&amp;interval=500' />");
				document.write("</object>")	
				}                               
				else if((strChStart.indexOf("Opera/9") != -1)|(strChStart.indexOf("Opera/9") != -1))
					{
					//OPERA
					document.write("<object class='playerpreview' id='myFlash' type='application/x-shockwave-flash' data='/academie/ows/flash/player_mp3.swf' width='1' height='1'>");
					document.write("<param name='movie' value='/academie/ows/flash/player_mp3.swf' />");
					document.write("<param name='AllowScriptAccess' value='always' />");
					document.write("<param name='FlashVars' value='listener=myListener&amp;interval=500' />");
					document.write("</object>")	
					}           	     
					else
						{	
						//SAFARI
						document.write("<object class='playerpreview' id='myFlash' type='application/x-shockwave-flash' data='/academie/ows/flash/player_mp3.swf' width='1' height='1'>");
						document.write("<param name='movie' value='/academie/ows/flash/player_mp3.swf' />");
						document.write("<param name='AllowScriptAccess' value='always' />");
						document.write("<param name='FlashVars' value='listener=myListener&amp;interval=500' />");
						document.write("</object>")	
					} 	
		}
	}
	else
	{
	document.write("<p id='Lien_Adobe' class='contact' style='font-size:12px;'>Le lecteur mp3 est indisponible car le <i><A onclick='window.open(this.href);return false' HREF='http://www.macromedia.com/go/getflashplayer'>Flash Player</a></i> n'est pas install&eacute; sur ce navigateur.<br><br><A onclick='window.open(this.href);return false' HREF='http://www.macromedia.com/go/getflashplayer'><IMG SRC='www2.academieroyale.be/academie/ows/images/get_flash_player.gif' BORDER='0'></A></p>");		       	   
	}	
}

function InitFlashForAudioFile(_index)
{
	myListener.index = _index;
	myListener.position = 0;

	if(autoPlay == true){
		read(_index);
	}
	
	setVolume();
}

function CheckFlashForAudioFile()
{
	var hasReqestedVersionApres = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
			
    if (hasReqestedVersionApres)
		{ 			     		
	    var version = GetSwfVer();
		version = Remplacer(version);
		version = RecupIndice(version);		
		version = parseInt(version); 		
		
		if (version > 8)
			{

			if(document.getElementById("Lien_Adobe") != null){
					document.getElementById("Lien_Adobe").style.display="none"; 																					 		  		        
				}
			document.getElementById("ListeAudio").style.display=""; 
			document.getElementById("lecteurMP3").style.display="";                																					 		  		        			
			}
		else
			{
			if(document.getElementById("Lien_Adobe") != null){
				document.getElementById("Lien_Adobe").style.display="";
				}			
			document.getElementById("lecteurMP3").style.display="none";                																					 		  		        
			document.getElementById("ListeAudio").style.display="none";                																					 		  		        
			}
		}
	else 
	{ 	
		if( document.getElementById("Lien_Adobe") != null){
			document.getElementById("Lien_Adobe").style.display="";
		};
		document.getElementById("lecteurMP3").style.display="none";  	
		document.getElementById("ListeAudio").style.display="none"; 		
	}
ResizeRightDivAudio();
}

function AllerSurChamp(champ)
{
	document.getElementById(champ).focus();
}

function RendreObjetEditable(typeObj,condition,option,valeur,resultat,idObj,actionSP)
{	
	switch(typeObj)
		{
		case 'select':		
		switch(condition)
			{
			case 'remplie':		
			
			break;		
			
			case 'vide':		
			
			break;						
			case '==':		
			
			break;						
			case '!=':		
			if(option!=valeur){document.getElementById(idObj).disabled=false;}				
			break;		
			}														
		break;		
		}		
}

function RendreObjetNonEditable(typeObj,condition,option,valeur,resultat,idObj,actionSP)
{	
	switch(typeObj)
		{
		case 'select':		
		switch(condition)
			{
			case 'remplie':		
			
			break;		
			
			case 'vide':		
			
			break;						
			case '==':		
			if(option==valeur){document.getElementById(idObj).disabled=true;}				
			break;						
			case '!=':		
			break;		
			}														
		break;		
		}	
		
}

function RendreObjetEgale(typeObj,condition,option,valeur,resultat,idObj,actionSP)
{	
	switch(typeObj)
		{
		case 'select':		
		switch(condition)
			{
			case 'remplie':		
			
			break;		
			
			case 'vide':		
			
			break;						
			case '==':		
			if(option==valeur){					
			for(var i = 0; i < document.getElementById(idObj).length; i++) 
				{     
				if(document.getElementById(idObj).options[i].text==resultat)
					{
					document.getElementById(idObj).selectedIndex=i;  
					i=document.getElementById(idObj).length									
					}										       								                                      
				} 		 
			}				
			break;						
			case '!=':		
			break;		
			}														
		break;		
		}	
		
}

function RendreObjetVisible(typeObj,condition,option,valeur,resultat,idObj,actionSP)
{		
		switch(typeObj)
		{
		case 'select':		
		switch(condition)
			{
			case 'remplie':		
			
			break;		
			
			case 'vide':		
			
			break;						
			case '==':		
			if(option==valeur){
			document.getElementById(idObj).style.display='';				
			}
			break;						
			case '!=':		
			break;		
			}
		case 'radio':	
		switch(condition)
			{
			case 'remplie':		
			
			break;		
			
			case 'vide':		
			
			break;						
			case '==':	
			option=option.substring(option.lastIndexOf("-", option.length)+1, option.length);				
			if(option==valeur){
			document.getElementById(idObj).style.display='';
			}	
			break;						
			case '!=':
		
			break;		
			}
		break;		
		}
		
}

function RendreObjetInvisible(typeObj,condition,option,valeur,resultat,idObj,actionSP)
{	
	var idInput=idObj.substring(4, idObj.length);
	switch(typeObj)
		{
		case 'select':		
		switch(condition)
			{
			case 'remplie':		
			
			break;		
			
			case 'vide':		
			
			break;						
			case '==':	
			if(option==valeur){	
			document.getElementById(idInput).value='';
			document.getElementById(idObj).style.display='none';			
			}						
			break;						
			case '!=':
			if(option!=valeur){
			document.getElementById(idInput).value='';
			document.getElementById(idObj).style.display='none';			
			}			
			break;		
			}	
		case 'radio':	
		switch(condition)
			{
			case 'remplie':		
			
			break;					
			case 'vide':		
			
			break;						
			case '==':
			if(actionSP==''){option=option.substring(option.lastIndexOf("-", option.length)+1, option.length);}
			if(option==valeur){	
			document.getElementById(idObj).style.display='none';
	            if(document.getElementById(idInput).type=='select-one')
				{ document.getElementById(idInput).selectedIndex=0;}
				else{
				document.getElementById(idInput).value='';}
				}		
			else{}	
			break;						
			case '!=':
		
			break;		
			}	
		break;		
		}
}

/*
'0' : Etat initial - Ne pas créer de fiches [FD_ValeurReponse]
'1' : Etat d'ajout - Créer les fiches [FD_ValeurReponse]
'2' : Etat de modification - Modifier les fiches [FD_ValeurReponse]
'3' : Etat de suppression - Supprimer les fiches [FD_ValeurReponse]
*/

function CreationLigne(ItemObj,Message)
{

var Obj = ItemObj.split("$$$");
var ObjBool = false;

	for(i=0;i<Obj.length-1;i++)
		{	
			
			if(document.getElementById(Obj[i]).style.display=='none')
			{				
				switch (document.getElementById('SL'+Obj[i]).value)
				{
				case '0': //Ne pas tenir en compte l'élément de la sous-liste 
				document.getElementById('SL'+Obj[i]).value='1'
				break;
				case '3': //Supprimer l'élément de la sous-liste 
				document.getElementById('SL'+Obj[i]).value='2'
				break;
				}
				document.getElementById(Obj[i]).style.display='';
				i=Obj.length-1;	
				ObjBool=true;	
			}			
		}	
	
	if(ObjBool==false)
	{
		alert(Message);
	}
	
}

function SuppressionLigne(ItemObj)
{
	document.getElementById(ItemObj).style.display='none';	
	
	switch (document.getElementById('SL'+ItemObj).value)
			{
				case '1': //Ne pas tenir en compte l'élément de la sous-liste 
				document.getElementById('SL'+ItemObj).value='0'
				break;
				case '2': //Supprimer l'élément de la sous-liste 
				document.getElementById('SL'+ItemObj).value='3'
				break;
			}
}

function ValiderForm()
{
	var arg = ValiderForm.arguments;
	document.form_inscription.owHrefP1.value = arg[0] ;
	document.form_inscription.owHrefP2.value = arg[1] ;
	document.form_inscription.owHrefP3.value = arg[2] ;
	document.form_inscription.owHrefP4.value = arg[3] ;
	document.form_inscription.owHrefP5.value = arg[4] ;
	document.form_inscription.owHrefP6.value = arg[5] ;
	document.form_inscription.owHrefP7.value = arg[6] ;
	document.form_inscription.submit();
	document.clear() ;	
	document.close() ;	
}

function CanChoixModal(value){
	switch (value)
			{
				case 'radio-ci': 
				document.getElementById("btn_inscription_ci").style.display="";	
				document.getElementById("btn_inscription_cc").style.display="none";	
				document.getElementById("radio-cc").checked=false;
				break;
				case 'radio-cc':
				document.getElementById("btn_inscription_cc").style.display="";	
				document.getElementById("btn_inscription_ci").style.display="none";	
				document.getElementById("radio-ci").checked=false;
				break;
			}

}

function SubmitNewsletter(tableNo){

	ValiderForm('Bvalclic',tableNo,'','','','','');
	alert('Votre demande sera trait\351e dans les plus brefs d\351lais.');

}