/* MRM function*/
    var currentId = 0;
    
    /* Ouverture de popup centrée, auto-adaptée si écran trop petit */
function CenterPopup(winURL,winName,winWidth,winHeight,winScroll,winResize){
	winResize=(!winResize)?0:winResize;
	winHeight=(winWidth>screen.width-30&&winScroll==0)?winHeight+16:winHeight; winWidth=(winHeight>screen.height-20&&winScroll==0)?winWidth+16:winWidth;
	winScroll=((winHeight>screen.height-30)||(winWidth>screen.width-30))?1:winScroll;
	winHeight=Math.min(winHeight,screen.height-30); winWidth=Math.min(winWidth,screen.width-20);
	winLeft = (screen.width-winWidth)/2-5;	winTop = (screen.height-winHeight)/2-15;
	return window.open(winURL,winName,"width=" + winWidth + ",height=" + winHeight + ",left=" + winLeft + ",top=" + winTop + ",scrollbars=" + winScroll + ",resizable="+winResize+",copyhistory=no");
}
//-- open popup --
function OpenPopup(l,h,r,s,ln) {
	maywp = CenterPopup(ln,'',l,h,s,r);
	maywp.focus();
}

    function setCurrentNav(id) {
    if (currentId != id)
    {      
      currentId = id;
      if(document.getElementById('nav2_'+id) != null)
      {
        document.getElementById('nav2_'+id).style.display="block";
      }
      
      if(document.getElementById('navImg_'+id) != null)
      {		
        var imgSrc = document.getElementById('navImg_'+id).src;
        var reg = new RegExp(".png", "i");
        var reg2 = new RegExp("_roll.png", "i");
        imgSrc = imgSrc.replace(reg2, ".png");
        imgSrc = imgSrc.replace(reg, "_roll.png");
        document.getElementById('navImg_'+id).src = imgSrc;
      }
    }
	}
	
	function displayNav(id) {
		if(id != currentId)
	    {
            
    		if(document.getElementById('nav2_'+id) != null)
    	    {
    	       document.getElementById('nav2_'+id).style.display="block";
    	       if(document.getElementById('nav2_'+currentId) != null)
        	    {
      	         document.getElementById('nav2_'+currentId).style.display="none";
              }
          }
            
          if(document.getElementById('navImg_'+id) != null)
          {		
          		var imgSrc = document.getElementById('navImg_'+id).src;
          		var reg = new RegExp(".png", "i");
          		var reg2 = new RegExp("_roll.png", "i");
              imgSrc = imgSrc.replace(reg2, ".png");
              imgSrc = imgSrc.replace(reg, "_roll.png");
              document.getElementById('navImg_'+id).src = imgSrc;
          }
      }
	}
	function closeNav(id) {
	    if(id != currentId)
	    {
	       if(document.getElementById('nav2_'+currentId) != null)
    	    {
    	       document.getElementById('nav2_'+currentId).style.display="block";
            }
    		if(document.getElementById('nav2_'+id) != null)
    	    {
    	       document.getElementById('nav2_'+id).style.display="none";
            }
    		if(document.getElementById('navImg_'+id) != null)
            {
        		var imgSrc = document.getElementById('navImg_'+id).src;
        		var reg = new RegExp("_roll.png", "i");
                imgSrc = imgSrc.replace(reg, ".png");
                document.getElementById('navImg_'+id).src = imgSrc;
            }
        }
	}
	
	function LoadDropDownList(idList1, idList2)
    {
       var selectList= document.getElementById(idList1);
       if(selectList!= null)
       {
           for(i=0; i < navTransvers1.length; i++)
           {
               selectList.options[i] = new Option(navTransvers1[i][1],navTransvers1[i][2]);
               if(navTransvers1[i][0] == IdTranversPage1)
               {
                   selectList.options[i].selected = true;
               }
           }
           RefreshDropDownList(idList2, selectList.selectedIndex);
       }
    }
    
    function RefreshDropDownList(idList, index)
    {
       var selectList = document.getElementById(idList);
       if(selectList != null)
       {
           for (i = 0; i < selectList.options.length; i++)
           {
               selectList.options[i] = null;
           }
           selectList.options.length = 0;
           if( navTransvers2[index].length == 0)
           {
               selectList.options[0] = new Option('','');
           }
           for(i=0; i < navTransvers2[index].length; i++)
           {
               selectList.options[i] = new Option(navTransvers2[index][i][1],navTransvers2[index][i][2]);
               if(navTransvers2[index][i][0] == IdTranversPage2)
               {
                   selectList.options[i].selected = true;
               }
           }
       }
    }
	
	function LoadNavTransversal(idList, selectID)
    {
        var selectList= document.getElementById(idList);
        if(selectList!= null)
        {
            for(i=0; i < navTransvers.length; i++)
            {
                selectList.options[i] = new Option(navTransvers[i][1],navTransvers[i][2]);
                if(navTransvers[i][0] == selectID)
                {
                    selectList.options[i].selected = true;
                }
            }
        }
    }
    
    function LoadNavSites(idList, selectID)
    {
        var selectList= document.getElementById(idList);
        if(selectList!= null)
        {
            for(i=0; i < navSites.length; i++)
            {
                selectList.options[i] = new Option(navSites[i][1],navSites[i][2]);
                if(navSites[i][0] == selectID)
                {
                    selectList.options[i].selected = true;
                }
            }
        }
    }
    
    function GoToSelectedPage(url)
    {
        window.location.replace(url);
    }
    
  function displayCrotiche(color,text) {
	   if(document.getElementById('BlockCrotiche') != null)
	   {
  			document.getElementById('BlockCrotiche').style.marginLeft="0px";
  			
  			var i = 0;
  			while(color[i])
  			{
    			if(document.getElementById('Ccolor'+i) != null)
    			{
    			 document.getElementById('Ccolor'+i).style.background=color[i];
          }
          i = i+1;
        }
        if(document.getElementById('Ctext') != null)
        {
          document.getElementById('Ctext').innerHTML=text;
        }
			}
	}
	
	function closeCrotiche() {
    if(document.getElementById('BlockCrotiche') != null)
    {
      document.getElementById('BlockCrotiche').style.marginLeft="-2000px";
    }
	}

	function OpenCloseTips(mydd) {
		var mydiv = document.getElementById(mydd);
		if(mydiv.style.display == "block") {
			mydiv.style.display="none";
		} else {
			mydiv.style.display="block";
		}
	}
