/***************
fixcorners functions
****************/

var ie = document.all && window.print && !window.opera && /MSIE [56]/.test(navigator.userAgent);
var ie7 = document.all && window.print && !window.opera && /MSIE [789]/.test(navigator.userAgent);

function JSForCSS() {
	if (document.body) {
		document.body.className+=" hasJS";
		if (ie) document.body.className+=" IS_IE";
		
	} else {
		setTimeout("JSForCSS()",10);
	}
}
JSForCSS();

var CSSBottomCorners=[];
function cssRight(elm) {
	elm.style.right=(parseInt(elm.currentStyle.right)-elm.parentNode.offsetWidth%2)+"px";
}
function cssBottom(elm, pushElement) {
		if (pushElement && !elm.CSSBottomAlreadyCSS) {
			CSSBottomCorners.push(elm);
			elm.CSSBottomAlreadyCSS=true;
		}
		elm.style.bottom=(parseInt(elm.currentStyle.bottom)-elm.parentNode.offsetHeight%2)+"px";

}
function fixCorners() {
	if (ie)  {
		for (var i=0; i<CSSBottomCorners.length; i++) {
			CSSBottomCorners[i].style.bottom="";
		}
	} else {
		if (/safari/i.test(navigator.userAgent)) {
			document.body.className+=" hidecorners";
			setTimeout("fixCornersClean()",10);
		}
	}
}
function fixCornersClean() {
	document.body.className = document.body.className.replace(/hidecorners/g,"");
}

function addHover(elm) {
	elm.style.behavior = " ";
	elm.onmouseenter = function() {
		this.className+= ' hover';
	}
	elm.onmouseleave = function() {
		this.className = this.className.replace(/hover/g,"");
	}
}

function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return [curleft,curtop];
}

function addEvent(obj, type, fn ) {
	if (obj.addEventListener)
		obj.addEventListener( type, fn, false );
	else if (obj.attachEvent) {
		obj["e"+type+fn] = fn;
		obj[type+fn] = function() { obj["e"+type+fn]( window.event ); }
		obj.attachEvent( "on"+type, obj[type+fn] );
	}
}

function navHover() {
	var nav = document.getElementById("mainnav");
	if (nav == null)
		return;
	var ch = nav.getElementsByTagName("li");
	if (ch == null)
		return;
	var timeout = 2000;
	var time;
	
	cleanOver = function(){
		for (var j=0; j<nav.childNodes.length; j++){
			if (nav.childNodes[j].nodeName.toUpperCase() == 'LI'){
				nav.childNodes[j].className = nav.childNodes[j].className.replace(/hover/g,"");
			}
		}
	}
	
	for (var i=0; i<ch.length; i++) {
		var x=ch[i];
		var elm=null;
		var ul = x.getElementsByTagName("ul");
		if (ul.length>0) {
			x.theUl = ul[0];
			x.nav = nav;
			x.onmouseover = function() {
				elm = this;
				clearTimeout(time);
				cleanOver();
				this.className+=" hover";
				if (!this.oneTimeOver) {
					var li=this.getElementsByTagName("li");
					var sumWidth=0;
					for (var j=0; j<li.length; j++) {
						sumWidth+=li[j].offsetWidth;
					}
					this.theUl.style.width=sumWidth+"px";
					var ulX = findPos(this.theUl)[0]-findPos(this.nav)[0];
					if (sumWidth+ulX>this.nav.offsetWidth) {
						this.theUl.style.left="auto";
						this.theUl.style.right="0";
					}
					if (findPos(this.theUl)[0]<findPos(this.nav)[0]){
						this.theUl.style.position="absolute";
						this.theUl.style.left=-ulX+"px";
					}
					this.oneTimeOver=true;
				}
			}
		} else {
			x.onmouseover = function() {
				clearTimeout(time);
				cleanOver();
				this.className+=" hover";
			}	
		}
		
		x.onmouseout = function() {
			if (elm && this == elm){
				time = setTimeout("cleanOver()",timeout);
			}else{
				this.className=this.className.replace(/hover/g,"");
				clearTimeout(time);
			}
		}
		
	}
}

function toDefaultValue(elm) {
	elm.defaultOldValue=elm.value;
	elm.onfocus=function() {
		if (!this.isChecking && this.value==this.defaultOldValue) this.value='';			
	}
	elm.onblur=function() {
		if(this.value=='') this.value=this.defaultOldValue;
	}
	if (!elm.isChecking) elm.onfocus();
}

