
var requiredMajorVersion = 9;
var requiredMinorVersion = 0;
var requiredRevision = 0;
var myListener = new Object();

var IE = false, FIREFOX = false,NETSCAPE = false,OPERA = false,AUTRE = false,ZOOMOK = false;
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);
if(strChMid.indexOf("MSIE") != -1)IE = true;
else if(strChEnd.indexOf("Firefox") != -1)FIREFOX = true;
else if(strChEnd.indexOf("Netscape") != -1)NETSCAPE = true;
else if(strChStart.indexOf("Opera") != -1)OPERA = true;
else AUTRE = true;

var xmlHttp;
var slideState;

var gmapAddress = '';
function makeyourtime(urlComplet)
{

var url = urlComplet;

if(document.all) {
          xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
else {
      xmlHttp = new XMLHttpRequest();	  
}

xmlHttp.onreadystatechange = stateChange
xmlHttp.open("GET",url);
xmlHttp.send(null);
}

function SubmitNewsletter()
{
	var url="";
	var d = new Date();

	if ((document.getElementById('IdPrenom').value=="Obligatoire")|(document.getElementById('IdNom').value=="Obligatoire")|(document.getElementById('IdEmail').value=="Obligatoire")|(document.getElementById('IdPays').value==""))
	{
	alert("La civilit\351, le nom, le pr\351nom, le pays et l'adresse e-mail sont obligatoires.");
	}
	else
	{	
	url='/makeyourtime/manege/newsletter';
	url=url+ '/' + document.getElementById('IdCourtoisie').options[document.getElementById('IdCourtoisie').selectedIndex].text;
	url=url+ '/' + document.getElementById('IdPrenom').value.toUpperCase();
	url=url+ '/' + document.getElementById('IdNom').value.toUpperCase();
	url=url+ '/' + document.getElementById('IdAdresse').value.toUpperCase();
	url=url+ '/' + document.getElementById('IdCodePostal').value.toUpperCase();
	url=url+ '/' + document.getElementById('IdLocalite').value.toUpperCase();
	url=url+ '/' + document.getElementById('IdPays').value.toUpperCase();
	url=url+ '/' + document.getElementById('IdEmail').value.toUpperCase();
	url=url+ '/' + document.getElementById('IdTel').value.toUpperCase();
	url=url+ '/' + d.getTime();
	
	makeyourtime (url);	
	
	}
	
}

function SubmitConcours()
{
	var url="";
	var d = new Date();

	if ((document.getElementById('IdPrenom').value=="Obligatoire")|(document.getElementById('IdNom').value=="Obligatoire")|(document.getElementById('IdEmail').value=="Obligatoire"))
	{
	alert("La civilit\351, le nom, le pr\351nom et l'adresse e-mail sont obligatoires.");
	}
	else
	{	
	url='/makeyourtime/manege/concours';
	url=url+ '/' + document.getElementById('IdCourtoisie').options[document.getElementById('IdCourtoisie').selectedIndex].text;
	url=url+ '/' + document.getElementById('IdPrenom').value.toUpperCase();
	url=url+ '/' + document.getElementById('IdNom').value.toUpperCase();
	url=url+ '/' + document.getElementById('IdAdresse').value.toUpperCase();
	url=url+ '/' + document.getElementById('IdCodePostal').value.toUpperCase();
	url=url+ '/' + document.getElementById('IdLocalite').value.toUpperCase();
	url=url+ '/' + document.getElementById('IdPays').value.toUpperCase();
	url=url+ '/' + document.getElementById('IdEmail').value.toUpperCase();
	url=url+ '/' + document.getElementById('IdTel').value.toUpperCase();
	url=url+ '/' + d.getTime();
	
	makeyourtime (url);	
	
	}
	
}

function stateChange(){

if(xmlHttp.readyState == 4) {

var reponse = xmlHttp.responseText;
switch (reponse)
 {
    case "ERREUR URL":
		alert("URL Error");
	break;
	
	case "NEWSLETTER_OK":
		alert("Votre demande d'inscription a \351t\351 enregistr\351e.");
	break;
	
	case "NEWSLETTER_ERREUR":
		alert("Une erreur s'est produite lors de votre demande. Veuillez r\351essayer plus tard.");
	break;
	
	case "LOGIN INCORRECT":
		document.getElementById("erreur").innerHTML = "Cette adresse e-mail n'a pas \351t\351 trouv\351e dans la base de donn\351es.";
		document.getElementById("erreur").style.display = "";
	break;
	
	case "ENVOI EFFECTUE":
		alert("Envoi effectu\351 avec succ\350s !");
		closeMessage();
	break;
	case "ADRESSE EMAIL INVALIDE":
		alert("Envoi non effectu\351 : l\'adresse e-mail est invalide.");
		document.getElementById('IdEmail').value="";
		AllerSurChamp('IdEmail');
	break;    
	default:
	break;
	}
 }
}

function submitus()
{
var arg = submitus.arguments;
var vbSubmit = true;

if(vbSubmit==true)
{
if (arg[1] != null)
  {arg[0].owHrefP1.value = arg[1];}
if (arg[2] != null)
  {arg[0].owHrefP2.value = arg[2];}
if (arg[3] != null)
  {arg[0].owHrefP3.value = arg[3];}
if (arg[4] != null)
  {arg[0].owHrefP4.value = arg[4];}
if (arg[5] != null)
  {arg[0].owHrefP5.value = arg[5];}
if (arg[6] != null)
  {arg[0].owHrefP6.value = arg[6];}
if (arg[7] != null)
  {arg[0].owHrefP7.value = arg[7];}
if (arg[0].owHrefP1.value == "")
  {
  return false;}
else
  {
  arg[0].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 AllerSurChamp(champ)
{
	document.getElementById(champ).focus();
}

function GAUActualiteRech(RechOption)
{
	switch(RechOption)
			{
			case 'S':		
			document.getElementById('GAU-Rech-SA-S').style.display='';	
			document.getElementById('GAU-Rech-SA-A').style.display='none';		
			document.getElementById('GAU-Mot-Cle').style.display='';				
			document.getElementById('GAU-Titre').style.display='none';				
			document.getElementById('GAU-Desc').style.display='none';						
			document.getElementById('GAU-Titre-Input').value=document.getElementById('GAU-Titre-Input').title;				
			document.getElementById('GAU-Desc-Input').value=document.getElementById('GAU-Desc-Input').title;				
			document.getElementById('GAU-Date-Input').value=document.getElementById('GAU-Date-Input').title;
			document.getElementById('GAU-Mot-Cle-Input').value=document.getElementById('GAU-Mot-Cle-Input').title;				
			AllerSurChamp('GAU-Mot-Cle-Input');			
			break;		
			case 'A':		
			document.getElementById('GAU-Rech-SA-S').style.display='none';	
			document.getElementById('GAU-Rech-SA-A').style.display='';	
			document.getElementById('GAU-Mot-Cle').style.display='none';							
			document.getElementById('GAU-Titre').style.display='';				
			document.getElementById('GAU-Desc').style.display='';				
			document.getElementById('GAU-Date').style.display='';		
			document.getElementById('GAU-Titre-Input').value=document.getElementById('GAU-Titre-Input').title;				
			document.getElementById('GAU-Desc-Input').value=document.getElementById('GAU-Desc-Input').title;				
			document.getElementById('GAU-Date-Input').value=document.getElementById('GAU-Date-Input').title;			
			document.getElementById('GAU-Mot-Cle-Input').value=document.getElementById('GAU-Mot-Cle-Input').title;	
			AllerSurChamp('GAU-Titre-Input');
			break;							
			}
}

function GAURelationRech(RechOption)
{
		switch(RechOption)
			{
			case 'S':		
			document.getElementById('GAU-Rech-SA-S').style.display='';	
			document.getElementById('GAU-Rech-SA-A').style.display='none';		
			document.getElementById('recherche_simple').style.display='';
			document.getElementById('recherche_avancee').style.display='none';			
			document.getElementById('modeRecherche_id').value='simple';
			break;		
			case 'A':		
			document.getElementById('GAU-Rech-SA-S').style.display='none';	
			document.getElementById('GAU-Rech-SA-A').style.display='';	
			document.getElementById('recherche_simple').style.display='none';
			document.getElementById('recherche_avancee').style.display='';
			document.getElementById('modeRecherche_id').value='avance';
			break;							
			}
}

function GAUActiviteRech(RechOption)
{
	switch(RechOption)
			{
			case 'S':		
			document.getElementById('GAU-Rech-SA-S').style.display='';	
			document.getElementById('GAU-Rech-SA-A').style.display='none';		
			document.getElementById('GAU-Mot-Cle').style.display='';				
			document.getElementById('GAU-Titre').style.display='none';				
			document.getElementById('GAU-Date').style.display='none';				
			document.getElementById('GAU-Titre-Input').value=document.getElementById('GAU-Titre-Input').title;				
			document.getElementById('GAU-Date-Input').value=document.getElementById('GAU-Date-Input').title;
			document.getElementById('GAU-Mot-Cle-Input').value=document.getElementById('GAU-Mot-Cle-Input').title;	
			document.getElementById('GAU-GalH').style.display='none';
			AllerSurChamp('GAU-Mot-Cle-Input');			
			break;		
			case 'A':		
			document.getElementById('GAU-Rech-SA-S').style.display='none';	
			document.getElementById('GAU-Rech-SA-A').style.display='';	
			document.getElementById('GAU-Mot-Cle').style.display='none';							
			document.getElementById('GAU-Titre').style.display='';				
			document.getElementById('GAU-Date').style.display='';	
			document.getElementById('GAU-Titre-Input').value=document.getElementById('GAU-Titre-Input').title;				
			document.getElementById('GAU-Date-Input').value=document.getElementById('GAU-Date-Input').title;			
			document.getElementById('GAU-Mot-Cle-Input').value=document.getElementById('GAU-Mot-Cle-Input').title;	
			document.getElementById('GAU-GalH').style.display='';
			AllerSurChamp('GAU-Titre-Input');
			break;							
			}
	document.getElementById('GalHID').checked=false;
}

function GAUDocRech(RechOption)
{
	switch(RechOption)
			{
			case 'S':		
			document.getElementById('GAU-Rech-SA-S').style.display='';	
			document.getElementById('GAU-Rech-SA-A').style.display='none';		
			document.getElementById('GAU-Mot-Cle').style.display='';				
			document.getElementById('GAU-Titre').style.display='none';				
			document.getElementById('GAU-Description').style.display='none';				
			document.getElementById('GAU-Titre-Input').value=document.getElementById('GAU-Titre-Input').title;				
			document.getElementById('GAU-Description-Input').value=document.getElementById('GAU-Description-Input').title;
			document.getElementById('GAU-Mot-Cle-Input').value=document.getElementById('GAU-Mot-Cle-Input').title;	
			AllerSurChamp('GAU-Mot-Cle-Input');			
			break;		
			case 'A':		
			document.getElementById('GAU-Rech-SA-S').style.display='none';	
			document.getElementById('GAU-Rech-SA-A').style.display='';	
			document.getElementById('GAU-Mot-Cle').style.display='none';							
			document.getElementById('GAU-Titre').style.display='';				
			document.getElementById('GAU-Description').style.display='';	
			document.getElementById('GAU-Titre-Input').value=document.getElementById('GAU-Titre-Input').title;				
			document.getElementById('GAU-Description-Input').value=document.getElementById('GAU-Description-Input').title;			
			document.getElementById('GAU-Mot-Cle-Input').value=document.getElementById('GAU-Mot-Cle-Input').title;	
			AllerSurChamp('GAU-Titre-Input');
			break;							
			}
}

function connect(lang)
{
	message = "";
	switch(lang)
	{
		case 'fr' : message = "Vous devez \352tre connect\351 pour avoir acc\350s \340 cette section.";
					break;
		case 'en' : message = "You must be connected to access this section.";
					break;
		default : message = "You must be connected to access this section.";
					break;
	}
	alert(message);
}

function changeType(obj,type)
{
	if(type == "normal")
		document.getElementById("passwordBox").innerHTML = "<input type=\"text\" name=\"fake\" onKeyPress=\"javascript:return EnterSubmit(event);\" value=\"Mot de passe\" onFocus=\"javascript:changeType(this,'password');\"/>";
	else {
		document.getElementById("passwordBox").innerHTML = "<input id=\"passwordInput\" type=\"password\" name=\"motdepasse\" onKeyPress=\"javascript:return EnterSubmit(event);\" value=\"\" onBlur=\"if(this.value==''){changeType(this,'normal');}\"/>";
		setTimeout("document.getElementById('passwordInput').focus();", 10);
	}
}


function inscriptionNewsletter()
{
	var url = "";
	var d = new Date();
	var email = document.getElementById("newsletter_email_id").value;
	if(emailValide(email))
	{
		url='/makeyourtime/manege/newsletter/' + email + '/' +d.getTime();
		makeyourtime(url)
	}
	else
		alert('L\'adresse e-mail est incorrecte');
	
	return false;
}

function inscriptionConcours()
{
	var url = "";
	var d = new Date();
	var email = document.getElementById("concours_email_id").value;
	if(emailValide(email))
	{
		url='/makeyourtime/manege/concours/' + email + '/' +d.getTime();
		makeyourtime(url)
	}
	else
		alert('L\'adresse e-mail est incorrecte');
	
	return false;
}

function slideIt_over(id)
{
	
	$('#'+id).slideDown('fast');
}

function slideIt_out(id)
{
	// Masquer le slide uniquement si on a quitt? les deux zones
	if(slideState[id] == 0)
		$('#'+id+'_slide').slideUp('fast');
}



$(document).ready(function() {
	
	/*if(!$.fontAvailable('Ma police exotique Bold')) {
		Cufon.replace('.menuNivo1Exotique');
	}
	if(!$.fontAvailable('Ma police exotique Regular')) {
		Cufon.replace('.menuNivo1Exotique');
	}
	if(!$.fontAvailable('Ma police exotique Regular Italic')) {
		Cufon.replace('.menuNivo1Exotique');
	}
	if(!$.fontAvailable('Ma police exotique Bold Italic')) {
		Cufon.replace('.menuNivo1Exotique');
	}*/
	
	slideState = new Array();
	
	// Pour chaque ?l?ment ayant la classe 'slideContainer', associer une fonction onMouseOver et onMouseOut
	// Ajouter ?galement la gestion du OnMouseOver et OnMouseOut ? l'?l?ment devant s'afficher
	$('.slideContainer').each( function() {
		
		var containerId = this.id;
		slideState.push(containerId);
		slideState[containerId] = 0;
		
		// OnMouseOver du container : afficher le slide
		$(this).mouseover(function() {
			slideState[containerId]++;
			slideState[containerId] = slideState[containerId] > 2 ? 2 : slideState[containerId];
			$('#'+containerId+'_slide').slideDown('fast');
		});
		
		// OnMouseOver de l'?l?ment superpos? : indiquer qu'on est dessus afin de ne pas la faire dispara?tre suite ? l'?n?vement OnMouseOut de l'?l?ment container
		$('#'+containerId+'_slide').mouseover(function() {
			slideState[containerId]++;
			slideState[containerId] = slideState[containerId] > 2 ? 2 : slideState[containerId];
		});

		// OnMouseOut du container : attendre une demi seconde et masquer le slide si on a quitt? toutes les zones
		$(this).mouseout(function() {
			slideState[containerId]--;
			slideState[containerId] = slideState[containerId] < 0 ? 0 : slideState[containerId];
			setTimeout("slideIt_out('"+containerId+"')",100);
		});
		
		// OnMouseOver de l'?l?ment superpos? : attendre une demi seconde et masquer le slide si on a quitt? toutes les zones
		$('#'+containerId+'_slide').mouseout(function() {
			slideState[containerId]--;
			slideState[containerId] = slideState[containerId] < 0 ? 0 : slideState[containerId];
			setTimeout("slideIt_out('"+containerId+"')",100);
		});
		
		// Redimensionner les div slide : enlever 16 pixels en largeur car il y a 8 pixels de padding de chaque c?t?
		$('#'+containerId+'_slide').width($('#'+containerId+'_slide').width()-16);
	});
	
	manageOverflow();
	manageRemplissage();
	setTimeout("manageRemplissage()",5000);
	setTimeout("googlize()",1000);
	
	// Couleur des titres statiques
	jQuery(".neutraface2DemiStatic").each( function() {
		jQuery(this).css('color',couleurSection);
	});
	// Initialize Google Maps
});

function googlize()
{
	if(gmapAddress!='') {
		initialize();
		codeAddress(gmapAddress);
	}
}

var glob_high=false;

function highslideStart () {
	
	if(glob_high) {hs.next();setTimeout("highslideStart()",5000);}
	return true;
}

function show_slideshow() {

	$(".highsliding_image_on").each(function (){$(this).css('display','inline');});
	//$(".highsliding_image_off").each(function (){$(this).css('display','none');});
}
function hide_slideshow() {

	$(".highsliding_image_on").each(function (){$(this).css('display','none');});
	//$(".highsliding_image_off").each(function (){$(this).css('display','inline');});
}


function highslide_play (imageID,caption) {
var inPageOptions = {
   slideshowGroup: imageID,
   allowSizeReduction: true, // was originally FALSE
   wrapperClassName: 'in-page controls-in-heading',
   captionText: caption,
   autoplay: true
}
	glob_high=true;
	return hs.expand(document.getElementById('first'+imageID),inPageOptions);
}

function sifr_replace() {

//sIFR.debug.ratios({ src: '/Manege/OWS/flash/neutraface2.swf', selector: '.neutraface2' });
//sIFR.debug.ratios({ src: '/Manege/OWS/flash/neutraface2.swf', selector: '.neutraface2active' });
//sIFR.debug.ratios({ src: '/Manege/OWS/flash/neutraface2.swf', selector: '.neutraface2Fct' });

//return ;

	var css_neutraface2_a = '.sIFR-root a {color: '+couleurSection+'; text-decoration: none;}';
	var css_neutraface2_a_hover = '.sIFR-root a:hover {color: '+couleurSection+';text-decoration: underline;}';
	var css_neutraface2Demi = '.sIFR-root {color: '+couleurTitre+'; letter-spacing: 0.1;text-transform: uppercase;padding: 0; leading: -8;}'
	var css_neutraface2DemiStatic = '.sIFR-root {color: '+couleurSection+'; letter-spacing: 0.1;text-transform: uppercase;padding: 0; leading: -4;}'
	var css_neutraface2DemiStaticMons = '.sIFR-root {color: #e31061; letter-spacing: 0.1;text-transform: uppercase;padding: 0; leading: -4;}'
	var css_neutraface2DemiStaticMaubeuge = '.sIFR-root {color: #ac208e; letter-spacing: 0.1;text-transform: uppercase;padding: 0; leading: -4;}'

	var css_neutraface2Fct_a = '.sIFR-root a {color: #4E4E4E; text-decoration: none;}';
	var css_neutraface2Fct_a_hover = '.sIFR-root a:hover {color: #4E4E4E;text-decoration: underline;}';
	
	sIFR.replace(neutraface2, {
	  selector: '.neutraface2',
	  css: [
			'.sIFR-root {letter-spacing: 0.1;text-transform: uppercase;padding: 0;}',
			css_neutraface2_a,
			css_neutraface2_a_hover,
		],
	  ratios: [7, 1.47, 10, 1.43, 15, 1.36, 22, 1.34, 23, 1.32, 33, 1.31, 34, 1.29, 35, 1.3, 41, 1.29, 42, 1.3, 54, 1.29, 60, 1.28, 61, 1.29, 97, 1.28, 98, 1.27, 101, 1.28, 102, 1.27, 104, 1.28, 106, 1.27, 107, 1.28, 109, 1.27, 110, 1.28, 113, 1.27, 114, 1.28, 117, 1.27, 118, 1.28, 1.27],
	  tuneHeight : -6,
	  offsetTop: -1,
	  wmode:"transparent"
	});
	
	sIFR.replace(neutraface2, {
	  selector: '.neutraface2active',
	  css: [
			'.sIFR-root {letter-spacing: 0.1;text-transform: uppercase;}',
			'.sIFR-root a {color: #FFFFFF; text-decoration: none;}',
			'.sIFR-root a:hover {color: #FFFFFF;text-decoration: underline;}'
		],
	  ratios: [7, 1.47, 10, 1.43, 15, 1.36, 22, 1.34, 23, 1.32, 33, 1.31, 34, 1.29, 35, 1.3, 41, 1.29, 42, 1.3, 54, 1.29, 60, 1.28, 61, 1.29, 97, 1.28, 98, 1.27, 101, 1.28, 102, 1.27, 104, 1.28, 106, 1.27, 107, 1.28, 109, 1.27, 110, 1.28, 113, 1.27, 114, 1.28, 117, 1.27, 118, 1.28, 1.27],
	  tuneHeight : -6,
	  offsetTop: -1,
	  wmode:"transparent"
	});	

	sIFR.replace(neutraface2Demi, {
	  selector: '.neutraface2Demi',
	  css: [css_neutraface2Demi],
	  ratios: [8, 1.43, 11, 1.38, 16, 1.33, 23, 1.32, 24, 1.29, 28, 1.3, 30, 1.27, 34, 1.28, 37, 1.27, 41, 1.28, 54, 1.27, 82, 1.26, 83, 1.25, 84, 1.26, 87, 1.25, 88, 1.26, 1.25],
	  tuneHeight : -7,
	  offsetTop: 0,
	  wmode:"transparent",
	  fitExactly: true
	});

	sIFR.replace(neutraface2, {
	  selector: '.neutraface2Fct',
	  css: [
			'.sIFR-root {letter-spacing: 0.8;text-transform: uppercase;padding: 0;}',
			css_neutraface2Fct_a,
			css_neutraface2Fct_a_hover,		
		],
	  ratios: [7, 1.47, 10, 1.43, 15, 1.36, 22, 1.34, 23, 1.32, 33, 1.31, 34, 1.29, 35, 1.3, 41, 1.29, 42, 1.3, 54, 1.29, 60, 1.28, 61, 1.29, 97, 1.28, 98, 1.27, 101, 1.28, 102, 1.27, 104, 1.28, 106, 1.27, 107, 1.28, 109, 1.27, 110, 1.28, 113, 1.27, 114, 1.28, 117, 1.27, 118, 1.28, 1.27],
	  tuneHeight : -5,
	  offsetTop: 0,
	  wmode:"transparent"
	});

	sIFR.replace(neutraface2Demi, {
	  selector: '.neutraface2DemiStatic',
	  css: [css_neutraface2DemiStatic],
	  ratios: [8, 1.43, 11, 1.38, 16, 1.33, 23, 1.32, 24, 1.29, 28, 1.3, 30, 1.27, 34, 1.28, 37, 1.27, 41, 1.28, 54, 1.27, 82, 1.26, 83, 1.25, 84, 1.26, 87, 1.25, 88, 1.26, 1.25],
	  tuneHeight : -7,
	  offsetTop: 0,
	  wmode:"transparent"
	});
	
	sIFR.replace(neutraface2Demi, {
	  selector: '.neutraface2DemiStaticMons',
	  css: [css_neutraface2DemiStaticMons],
	  ratios: [8, 1.43, 11, 1.38, 16, 1.33, 23, 1.32, 24, 1.29, 28, 1.3, 30, 1.27, 34, 1.28, 37, 1.27, 41, 1.28, 54, 1.27, 82, 1.26, 83, 1.25, 84, 1.26, 87, 1.25, 88, 1.26, 1.25],
	  tuneHeight : -7,
	  offsetTop: 0,
	  wmode:"transparent"
	});
	
	sIFR.replace(neutraface2Demi, {
	  selector: '.neutraface2DemiStaticMaubeuge',
	  css: [css_neutraface2DemiStaticMaubeuge],
	  ratios: [8, 1.43, 11, 1.38, 16, 1.33, 23, 1.32, 24, 1.29, 28, 1.3, 30, 1.27, 34, 1.28, 37, 1.27, 41, 1.28, 54, 1.27, 82, 1.26, 83, 1.25, 84, 1.26, 87, 1.25, 88, 1.26, 1.25],
	  tuneHeight : -7,
	  offsetTop: 0,
	  wmode:"transparent"
	});
}

function emailValide(email) {
	var valide = true;
	var emailRegEx = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i;
	if (email.search(emailRegEx) == -1)
		valide = false;
	return valide;
}

function desactiver_hautbas() {
	$('.flecheHaut').first().html("<img src='/Manege/OWS/Images/tourniquet_haut_inactif.png' />");
	$('.flecheBas').last().html("<img src='/Manege/OWS/Images/tourniquet_bas_inactif.png' />");
}

function slideshow_init() {

featuredcontentslider.init({
	id: "slider1",  //id of main slider DIV
	contentsource: ["inline", ""],  //Valid values: ["inline", ""] or ["ajax", "path_to_file"]
	toc: "markup",  //Valid values: "#increment", "markup", ["label1", "label2", etc]
	nextprev: ["", ""],  //labels for "prev" and "next" links. Set to "" to hide.
	revealtype: "click", //Behavior of pagination links to reveal the slides: "click" or "mouseover"
	enablefade: [true, 0.1],  //[true/false, fadedegree]
	autorotate: [true, 5000],  //[true/false, pausetime]
	onChange: function(previndex, curindex){  //event handler fired whenever script changes slide
		//previndex holds index of last slide viewed b4 current (1=1st slide, 2nd=2nd etc)
		//curindex holds index of currently shown slide (1=1st slide, 2nd=2nd etc)
		var containerId = 'enCeMoment'+previndex;
		// alert('ID : ' + containerId+' slideState : ' + slideState[containerId]);
		if(slideState[containerId] > 0) {
			slideState[containerId] = 0;
			slideIt_out(containerId);
		}
	}
})

}

function manageRemplissage() {
	
	var nav=navigator.appName;
	
	$(".remplissage").each( function () { //utilisation de l'espace dans les colonnes gauche et droite
		
		$(this).css('height',0+'px');
		
		if (IE)var h=document.body.scrollHeight; //hauteur de la colonne
		else var h=document.documentElement.scrollHeight; //hauteur de la colonne
		
		var tmin=0;
		var tmax=100000;
		var tmean=Math.floor((tmax+tmin)/2);
		while (tmin!=tmean) {
			$(this).css('height',tmean+'px');
			
			if (IE)var h2=document.body.scrollHeight; //hauteur de la colonne
			else var h2=document.documentElement.scrollHeight; //hauteur de la colonne
			
			
			//alert('height: '+h2 + ' - heightmax: ' + tmax);
			
			if (h2>h) tmax=tmean;
			else tmin=tmean;
			var tmean=Math.floor((tmax+tmin)/2);
		}
		$(this).css('height',tmean+'px');
	});
}

function manageOverflow() {
	var nav=navigator.appName;

	$(".overflowContainer").each( function () {
		var child = $(this).children(".overflowElement");
		var t=child.html();
		if (t==null) {var child = $(this).children("b").children(".overflowElement");var t=child.html();}
		
		if (t!=null)
		{
			var h = $(this).css('height');
			this.style.height='auto';
			/*if (nav=='Microsoft Internet Explorer') var height=this.offsetHeight;
			else */
			var height=this.offsetHeight-parseInt($(this).css('paddingTop')) - parseInt($(this).css('paddingBottom'));
			this.style.height=h;
			var heightmax=parseInt(h);
			if (height>heightmax) {
				var tmin=""; // texte min
				var tmax=child.html(); // texte max
				var tmean=tmax.substr(0,Math.floor((tmax.length+tmin.length)/2)); // texte milieu
				while (tmin!=tmean) {
					var t=child.html();
					child.text(tmean+'...'); // on tente de mettre le texte milieu
					this.style.height='auto';
					/*if (nav=='Microsoft Internet Explorer') var height=this.offsetHeight;
					else*/
					var height=this.offsetHeight-parseInt($(this).css('paddingTop')) - parseInt($(this).css('paddingBottom'));
					
					//alert('height: '+height + ' - heightmax: ' + heightmax);
					
					this.style.height=h;
					if (height>heightmax) tmax=tmean; // c'est encore trop grand, le texte max devient le texte milieu
					else tmin=tmean; // c'est trop petit, le texte min devient le texte milieu
					tmean=tmax.substr(0,Math.floor((tmax.length+tmin.length)/2)); // on recalcule le texte milieu
				}
				// on a atteint un point fixe, on a trouv? la bonne taille du texte
				reg=new RegExp("<.[^>]*>", "gi" );
				tmean=tmean.replace(reg, "" );
				if (tmean!='') child.text(tmean+'...');
				else child.text(tmean);
			}
		}
	});
	
	$.fn.reverse = [].reverse;
	$(".pratique").each( function ()  {	//reduction du texte du "lieu" dans la courte description sur le FL des activites
		
		var h=$(this).css('height');
		$(this).css('height','auto');
		
		var height=this.offsetHeight-parseInt($(this).css('paddingTop')) - parseInt($(this).css('paddingBottom'));
		
		$(this).css('height',h);
		var heightmax=parseInt(h);
		
		if (height>heightmax) {
			
			var parent=this;
			
			$(this).children(".lieu").children("a").children(".overflowElementPratique").reverse().each(function() {
				
				parent.style.height='auto';
				var height=parent.offsetHeight-parseInt($(parent).css('paddingTop')) - parseInt($(parent).css('paddingBottom'));
				parent.style.height=h;
				if (height>heightmax) {
					
					var tmin=""; // texte min
					var tmax=$(this).html(); // texte max
					var tmean=tmax.substr(0,Math.floor((tmax.length+tmin.length)/2)); // texte milieu
					while (tmin!=tmean) {
						$(this).text(tmean+'...'); // on tente de mettre le texte milieu
						parent.style.height='auto';
						
						var height=parent.offsetHeight-parseInt($(parent).css('paddingTop')) - parseInt($(parent).css('paddingBottom'));
						
						//alert('height: '+height + ' - heightmax: ' + heightmax);
						
						parent.style.height=h;
						
						if (height>heightmax) tmax=tmean; // c'est encore trop grand, le texte max devient le texte milieu
						else tmin=tmean; // c'est trop petit, le texte min devient le texte milieu
						tmean=tmax.substr(0,Math.floor((tmax.length+tmin.length)/2)); // on recalcule le texte milieu
					}
					
					// on a atteint un point fixe, on a trouv? la bonne taille du texte
					if (tmean!='') $(this).text((tmean)+'...');
					else $(this).text((tmean));
				}
			});
			$(this).children(".lieu").children().children("a").children(".overflowElementPratique").reverse().each(function() {
				
				parent.style.height='auto';
				var height=parent.offsetHeight-parseInt($(parent).css('paddingTop')) - parseInt($(parent).css('paddingBottom'));
				parent.style.height=h;
				if (height>heightmax) {
					
					var tmin=""; // texte min
					var tmax=$(this).html(); // texte max
					var tmean=tmax.substr(0,Math.floor((tmax.length+tmin.length)/2)); // texte milieu
					while (tmin!=tmean) {
						$(this).text(tmean+'...'); // on tente de mettre le texte milieu
						parent.style.height='auto';
						
						var height=parent.offsetHeight-parseInt($(parent).css('paddingTop')) - parseInt($(parent).css('paddingBottom'));
						
						//alert('height: '+height + ' - heightmax: ' + heightmax);
						
						parent.style.height=h;
						
						if (height>heightmax) tmax=tmean; // c'est encore trop grand, le texte max devient le texte milieu
						else tmin=tmean; // c'est trop petit, le texte min devient le texte milieu
						tmean=tmax.substr(0,Math.floor((tmax.length+tmin.length)/2)); // on recalcule le texte milieu
					}
					
					// on a atteint un point fixe, on a trouv? la bonne taille du texte
					if (tmean!='') $(this).text((tmean)+'...');
					else $(this).text((tmean));
				}
			});
		}
	});
	
	/*$(".pratique").hover(
	function () {
	$(this).css('cursor','pointer');
	$(this).children('.pratique2').fadeIn(200);},
	function () {
	$(this).children('.pratique2').fadeOut(100);}
	);*/
	
	/*$(".pratique, pratique2").each( function () {
	
		var child1 = $(this).children('.type');
		var child2 = $(this).children('.dateHeurePrix');
	
		var h = $(this).css('height');
		$(this).css('height','auto');

		
		var height=this.offsetHeight-parseInt($(this).css('paddingTop')) - parseInt($(this).css('paddingBottom'));
		
		$(this).css('height',h);
		
		var heightmax=parseInt(h);
		//alert(height+' '+heightmax);
		if (height<=heightmax) {
		
			var tmin=0;
			var tmax=100;
			var tmean=Math.floor((tmax+tmin)/2);
			//alert('height: '+height + ' - heightmax: ' + heightmax);
			while (tmin!=tmean) {
				child1.css('margin-bottom',tmean+'px');
				child2.css('margin-bottom',tmean+'px');
				
				$(this).css('height','auto');
				
				var height=this.offsetHeight-parseInt($(this).css('paddingTop')) - parseInt($(this).css('paddingBottom'));
				
				//alert('height: '+height + ' - heightmax: ' + heightmax);
				
				$(this).css('height',h);
				//alert(height+' '+heightmax);
				if (height>heightmax) tmax=tmean;
				else tmin=tmean;
				var tmean=Math.floor((tmax+tmin)/2);
			}
			child1.css('margin-bottom',tmean+'px');
			child2.css('margin-bottom',tmean+'px');
		}
	});*/
	
	/*$(".infosDetail").each( function ()  {		
		
		//$(this).next('.pratique2').html(($(this).html()));
		
		var h = $(this).css('height');
		
		$(this).css('height','auto');
		
		var height=this.offsetHeight-parseInt($(this).css('paddingTop')) - parseInt($(this).css('paddingBottom'));
		
		$(this).css('height',h);
		var heightmax=parseInt(h);
		
		
		var child = $(this).children('.infos3');
		if (height>heightmax) {
		
			var tmin=""; // texte min
			var tmax=child.html(); // texte max
			var tmean=tmax.substr(0,Math.floor((tmax.length+tmin.length)/2)); // texte milieu
			while (tmin!=tmean) {
				var t=child.html();
				child.text(tmean+'...'); // on tente de mettre le texte milieu
				this.style.height='auto';
				
				var height=this.offsetHeight-parseInt($(this).css('paddingTop')) - parseInt($(this).css('paddingBottom'));
				
				//alert('height: '+height + ' - heightmax: ' + heightmax);
				
				this.style.height=h;
				if (height>heightmax) tmax=tmean; // c'est encore trop grand, le texte max devient le texte milieu
				else tmin=tmean; // c'est trop petit, le texte min devient le texte milieu
				tmean=tmax.substr(0,Math.floor((tmax.length+tmin.length)/2)); // on recalcule le texte milieu
			}
			// on a atteint un point fixe, on a trouv? la bonne taille du texte
			if (tmean!='') child.text((tmean)+'...');
			else child.text((tmean));
		}
	});*/
	
	$(".infosDetail,.pratique").each( function () { //utilisation de l'espace dans le resume du FP d'une activite ou dans les description courte et longue sur le FL
		
		var children = $(this).children('.child');
		children.css('display','block');
		
		var h = $(this).css('height');
		$(this).css('height','auto');

		var height=this.offsetHeight-parseInt($(this).css('paddingTop')) - parseInt($(this).css('paddingBottom'));
		
		$(this).css('height',h);
		
		var heightmax=parseInt(h);
		//alert(height+' '+heightmax);
		if (height<=heightmax) {
		
			var tmin=0;
			var tmax=100;
			var tmean=Math.floor((tmax+tmin)/2);
			//alert('height: '+height + ' - heightmax: ' + heightmax);
			while (tmin!=tmean) {
				children.css('margin-bottom',tmean+'px');
				
				$(this).css('height','auto');
				
				var height=this.offsetHeight-parseInt($(this).css('paddingTop')) - parseInt($(this).css('paddingBottom'));
				
				//alert('height: '+height + ' - heightmax: ' + heightmax);
				
				$(this).css('height',h);
				//alert(height+' '+heightmax);
				if (height>heightmax) tmax=tmean;
				else tmin=tmean;
				var tmean=Math.floor((tmax+tmin)/2);
			}
			children.css('margin-bottom',tmean+'px');
		}
	});
	$(".pratique2").each( function () { //utilisation de l'espace dans le r?sum? du FP d'une activit? ou dans les descript? courte et longue sur le FL
		
		var children = $(this).children('.child');
		children.css('display','block');
		
		$(this).css('display','block');
		var h = $(this).css('height');
		$(this).css('height','auto');

		var height=this.offsetHeight-parseInt($(this).css('paddingTop')) - parseInt($(this).css('paddingBottom'));
		
		$(this).css('height',h);
		
		var heightmax=parseInt(h);
		//alert(height+' '+heightmax);
		if (height<=heightmax) {
		
			var tmin=0;
			var tmax=100;
			var tmean=Math.floor((tmax+tmin)/2);
			//alert('height: '+height + ' - heightmax: ' + heightmax);
			while (tmin!=tmean) {
				children.css('margin-bottom',tmean+'px');
				
				$(this).css('height','auto');
				
				var height=this.offsetHeight-parseInt($(this).css('paddingTop')) - parseInt($(this).css('paddingBottom'));
				
				//alert('height: '+height + ' - heightmax: ' + heightmax);
				
				$(this).css('height',h);
				//alert(height+' '+heightmax);
				if (height>heightmax) tmax=tmean;
				else tmin=tmean;
				var tmean=Math.floor((tmax+tmin)/2);
			}
			children.css('margin-bottom',tmean+'px');
		}
		$(this).css('display','none');
	});

}

function changeURLMan(url) {
	
	var UrlParams=extractUrlParams();
	url=url.replace(/([?&])usr=[a-zA-Z0-9]*/,"$1usr="+UrlParams['usr']);
	url=url.replace(/([?&])lg=[a-zA-Z0-9]*/,"$1lg="+UrlParams['lg']);
	url=url.replace(/[?&]id=[a-zA-Z0-9]*/,"");
	url=url.replace(/[?&]flux=[a-zA-Z0-9]*/,"");
	
	return url;
}

function extractUrlParams() {	

	var t = location.search.substring(1).split('&');
	var f = [];
	for (var i=0; i<t.length; i++){

		var x = t[ i ].split('=');
		f[x[0]]=x[1];
	}
	return f;
}

// Google Maps functions
var geocoder;
var map;

function initialize() {
    geocoder = new google.maps.Geocoder();
    var latlng = new google.maps.LatLng(-34.397, 150.644);
    var myOptions = {
      zoom: 15,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    map = new google.maps.Map(document.getElementById("map_canvas"),
        myOptions);
}

function codeAddress(address) {
    geocoder.geocode( { 'address': address}, function(results, status) {
      if (status == google.maps.GeocoderStatus.OK) {
        map.setCenter(results[0].geometry.location);
        var marker = new google.maps.Marker({
            map: map, 
            position: results[0].geometry.location
        });
      } else {
        alert("Geocode was not successful for the following reason: " + status);
      }
    });
  }
// End of google Maps functions


var flashMouseEvtMgr = (function() {

	function createEl(n) {

		return document.createElementNS ? document.createElementNS("http://www.w3.org/1999/xhtml", n) : document.createElement(n);

	}



	function createSpan(obj) {

		var span = createEl("span");



		span.style.position = "absolute";

		span.style.width = obj.width + "px";

		span.style.height = obj.height + "px";

		span.style.background = "url(#)";



		obj.parentNode.insertBefore(span, obj);



		return span;

	}



	return {

		add: function(obj, type, fn) {

			if (fn || (fn = obj["on" + type])) {

				var span = obj.flashMouseEvtEl || (obj.flashMouseEvtEl = createSpan(obj));



				obj["on" + type] = null;

				span["on" + type] = fn;

			}

		}

	};

})();

function InsertFlashByNav(LienFlv,dct_no)
{
	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 videoWidth = 800;
	var videoHeight = 472;
	
    var hasReqestedVersionAvant = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);		
	
	var bloc_a_inclure = "";
	
	if (hasReqestedVersionAvant) 
	{             
		var version = GetSwfVer();
		version = Remplacer(version);
		version = RecupIndice(version);		
		version = parseInt(version); 
		//document.getElementById("Lien_Adobe"+dct_no).style.display="none";	
		if (version > 8)
		{
              if((strChEnd.indexOf("Firefox/3") != -1)|(strChEnd.indexOf("Firefox/2") != -1)|(strChEnd.indexOf("Firefox") != -1) |( (strChEnd.indexOf("Safari") != -1) & (strChEnd.indexOf("Version/5") != -1) & (strChEnd.indexOf("Version/5.0") == -1))|(strChEnd.indexOf("Chrome") != -1))
           		{
					//FIREFOX, CHROME, SAFARI 5.1 +
					//bloc_a_inclure += "<div id='MasqueObjet' style='margin-left:-5px;'>";
					bloc_a_inclure += "<object id='myFlash' type='application/x-shockwave-flash' data='/manege/ows/flash/flv_player_multi.swf' width='"+videoWidth+"' height='"+videoHeight+"'>";
					bloc_a_inclure += "<param name='movie' value='/manege/ows/flash/flv_player_multi.swf'/>";
					bloc_a_inclure += "<param name='allowFullScreen' value='true'/>";	 	
					bloc_a_inclure += "<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'/>";
					bloc_a_inclure += "<EMBED movie='flv_player_multi.swf' type='application/x-shockwave-flash' SRC='/manege/ows/flash/flv_player_multi.swf' PLUGINSPAGE='http:www.macromedia.com/go/getflash' WIDTH='"+videoWidth+"' HEIGHT='"+videoHeight+"' NAME='movie'>";
					bloc_a_inclure += "</EMBED>";
					bloc_a_inclure += "</object>";
					//bloc_a_inclure += "</div>";
           	}                               
           	else 
			{
				//bloc_a_inclure += "<div id='MasqueObjet' style='margin-left:-5px;'>";
				bloc_a_inclure += "<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='/manege/ows/flash/flv_player_multi.swf' width='"+videoWidth+"' height='"+videoHeight+"'>";
				bloc_a_inclure += "<param name='movie' value='/manege/ows/flash/flv_player_multi.swf'/>";
				bloc_a_inclure += "<param name='allowFullScreen' value='true'/>";
				bloc_a_inclure += "<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&width="+videoWidth+"&height="+videoHeight+"'/>";
				bloc_a_inclure += "</object>";
				//bloc_a_inclure += "</div>";	   
			} 
			//document.getElementById("Lien_Adobe"+dct_no).style.display="none"; 
		}
		else
		{	
			bloc_a_inclure += "<div id='MasqueObjet' style='margin-left:-5px;'><div>";
			bloc_a_inclure += "<p id='Lien_Adobe"+ dct_no +"' 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>";			
		}                                
	}
	else
	{
		//bloc_a_inclure += "<p id='Lien_Adobe"+ dct_no +"' 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
			bloc_a_inclure += "<div id='MasqueObjet' style='margin-left:-5px;'>";       
			bloc_a_inclure += "<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='/manege/ows/flash/flv_player_multi.swf' width='"+videoWidth+"' height='"+videoHeight+"'>";
			bloc_a_inclure += "<param name='movie' value='/manege/ows/flash/flv_player_multi.swf'/>";
			bloc_a_inclure += "<param name='allowFullScreen' value='true'/>";	 	
			bloc_a_inclure += "<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'/>";
			bloc_a_inclure += "</object>";
			bloc_a_inclure += "</div>";
		}            
		else if((strChEnd.indexOf("Firefox/3") != -1)|(strChEnd.indexOf("Firefox/2") != -1)|(strChEnd.indexOf("Firefox") != -1))
		{
                //FIREFOX
			bloc_a_inclure += "<div id='MasqueObjet' style='margin-left:-5px;'>";
			bloc_a_inclure += "<object id='myFlash' type='application/x-shockwave-flash' data='/manege/ows/flash/flv_player_multi.swf' width='"+videoWidth+"' height='"+videoHeight+"'>";
			bloc_a_inclure += "<param name='movie' value='/manege/ows/flash/flv_player_multi.swf'/>";
			bloc_a_inclure += "<param name='allowFullScreen' value='true'/>";	 	
			bloc_a_inclure += "<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'/>";
			bloc_a_inclure += "<EMBED movie='flv_player_multi.swf' type='application/x-shockwave-flash' SRC='/manege/ows/flash/flv_player_multi.swf' PLUGINSPAGE='http:www.macromedia.com/go/getflash' WIDTH='"+videoWidth+"' HEIGHT='"+videoHeight+"' NAME='movie'>";
			bloc_a_inclure += "</EMBED>";
			bloc_a_inclure += "</object>";
			bloc_a_inclure += "</div>";
       	}                               
       	else if((strChStart.indexOf("Opera/9") != -1)|(strChStart.indexOf("Opera/9") != -1))
		{
           		//OPERA
			bloc_a_inclure += "<div id='MasqueObjet' style='margin-left:-5px;'>";
			bloc_a_inclure += "<object id='myFlash' type='application/x-shockwave-flash' data='/manege/ows/flash/flv_player_multi.swf' width='"+videoWidth+"' height='"+videoHeight+"'>";
			bloc_a_inclure += "<param name='movie' value='/manege/ows/flash/flv_player_multi.swf'/>";
			bloc_a_inclure += "<param name='allowFullScreen' value='true'/>";		
			bloc_a_inclure += "<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'/>";
			bloc_a_inclure += "<EMBED movie='flv_player_multi.swf' type='application/x-shockwave-flash' SRC='/manege/ows/flash/flv_player_multi.swf' PLUGINSPAGE='http:www.macromedia.com/go/getflash' WIDTH='"+videoWidth+"' HEIGHT='"+videoHeight+"' NAME='movie'>";
			bloc_a_inclure += "</EMBED>";
			bloc_a_inclure += "</object>";
			bloc_a_inclure += "</div>";
		}           	     
        else
		{	
			//SAFARI
           	bloc_a_inclure += "<div id='MasqueObjet' style='margin-left:-5px;'>";
			bloc_a_inclure += "<object id='myFlash' type='application/x-shockwave-flash' data='/manege/ows/flash/flv_player_multi.swf' width='"+videoWidth+"' height='"+videoHeight+"'>";
			bloc_a_inclure += "<param name='movie' value='/manege/ows/flash/flv_player_multi.swf'/>";
			bloc_a_inclure += "<param name='allowFullScreen' value='true'/>";	 	
			bloc_a_inclure += "<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'/>";
			bloc_a_inclure += "<EMBED movie='flv_player_multi.swf' type='application/x-shockwave-flash' SRC='/manege/ows/flash/flv_player_multi.swf' PLUGINSPAGE='http:www.macromedia.com/go/getflash' WIDTH='"+videoWidth+"' HEIGHT='"+videoHeight+"' NAME='movie'>";
			bloc_a_inclure += "</EMBED>";
			bloc_a_inclure += "</object>";
			bloc_a_inclure += "</div>";
		} 
		//document.getElementById('Lien_Adobe'+dct_no).style.display="";	
		bloc_a_inclure = "<p id='Lien_Adobe"+ dct_no +"' class='contact' style='font-size:12px;width: "+videoWidth+"px; height: "+videoHeight+"px'>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='/manege/ows/images/get_flash_player.gif' BORDER='0'></A></p>";
	}       	      
		   		   		
	//jQuery("#iframevideo"+dct_no).html(bloc_a_inclure);
	//jQuery("#iframevideo"+dct_no).css("display","none");
	return bloc_a_inclure;
}

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 centrer_dialogue(no) {
	setTimeout("jQuery('"+no+"').dialog('option','position','center');",100);
}