/*-Javascript autorégénéré- A modifier à la source -*/

// textscroll by rod morelos (rod@dhtmlcentral.com) www20.brinkster.com/viewsrc 
// keep these two lines and you're free to use this code

// variables to set:
var scrollstep=30; // the speed of the timeout between each scroll
var scrollables=8; // number of scrollable content

// variables not to set:
var scrolltimer=0; // timer variable for vscroll function

// vertical scroll
function vscroll(num,speed)
{
if (isloaded)
{
if ((speed>0&&ocontent[num].y>-ocontent[num].h+ocontainer[num].h)||(speed<0 && ocontent[num].y<0)) ocontent[num].moveto(0,ocontent[num].y-speed);
scrolltimer=setTimeout('vscroll('+num+','+speed+')',scrollstep);
}
}

// horizontal scroll // patch
function hscroll(num,speed)
{
if (isloaded)
{
if ((speed>0&&ocontent[num].x>-ocontent[num].w+ocontainer[num].w)||(speed<0 && ocontent[num].x<0)) ocontent[num].moveto(ocontent[num].x-speed,0);
scrolltimer=setTimeout('hscroll('+num+','+speed+')',scrollstep);
}
}

// disable scroll
function noscroll() { clearTimeout(scrolltimer); }

// initialise function
var isloaded=false;
/*
ocontainer=new Array();
ocontent=new Array();
oup=new Array();
odown=new Array();
*/
var scrollinitialized=0;
function init()
{
if (scrollinitialized!=0) return true;
// patch : maintenant scrollables = Max de div que la fonction peut gérer
for (var i=1;i<=scrollables;i++)
  if (MM_findObj('divcontainer'+i)==null) scrollables=i-1;
ocontainer=new Array();
ocontent=new Array();
oup=new Array();
odown=new Array();
oright=new Array();
oleft=new Array();
for (var i=1;i<=scrollables;i++)
{
ocontainer[i]=new dhtmlobject('divcontainer'+i);
ocontent[i]=new dhtmlobject('divcontent'+i);
if (d.getElementById('divup'+i)) { // Ryad vérification d'existance div
	oup[i]=new dhtmlobject('divup'+i);
	odown[i]=new dhtmlobject('divdown'+i);
	if (ocontent[i].h > ocontainer[i].h) { oup[i].setv(1); odown[i].setv(1); }
	else if (ocontainer[i].h >= ocontent[i].h) { oup[i].setv(0); odown[i].setv(0); } // Ryad : Modif de > en >=
}
/* patch : scroll horizondal */
if (d.getElementById('divleft'+i)) {
	oleft[i]=new dhtmlobject('divleft'+i);
	oright[i]=new dhtmlobject('divright'+i);
	if (ocontent[i].w > ocontainer[i].w) { oright[i].setv(1); oleft[i].setv(1); } // Ryad : >= à cause de mozilla
	else if (ocontainer[i].w >= ocontent[i].w) { oright[i].setv(0); oleft[i].setv(0); }
}
if (bw.ns6) ocontent[i].css.position='relative'; // scrollbar hack for ns6
ocontent[i].moveto(0,0);
ocontainer[i].setv(1);
}
isloaded=true;
}