function addCloseFlash(swapFlashId) {
	var tag_div = document.getElementById('zoneFlashVideo');
	if(!tag_div) return;
	var tag_link=document.createElement("a");
	tag_link.innerHTML = "Fermer <strong>X<strong>";
	tag_link.className +=' closeLink';
	tag_link.href='javascript:;';
	if (swapFlashId) {
		tag_link.swapFlashId = swapFlashId;
		tag_link.onclick=function() {switchFlash(document.getElementById(this.swapFlashId), document.getElementById('zoneFlashVideo')); return false;};
	} else {
		tag_link.onclick=function() {closeFlashVideo(); return false;};
	}
	tag_link=tag_div.appendChild(tag_link);
	tag_div.closeLink = tag_link;
	
}

function positionCloseLink() {
	var tag_div = document.getElementById('zoneFlashVideo');
	if(!tag_div) return;
	if (tag_div.closeLink) {
		tag_link = tag_div.closeLink;
		var object = tag_div.getElementsByTagName("object");
		if (object.length==0) object = tag_div.getElementsByTagName("embed");
		if (object.length>0) {
			object = object[0]; 
			tag_link.style.left = object.offsetLeft+object.offsetWidth-tag_link.offsetWidth-10+"px";
		}
	}
}


function openFlashVideo(){
	var flashCtn = document.getElementById("zoneFlashVideo")
	flashCtn.className = flashCtn.className.replace(/display_none/g,"display_blk");
	if (flashCtn.theflash) {
		flashCtn.theflash = flashCtn.appendChild(flashCtn.theflash);
	}
	positionCloseLink();
}

function closeFlashVideo(){
	var flashCtn = document.getElementById("zoneFlashVideo");
	
	var obj = flashCtn.getElementsByTagName("object");
	if (obj.length>0) {
		obj = obj[0];
	} else {
		var obj = flashCtn.getElementsByTagName("embed"); 
		obj = obj[0];
	}
	
	if (ie || ie7) {
		flashCtn.theflash = flashCtn.removeChild(obj);
	} else {
		try { obj.stop(); }
		catch(e) {}
	}	
	flashCtn.className = flashCtn.className.replace(/display_blk/g,"display_none");
}
	

function switchFlash(elm1,elm2,close){
	if (elm1.className.match(/\bdisplay_none\b/)){
		elm1.className = elm1.className.replace(/display_none/g,"display_blk");
		elm2.className = elm2.className.replace(/display_blk/g,"display_none");
	}else{
		elm2.className = elm2.className.replace(/display_none/g,"display_blk");
		elm1.className = elm1.className.replace(/display_blk/g,"display_none");
	}
}
addEvent(window, "load", navHover);

function setFontSize(className) {
	document.body.className = document.body.className.replace(/\b(large|normal)\b/g,'') + " "+className;
}

function toggle(elm) {
	var div = elm; 
	while(div.className.indexOf("faq_")==-1) div = div.parentNode;
	div.className = div.className.replace(/\bfaq_(clos|open)ed\b/g," faq_")+(div.className.match(/\bfaq_closed\b/) ? "open" : "clos")+"ed";
}

function test(elm) {
	var div = elm; 
	while(div.className.indexOf("faq_")==-1) div = div.parentNode;
	div.className = div.className.replace(/\bfaq_(clos|open)ed\b/g," faq_")+(div.className.match(/\bfaq_closed\b/) ? "open" : "clos")+"ed";
}