function hideshow_scroll(snum,vis) {
if (ocontent[snum].h > ocontainer[snum].h) { oup[snum].setv(vis); odown[snum].setv(vis); }
else if (ocontainer[snum].h > ocontent[snum].h) { oup[snum].setv(0); odown[snum].setv(0); }
ocontent[snum].moveto(0,0);
ocontent[snum].setv(vis);
ocontainer[snum].setv(vis);
}
function showthisscroll() {
init();
scrolltoshow=(arguments.length==0||isNaN(arguments[0]))?1:arguments[0];
for (var i=1;i<=scrollables;i++)
	hideshow_scroll(i,((i==scrolltoshow)?1:0));
}
// initiate script on page load
onload=init;


/*-Javascript autorégénéré- A modifier à la source -*/

// CODE SCROLLTEXT
// dhtml library by rod morelos (rod@dhtmlcentral.com) www20.brinkster.com/viewsrc 
// keep these two lines and you're free to use this code

// last updated: 08.12.2002

// note: "standards" compliant browsers only!
/*
if (!document.getElementById) { window.location.href='http://www.webstandards.org/upgrade/'; }
*/

// typesavers
var d=document;

// utilities
function px(n) { return (isNaN(n)||window.opera)?n:Math.round(n)+'px'; }
function r(n) { return (Math.round(Math.random()*n)); }
function rand(a,b) { return (Math.round(Math.random()*(b-a)))+a; }
function between(a,n,b) { return ((n>Math.min(a,b))&&(n<Math.max(a,b))); }
function undef(v) { var u; return v==u; }
function redraw() { setTimeout('window.location.reload()',200); }

// browser object; browser check
function browserobject()
{
this.ver=navigator.appVersion.toLowerCase();
this.agent=navigator.userAgent.toLowerCase();
this.dom=d.getElementById?1:0;
this.op6=(this.agent.indexOf('opera 6')>-1||this.agent.indexOf('opera/6')>-1)?1:0;
this.ie5=(this.agent.indexOf('msie 5')>-1&&this.dom&&!this.op6)?1:0;
this.ie5mac=(this.ie5&&this.agent.indexOf('mac')>-1)?1:0;
this.ie6=(this.agent.indexOf('msie 6')>-1&&this.dom&&!this.op6)?1:0;
this.ns6=(this.agent.indexOf('mozilla')>-1&&this.dom&&this.agent.indexOf('gecko')>-1)?1:0;
this.ie=(this.ie5||this.ie6||this.ie5mac);
this.ns=(this.ns6);
this.bw=(this.ie||this.ns||this.op6);
return this;
}
var bw=new browserobject();

// page object; document/window related functions
function pageobject()
{
this.mouseX=0; this.mouseY=0; // page coordinates
this.layerX=0; this.layerY=0; // element coordinates
this.mozscrollbar=bw.ns6?18:0; // ns6/mozilla scrollbar size
return this;
}
var opage=new pageobject();

// get mouse coordinates
pageobject.prototype.mouse=function(e)
{
if (undef(e)) e=window.event;
if (undef(e.layerX)) this.layerX=e.offsetX; else this.layerX=e.layerX;
if (undef(e.layerY)) this.layerY=e.offsetY; else this.layerY=e.layerY;
if (!undef(e.clientX)) this.mouseX=e.clientX+this.scrollLeft();
if (!undef(e.clientY)) this.mouseY=e.clientY+this.scrollTop();
if (bw.ie5mac) { this.layerX=this.layerX+this.scrollLeft(); this.layerY=this.layerY+this.scrollTop(); }
};

// get page scroll left
pageobject.prototype.scrollLeft=function()
{
if (!undef(d.body.scrollLeft)) return d.body.scrollLeft;
else if (!undef(window.scrollX)) return window.scrollX;
};

// get page scroll top
pageobject.prototype.scrollTop=function()
{
if (!undef(d.body.scrollTop)) return d.body.scrollTop;
else if (!undef(window.scrollY)) return window.scrollY;
};

// get page width
pageobject.prototype.w=function()
{
if (d.body&&d.body.clientWidth) return d.body.clientWidth+this.scrollLeft();
else if (window.innerWidth) return window.innerWidth+this.scrollLeft();
};

// get page height
pageobject.prototype.h=function()
{
if (d.body&&d.body.clientHeight) return d.body.clientHeight+this.scrollTop();
else if (window.innerHeight) return window.innerHeight+this.scrollTop();
};

// disable link focus outlines
pageobject.prototype.nofocus=function()
{
lnk=d.getElementsByTagName?d.getElementsByTagName('a'):d.links?d.links:null;
if (lnk) { for (var l=0;lnk[l];l++) { ae(lnk[l],'focus',new Function('lnk['+l+'].blur()'),true); } }
};

// dhtml object; makes cross-browser object
function dhtmlobject(obj)
{
this.el=d.getElementById?d.getElementById(obj):null;
//if (undef(this.el)) alert(obj);
this.css=this.el.style;
this.obj=obj+'Object'; eval(this.obj+'=this');
this.x=this.el.offsetLeft?this.el.offsetLeft:0;
this.y=this.el.offsetTop?this.el.offsetTop:0;
this.w=this.el.offsetWidth?this.el.offsetWidth:0;
this.h=this.el.offsetHeight?this.el.offsetHeight:0;
this.z=this.css.zIndex?this.css.zIndex:0;
this.opaq=100; this.fadetimer=0;
return this;
}

// update function; get left, top, width and height of element again.
dhtmlobject.prototype.update=function()
{
this.x=this.el.offsetLeft?this.el.offsetLeft:parseInt(this.css.left)?parseInt(this.css.left):0;
this.y=this.el.offsetTop?this.el.offsetTop:parseInt(this.css.top)?parseInt(this.css.top):0;
this.w=this.el.offsetWidth?this.el.offsetWidth:parseInt(this.css.width)?parseInt(this.css.width):0;
this.h=this.el.offsetHeight?this.el.offsetHeight:parseInt(this.css.height)?parseInt(this.css.height):0;
};