function show(elm){
	function removeCurrent(parentBlock) {
		for (var i=0;i<parentBlock.childNodes.length;i++){
			var o=parentBlock.childNodes[i];
			if (o.nodeType != 3 && o.className.match(/\bcurrent\b/)){
				o.className = o.className.replace(/\bcurrent\b/g,'');
			}
		}
	}
	
	if (!elm.parentNode.className.match(/\boff\b/)){
		var blockLetter = document.getElementById('blockLetter');
		var ul=elm.parentNode;
		while (ul.nodeName != "UL"){
			ul = ul.parentNode;
		}
		
		removeCurrent(ul);
		removeCurrent(blockLetter);
		var elmId = elm.href.match(/.*#(.*)/)[1];
		document.getElementById(elmId).className += " current";
		elm.parentNode.className += " current";
	}
}



// Gestion Accordeon (menus ouvrants et fermants) 
function changeEntete(entreeMenu){
	mesImages = new Array("suiviDossier","suiviDossierBleu","etapesCredit","bonnesAffaires","espaceConseil");
	path = "/commun/images/finaref_V3/nav_gauche/";
	extension = ".gif";		
	var i = 0;
	while (i<mesImages.length) {		
		var nomImage = mesImages[i];
		if(mesImages[i]==entreeMenu) {
			if (document.images[entreeMenu])
				document.images[entreeMenu].src = path+entreeMenu+"Ouvert"+extension;
		} else {
			if (document.images[nomImage])
				document.images[nomImage].src = path+nomImage+extension;
		}
		i++;
	}
		
	if (document.getElementById('votreConseiller_ouvert'))
		document.getElementById('votreConseiller_ouvert').style.display='none';
	if (document.getElementById('votreConseiller_ferme'))
	document.getElementById('votreConseiller_ferme').style.display='block';

	if (document.getElementById('espace_mobile_ouvert'))
		document.getElementById('espace_mobile_ouvert').style.display='none';
	if (document.getElementById('espace_mobile_ferme'))
		document.getElementById('espace_mobile_ferme').style.display='block';

	if (document.getElementById('bons_plans_ouvert'))
		document.getElementById('bons_plans_ouvert').style.display='none';
	if (document.getElementById('bons_plans_ferme'))
		document.getElementById('bons_plans_ferme').style.display='block';	
}

function initialiseEntetes() {
	if (document.images['suiviDossier'])
		document.images['suiviDossier'].src = '/commun/images/finaref_V3/nav_gauche/suiviDossier.gif';
	if (document.images['suiviDossierBleu'])
		document.images['suiviDossierBleu'].src = '/commun/images/finaref_V3/nav_gauche/suiviDossierBleu.gif';
	if (document.images['etapesCredit'])
		document.images['etapesCredit'].src = '/commun/images/finaref_V3/nav_gauche/etapesCredit.gif';
	if (document.images['bonnesAffaires'])
		document.images['bonnesAffaires'].src = '/commun/images/finaref_V3/nav_gauche/bonnesAffaires.gif';
	if (document.images['espaceConseil'])
		document.images['espaceConseil'].src = '/commun/images/finaref_V3/nav_gauche/espaceConseil.gif';
}

/*
DezinerFolio.com Simple Accordians.

Author  : G.S.Navin Raj Kumar
Website : http://dezinerfolio.com

*/

/*
* The Variable names have been compressed to achive a higher level of compression.
*/

// Prototype Method to get the element based on ID

function GEBI(d){
	return document.getElementById(d);
}


// set or get the current display style of the div
function dsp(d,v){
	if(v==undefined){
		if (d.style == undefined) {
			return 'none';
		} else {
			return d.style.display;
		}
	}else{
		d.style.display=v;
	}
}

// set or get the height of a div.
function sh(d,v){
	// if you are getting the height then display must be block to return the absolute height
	if(v==undefined){
		if(dsp(d)!='none'&& dsp(d)!=''){
			return d.offsetHeight;
		}
		viz = d.style.visibility;
		d.style.visibility = 'hidden';
		o = dsp(d);
		dsp(d,'block');
		r = parseInt(d.offsetHeight);
		dsp(d,o);
		d.style.visibility = viz;
		return r;
	}else{
		d.style.height=v;
	}
}
/*
* Variable 'S' defines the speed of the accordian
* Variable 'T' defines the refresh rate of the accordian
*/
s=7;
t=10;

//Collapse Timer is triggered as a setInterval to reduce the height of the div exponentially.
function ct(d){
	d = GEBI(d);
	if(sh(d)>0){
		v = Math.round(sh(d)/d.s);
		v = (v<1) ? 1 :v ;
		v = (sh(d)-v);
		sh(d,v+'px');
		d.style.opacity = (v/d.maxh);
		d.style.filter= 'alpha(opacity='+(v*100/d.maxh)+');';
	}else{
		sh(d,0);
		dsp(d,'none');
		clearInterval(d.t);
	}
	
}

//Expand Timer is triggered as a setInterval to increase the height of the div exponentially.
function et(d){
	
	d = GEBI(d);
	if(sh(d)<d.maxh){
		v = Math.round((d.maxh-sh(d))/d.s);
		v = (v<1) ? 1 :v ;
		v = (sh(d)+v);
		sh(d,v+'px');
		d.style.opacity = (v/d.maxh);
		d.style.filter= 'alpha(opacity='+(v*100/d.maxh)+');';
	}else{
		sh(d,d.maxh);
		clearInterval(d.t);
	}

	
}

// Collapse Initializer
function cl(d){
	
	if(dsp(d)=='block'){
		clearInterval(d.t);
		d.t=setInterval('ct("'+d.id+'")',t);
	}
}

//Expand Initializer
function ex(d){
	if(dsp(d)=='none'){
		dsp(d,'block');
		d.style.height='0px';
		clearInterval(d.t);
		d.t=setInterval('et("'+d.id+'")',t);
	}
}

//Expand Initializer for error
function ex2(d){
	d.t=setInterval('et("'+d.id+'")',t);
}

// Removes Classname from the given div.
function cc(n,v){
	s=n.className.split(/\s+/);
	for(p=0;p<s.length;p++){
		if(s[p]==v+n.tc){
			s.splice(p,1);
			n.className=s.join(' ');
			break;
		}
	}
}
//Accordian Initializer
function Accordian(d,s,tc){

	// get all the elements that have id as content
	var divContenant = GEBI(d);
	l = document.getElementsByTagName('div');
	
	c=[];
	for(i=0;i<l.length;i++){
		h=l[i].id;
		if(h.substr(h.indexOf('-')+1,h.length)=='content'){c.push(h);}
	}
	sel=null;
	//then search through headers
	for(i=0;i<l.length;i++){
		h=l[i].id;
		if(h.substr(h.indexOf('-')+1,h.length)=='header'){
			d=GEBI(h.substr(0,h.indexOf('-'))+'-content');
			d.style.display='none';
			d.style.overflow='hidden';
			d.maxh =sh(d);
			d.s=(s==undefined)? 7 : s;
			h=GEBI(h);
			h.tc=tc;
			h.c=c;
			// set the onclick function for each header.
			h.onclick = function(){
				for(i=0;i<this.c.length;i++){
					
					cn=this.c[i];
					n=cn.substr(0,cn.indexOf('-'));
					if((n+'-header')==this.id){
						if (GEBI(n+'-content').style == undefined){
							ex(GEBI(n+'-content'));
							n=GEBI(n+'-header');
							cc(n,'__');
							n.className=n.className+' '+n.tc;
						} else if (GEBI(n+'-content').style.display=='block'){
							cl(GEBI(n+'-content'));
							cc(GEBI(n+'-header'),'');
							changeEntete(n+'-header');
						} else {												
							ex(GEBI(n+'-content'));
							n=GEBI(n+'-header');
							cc(n,'__');
							n.className=n.className+' '+n.tc;
						}
					}else{
						cl(GEBI(n+'-content'));
						cc(GEBI(n+'-header'),'');
					}
				}
			}
			if(h.className.match(/selected+/)!=undefined){ sel=h;}
		}
	}
	if(sel!=undefined){sel.onclick();}
}
// End Accordion script

function Validate_session(){
	if (!IsCountNumber(document.Identification.n_compte)){
		document.getElementById('erreur').innerHTML = 'Le format du numero de compte est invalide';
		ex2(document.getElementById('erreur'));
		return false;
	}
	if (!IsPassword(document.Identification.code)){
		document.getElementById('erreur').innerHTML = 'Merci de recommencer en utilisant votre mot de passe sur 4 chiffres ou, si vous n\'en avez pas encore créé, votre date de naissance sur 6 chiffres.<br /><br />Exemple : 190875 si vous êtes né(e) le 19 août 1975.';
		ex(document.getElementById('erreur'));
		return false;
	}					
	//document.Identification.submit();
	return true;
}

//DIALOGBOX DEBUT

// global variables //
var TIMER = 5;
var SPEED = 5;
var WRAPPER = 'ctn_page';

// calculate the current window width //
function pageWidth() {
  return window.innerWidth != null ? window.innerWidth : document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body != null ? document.body.clientWidth : null;
}

// calculate the current window height //
function pageHeight() {
  return window.innerHeight != null? window.innerHeight : document.documentElement && document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body != null? document.body.clientHeight : null;
}

// calculate the current window vertical offset //
function topPosition() {
  return typeof window.pageYOffset != 'undefined' ? window.pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ? document.body.scrollTop : 0;
}

// calculate the position starting at the left of the window //
function leftPosition() {
  return typeof window.pageXOffset != 'undefined' ? window.pageXOffset : document.documentElement && document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ? document.body.scrollLeft : 0;
}

// build/show the dialog box, populate the data and call the fadeDialog function //
function showDialog(title,message,type,autohide) {
  if(!type) {
    type = 'error';
  }
  var dialog;
  var dialogheader;
  var dialogclose;
  var dialogtitle;
  var dialogcontent;
  var dialogmask;
  if(!document.getElementById('dialog')) {
    dialog = document.createElement('div');
    dialog.id = 'dialog';
    dialogheader = document.createElement('div');
    dialogheader.id = 'dialog-header';
    dialogtitle = document.createElement('div');
    dialogtitle.id = 'dialog-title';
    dialogclose = document.createElement('div');
    dialogclose.id = 'dialog-close'
    dialogcontent = document.createElement('div');
    dialogcontent.id = 'dialog-content';
    dialogmask = document.createElement('div');
    dialogmask.id = 'dialog-mask';
    document.body.appendChild(dialogmask);
    document.body.appendChild(dialog);
    dialog.appendChild(dialogheader);
    dialogheader.appendChild(dialogtitle);
    dialogheader.appendChild(dialogclose);
    dialog.appendChild(dialogcontent);;
    dialogclose.setAttribute('onclick','hideDialog()');
    dialogclose.onclick = hideDialog;
  } else {
    dialog = document.getElementById('dialog');
    dialogheader = document.getElementById('dialog-header');
    dialogtitle = document.getElementById('dialog-title');
    dialogclose = document.getElementById('dialog-close');
    dialogcontent = document.getElementById('dialog-content');
    dialogmask = document.getElementById('dialog-mask');
    dialogmask.style.visibility = "visible";
    dialog.style.visibility = "visible";
  }
  dialog.style.opacity = .00;
  dialog.style.filter = 'alpha(opacity=0)';
  dialog.alpha = 0;
  var width = pageWidth();
  var height = pageHeight();
  var left = leftPosition();
  var top = topPosition();
  var dialogwidth = dialog.offsetWidth;
  var dialogheight = dialog.offsetHeight;
  var topposition = top + (height / 3) - (dialogheight / 2);
  var leftposition = left + (width / 2) - (dialogwidth / 2);
  dialog.style.top = 50 + "px";
  dialog.style.left = leftposition + "px";
  dialogheader.className = type + "header";
  dialogtitle.innerHTML = title;
  dialogcontent.className = type;
  dialogcontent.innerHTML = message;
  var content = document.getElementById(WRAPPER);
  dialogmask.style.height = content.offsetHeight + 'px';
  dialog.timer = setInterval("fadeDialog(1)", TIMER);
  if(autohide) {
    dialogclose.style.visibility = "hidden";
    window.setTimeout("hideDialog()", (autohide * 1000));
  } else {
    dialogclose.style.visibility = "visible";
  }
}

// hide the dialog box //
function hideDialog() {
  var dialog = document.getElementById('dialog');
  clearInterval(dialog.timer);
  dialog.timer = setInterval("fadeDialog(0)", TIMER);
}

// fade-in the dialog box //
function fadeDialog(flag) {
  if(flag == null) {
    flag = 1;
  }
  var dialog = document.getElementById('dialog');
  var value;
  if(flag == 1) {
    value = dialog.alpha + SPEED;
  } else {
    value = dialog.alpha - SPEED;
  }
  dialog.alpha = value;
  dialog.style.opacity = (value / 100);
  dialog.style.filter = 'alpha(opacity=' + value + ')';
  if(value >= 99) {
    clearInterval(dialog.timer);
    dialog.timer = null;
  } else if(value <= 1) {
    dialog.style.visibility = "hidden";
    document.getElementById('dialog-mask').style.visibility = "hidden";
    clearInterval(dialog.timer);
  }
}
//DIALOG BOX FIN
function Imprimer(Page)
{
Page.focus();
Page.print();
}

function menu(){
	
	if (document.getElementById('nav_left')) {
		var mg = document.getElementById('nav_left');
		var divs = mg.getElementsByTagName('div');
		for(var i=0; i < divs.length; i++){
			var reg = new RegExp("ferme$");
			var reg2 = new RegExp("ouvert$");
			if(reg.test(divs[i].id)){
				divs[i].onmouseover=function(){
					this.title = "Cliquer pour déplier ou replier";
				};
				divs[i].onclick=function(){
	
					// Repli des éléments animés 		
					if (this.className == "no-accordeon") {
						if (document.getElementById('MGOnglet-content'))
							cl(document.getElementById('MGOnglet-content'));
						if (document.getElementById('MGOnglet2-content'))
							cl(document.getElementById('MGOnglet2-content'));
						if (document.getElementById('MGOnglet3-content'))
							cl(document.getElementById('MGOnglet3-content'));
						if (document.getElementById('MGOnglet4-content'))
							cl(document.getElementById('MGOnglet4-content'));
						initialiseEntetes();
					}
	
					this.style.display="none";
					var idATrouver = this.id.replace(reg,"ouvert");
	
					if (document.getElementById(idATrouver))
						document.getElementById(idATrouver).style.display="block";
	
					if(idATrouver=="espace_mobile_ouvert"){
						if (document.getElementById("inputMobile")) {
							//document.getElementById("inputMobile").value="";
							document.getElementById("inputMobile").focus();
						}
					}
	
					if(idATrouver=="bons_plans_ouvert"){
						if (document.getElementById("inputMail")) {
							document.getElementById("inputMail").value="";
							document.getElementById("inputMail").focus();
						}
					}
					var divs2 = mg.getElementsByTagName('div');
	
					for(var j=0; j<i; j++){
						if(reg.test(divs2[j].id)){
							var fin = divs2[j].id.replace(reg,"ouvert");
							if(idATrouver!=fin){
								if (document.getElementById(fin))
									document.getElementById(fin).style.display="none";
								if (document.getElementById(divs2[j].id))
									var id3 = document.getElementById(divs2[j].id).id.replace(reg2,"ferme");
								if (document.getElementById(id3))
									document.getElementById(id3).style.display="block";
							}
						}
					}
	
					for(var j=i; j<divs.length; j++){
						if(reg.test(divs2[j].id)){
							var fin = divs2[j].id.replace(reg,"ouvert");
							if(idATrouver!=fin){
								if (document.getElementById(fin))
									document.getElementById(fin).style.display="none";
								if (document.getElementById(divs2[j].id))
									var id3 = document.getElementById(divs2[j].id).id.replace(reg2,"ferme");
								if (document.getElementById(id3))
									document.getElementById(id3).style.display="block";
							}
						}
					}
	
					if (document.getElementById(idATrouver+"_titre")) {
						document.getElementById(idATrouver+"_titre").onclick=function(){
							if (document.getElementById(idATrouver))
								document.getElementById(idATrouver).style.display="none";
							var id2 = idATrouver.replace(reg2,"ferme");
							if (document.getElementById(id2))
								document.getElementById(id2).style.display="block";
						};
					}
	
				};
			}
		}
		new Accordian('nav_left',2,'header_highlight');
	}
}


function clearInput() {
	if(document.Identification.n_compte.value=="Numéro de compte") {
		document.Identification.n_compte.value="";
	}
}
function fillInput() {
	if(document.Identification.n_compte.value=="") {
		document.Identification.n_compte.value="Numéro de compte";
	}
	
}

function fermeAgent(){
	var reg = new RegExp("ferme$");
	var reg2 = new RegExp("ouvert$");
	var id="votreConseiller_ouvert";
	if (document.getElementById(id)) {
		document.getElementById(id).style.display="none";
		var id2 = document.getElementById(id).id.replace(reg2,"ferme");
		document.getElementById(id2).style.display="block";
	}
}

function openPopupWebGallery(tel) {
	window.open('http://www.webtogallery.fr/templates/message.jsp?option=&service=Finaref&msisdn=' + tel, 'fenetre_popup', 'scrollbars=no,menubar=no,width=420,height=700,resizable=yes,toolbar=no,location=no,status=no');
	return false;
}

LancerMenu = true;