// set layer visibility property: 0 = hidden; 1 = visible
dhtmlobject.prototype.setv=function(v) { this.css.visibility=(v==0)?'hidden':'visible'; };
dhtmlobject.prototype.getv=function() { return (this.css.visibility!='hidden'); };

// set layer display property
dhtmlobject.prototype.setd=function(d) { this.css.display=d; };

// set layer opacity
dhtmlobject.prototype.seto=function(o)
{
// if (bw.ns6) this.css.setProperty('-moz-opacity',o/100,' ');
if (!undef(this.css.MozOpacity)) this.css.MozOpacity=(o/100);
else if (this.el.filters) this.css.filter='alpha(opacity='+o+')';
this.opaq=o;
};

// get layer opacity
dhtmlobject.prototype.geto=function()
{
// if (bw.ns6) return (this.css.getPropertyValue('-moz-opacity')*100);
if (!undef(this.css.MozOpacity)) return this.css.MozOpacity*100;
else if (this.el.filters) return this.el.filters.alpha.opacity;
};

// write text to layer and update width and height
dhtmlobject.prototype.write=function(text) { this.el.innerHTML=text; this.update(); };

// mozilla innerHTML function (similar to the write function above)
dhtmlobject.prototype.sethtml=function(text) { if (bw.ns6) { var r=d.createRange(); r.selectNodeContents(this.el); r.deleteContents(); var f=r.createContextualFragment(text); this.el.appendChild(f); this.update(); } };

// changes the foreground color of the layer
dhtmlobject.prototype.fg=function(color) { this.css.color=color; };

// changes the background color of the layer
dhtmlobject.prototype.bg=function(color) { this.css.backgroundColor=color; };

// attach a background image to the layer
dhtmlobject.prototype.bgimg=function(image) { this.css.backgroundImage='url('+image+')'; };

// set layer z-index
dhtmlobject.prototype.setz=function(z) { this.z=z; this.css.zIndex=this.z; };

// move layer to
dhtmlobject.prototype.moveto=function(x,y)
{
if (!undef(x)) { this.x=x; this.css.left=px(this.x); }
if (!undef(y)) { this.y=y; this.css.top=px(this.y); }
};

// move layer by
dhtmlobject.prototype.moveby=function(x,y) { this.moveto(this.x+x,this.y+y); };

// align layer relative to the page (use your keyboard's numeric keypad as reference)
// 7-8-9 = 7 is top left, 8 is top center and 9 is top right
// 4-5-6 = 4 is left center, 5 is center of page and 6 is right center
// 1-2-3 = 1 is bottom left, 2 is bottom center and 3 is bottom right
dhtmlobject.prototype.alignto=function(num)
{
if (num==1) this.moveto(0,opage.h()-this.h); // bottom left
if (num==2) this.moveto(opage.w()/2-this.w/2,opage.h()-this.h); // bottom center
if (num==3) this.moveto(opage.w()-this.w,opage.h()-this.h); // bottom right
if (num==4) this.moveto(0,opage.h()/2-this.h/2); // left center
if (num==5) this.moveto(opage.w()/2-this.w/2,opage.h()/2-this.h/2); // center of page
if (num==6) this.moveto(opage.w()-this.w,opage.h()/2-this.h/2); // right center
if (num==7) this.moveto(0,0); // top left
if (num==8) this.moveto(opage.w()/2-this.w/2,0); // top center
if (num==9) this.moveto(opage.w()-this.w,0); // top right
};

// set layer width
dhtmlobject.prototype.setw=function(w) { this.w=w; this.css.width=px(this.w); };

// set layer height
dhtmlobject.prototype.seth=function(h) { this.h=h; this.css.height=px(this.h); };

// get layer width
dhtmlobject.prototype.getw=function()
{
if (this.el.offsetWidth) return this.el.offsetWidth;
else if (parseInt(this.css.width)) return parseInt(this.css.width);
else return 0;
};

// get layer height
dhtmlobject.prototype.geth = function()
{
if (this.el.offsetHeight) return this.el.offsetHeight;
else if (parseInt(this.css.height)) return parseInt(this.css.height);
else return 0;
};

// clip layer to
dhtmlobject.prototype.clipto=function(t,r,b,l,d)
{
if (t<0) t=0; if (r<0) r=0; if (b<0) b=0; if (l<0) l=0;
this.css.clip='rect('+px(t)+','+px(r)+','+px(b)+','+px(l)+')';
if (!undef(d)) { this.setw(r); this.seth(b); }
};

// fade animation functions
dhtmlobject.prototype.fadeto=function(target,step,time) { clearTimeout(this.fadetimer); this.fade(target,step,time); };
dhtmlobject.prototype.fade=function(target,step,time)
{
if (target>this.opaq) this.seto(this.opaq+step); else this.seto(this.opaq-step);
if (Math.abs(target-this.opaq)>step) { this.fadetimer=setTimeout(this.obj+'.fade('+target+','+step+','+time+')',time); }
else { this.seto(target); clearTimeout(this.fadetimer); }
};

// checks if the mouse pointer is over the element
dhtmlobject.prototype.ismouseover=function(e)
{
opage.mouse(e); mx=opage.mouseX; my=opage.mouseY; el=this.el;
while (el.parentNode.nodeName.toLowerCase()!='body') { el=el.parentNode; mx-=el.offsetLeft; my-=el.offsetTop; }
if (mx>=this.x&&(mx<=(this.x+this.w))&&my>=this.y&&(my<=(this.y+this.h))) return true; else return false;
};

dhtmlobject.prototype.isover=function(e)
{
htmlel=window.event?event.srcElement:e.target;
if (htmlel.nodeType==3||htmlel.tagName.toLowerCase()=='img') htmlel=htmlel.parentNode;
if (htmlel.id==this.el.id) return true; else return false;
};

// attach an event to an element
function ae(el,et,fn,cap)
{
if (el.addEventListener) { el.addEventListener(et,fn,cap); return true; }
else if (el.attachEvent) { var ae=el.attachEvent('on'+et,fn); return ae; }
else { el['on'+et]=fn; }
};

// detach an event from an element
function re(el,et,fn,cap)
{
if (el.removeEventListener) { el.removeEventListener(et,fn,cap); return true; }
else if (el.detachEvent) { var re=el.detachEvent('on'+et,fn); return re; }
else { el['on'+et]=null; }
};

// create an element
function ce(tag,id,sty,cl,nest)
{
if (d.createElement)
{
el=d.createElement(tag);
el.setAttribute('id',id);
if (bw.ie) el.style.cssText=sty;
else el.setAttribute('style',sty);
if (cl) el.className=cl;
if (nest) d.getElementById(nest).appendChild(el);
else d.body.appendChild(el);
}
}

// delete an element
function de(el,nest)
{
if (d.createElement&&d.getElementById(el))
{
if (nest) d.getElementById(nest).removeChild(d.getElementById(el));
else d.body.removeChild(d.getElementById(el));
}
}


// CODE ROLLOVER
function MM_swapImgRestore() { //v3.0
  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_preloadImages() { //v3.0
  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_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  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 addtofavorites(btnFavoritesName, alternateText) { 
	try {
		var SiteUrl = "http://"+window.location.host+"/";
		if ( window.sidebar )
			window.sidebar.addPanel(btnFavoritesName,SiteUrl,""); // ff
		else
			window.external.AddFavorite(SiteUrl,btnFavoritesName); // ie
	}
	catch(err) {
		alert(alternateText);
	}
}