if(navigator.userAgent.indexOf('Safari')>=0){

css = ".menu li a span { padding: 0.3em 0;  } #menu_sections { top: 24.8em } #menu_rubriques li a span { padding-top: 0.1em;  }  #contenu #article {  } #contenu #listExpos { margin-bottom: 1.3em } #pied-page small { font-size: 10px } #pied-page { padding-bottom: 0.5em; } #contenu #listExpos.expos .chapeau { width: 46em; } body { background: #fff url(../imgs/rouge.png) repeat-y; } #page { overflow: hidden } #accueil #page { height: 75em } #contenu #article .colg.first { top: 19px !important;   } #contenu #article #menuExpos {  } #contenu #article #menuExpos li a span{ ; float: left; border: 1px solid red; height: 20px } #contenu #article #menuExpos li a { display: block; float: left; border-right: 1px solid #fff; height: 15px }  ";

document.write('<style type="text/css">'+css+'</style>')

}

if(navigator.userAgent.indexOf('MSIE 6')>=0){

css = "body { background-position: 280px 0 } .focus#contenu { margin-top: 0; height: 608px }  .menu li a span { cursor: hand  }  #menu_sections { top: 24.55em } #menu_sections li a{ float: left;  } .menu li a span { ; line-height: 1.2em;  } #menu_focus { position: relative; width: auto; line-height: 3em } #page { width: auto;  }   #bandeau { display: none } #menu_focus li a{  margin-bottom: 0.3em;  }  #menu_sections li a.sect { padding-top: 0.3em; height: 2.2em; margin-right: 0; border-right: 1px solid #670011 } #liste-langues li a.sect { border-right: none; border-left: 1px solid #fff; left: -1px } #menu_sections #menu_rubriques ul { padding-bottom: 10px }  #menu_sections #section1 #menu_rubriques ul { margin-left: 0.55em } #menu_sections #menu_rubriques li.rubr { margin-top: 0; margin-bottom: -1px; position: relative } #menu_sections #menu_rubriques li.rubr {  margin-top: 3px;  } #menu_sections #menu_rubriques li.rubr a:hover { background: #eee } #menu_sections #menu_rubriques li.rubr a span { width: 119px; } #contenu { position: relative; top: -111px; margin-bottom: 0 } .menu01#contenu #article {margin-top: -13px }  #contenu #article {margin-top: -9px } #fiche .retour {  } #contenu #article {  }  #contenu #listExpos div ul {display: none; float: left;  } #contenu #listExpos div ul h3 { margin-bottom: 0;  }  #contenu #listExpos ul li a span.titreExpo { cursor: hand } #contenu {  } #article {  } #listExpos { border: 1px solid red; position: relative; top: 20px } #fiche #contenu .colg.first { margin-left: -22px !important;  margin-top: -23px !important  } #fiche #contenu .colg.plus { margin-top: 4px !important } #rubrique #contenu .colg { margin-left: -22px !important;   } #rubrique #contenu .colg.plus { margin-top: 2px !important }  #contenu #listExpos.expos ul li a span.blocTitre {  margin-bottom: 4px; margin-top: 0 } #contenu .publi#listExpos ul li a img{  width: 73px; height: 100px } #contenu .publi#listExpos ul li h3 { margin-bottom: -3px; float: left; } #contenu .events#listExpos ul li a.type { display: block; left: auto; top: 1px; position: relative; margin-bottom: -19px; left: 29px } #contenu #listExpos.events ul { padding-bottom: 10px; margin-bottom: 0; border-bottom: 10px solid #fff }  #currNav1, #currNav2 { background: #FD3500 !important; color: #fff !important }  #navRes2 { margin-top: 10px } #contenu .events#listExpos { margin-left: -3px !important; margin-top: 20px }  #rechEvent .crit { width: 6.9em;  }  #tout { margin-bottom: -15px !important  } #rechEvent {z-index: 2 } #rechEvent #rechDate fieldset select { width: 73px !important }  #contenu #listExpos.events li h3 span.titre { position: relative; margin-bottom: 20px } #contenu #listExpos.events li h3 { margin-bottom: 20px;   }  #contenu #listExpos.events li .chapeau { margin-top: -37px;} #contenu #listExpos.events ul.encours li h3, #contenu #listExpos.events ul.encours li .chapeau { margin-left: 17px;  } #contenu #listExpos.events ul.encours { margin-left: 15px;  } #contenu .events#listExpos ul.encours li a.type { left: 0 }  #pied-page { margin-top: -110px  }  #contenu #listExpos .chapeau { width: 46em !important }  #contenu #article #menuExpos { border: 1px none red;  }   #contenu #article #menuExpos ul, #contenu #article #menuExpos li {  }  #contenu #menuExpos li a { position: relative; width: 34px; padding: 0; display: block; float: left; cursor: pointer; } #contenu #menuExpos li a span { position: relative; width: 34px; display: block; float: left; } #contenu #listExpos { clear: both } a.prec  { padding-right: 20px; background: transparent url(../imgs/fleches/gauche-gris.png) no-repeat scroll right center !important } a.prec.numP:hover, a.prec.numP.currNav:hover  { background: transparent url(../imgs/fleches/gauche-gris.png) no-repeat scroll right center !important } a.currNav { background-image: none !important;   } a.numP:hover { background-image: none !important  }  #contenu #listEvents ul li a.type { left: 0   } #contenu.menu03 #pres_rub { position: relative !important;   z-index: 10; margin-top: -7.5em  }                                                                                                                                                                        #menu_sections #menu_rubriques li a {  float: none   }       #ifr {  left: 300px   }  #contenu #listExpos.publi img { height: auto !important;   }                                                                                                                                                                                                                                                                                                                                                ";


/*
css = ".boite { height: 21.3em; }  .menu li a span { cursor: hand  } #menu_sections li a span { width: 100%; } #pied-page {  } #accueil #pied-page {  } #fiche #images-expo { top: 4.5em; margin-left: 1em;  } #fiche #images-expo .image-expo { margin: 1em 0; margin-left: 2.7em; margin-right: 4.8em} #contenu #listExpos ul li a span.titreExpo{ width: 450px} #contenu #listExpos ul li a:hover * { cursor: hand} #contenu #listExpos ul li span.dateExpo { top: ; } #contenu #listExpos ul img { top: 3px;  } #accueil .focus#contenu #article {  top: 0 } #contenu #listExpos, #contenu #menuExpos { margin-left: 1px } ";
*/

document.write('<style type="text/css">'+css+'</style>')

}

if(navigator.userAgent.indexOf('MSIE 7')>=0){

css = "body { background-position: 280px 0 } #menu_focus { position: relative; width: auto; }   #bandeau { display: none }    #contenu { position: relative; top: -114px; margin-bottom: 0 } .menu01#contenu #article { }  #contenu #article {margin-top: -9px } #fiche #contenu #article {margin-top: -4px } #contenu #article {  }  #contenu #listExpos div ul {display: none; float: left;  } #contenu #listExpos div ul h3 { margin-bottom: 0;  }  #contenu #listExpos ul li a span.titreExpo { cursor: hand } #contenu {  } #article {  } #listExpos { border: 1px solid red; position: relative; top: 20px } #fiche #contenu .colg.first { margin-top: -23px !important  } #fiche #contenu .colg.plus { margin-top: 4px !important } #rubrique #contenu .colg {   } #rubrique #contenu .colg.plus { margin-top: 2px !important }  #contenu #listExpos.expos ul li a span.blocTitre {  margin-bottom: 4px; margin-top: 0 } #contenu .publi#listExpos ul li a img{  width: 73px; height: 100px } #contenu .publi#listExpos ul li h3 { margin-bottom: -3px; float: left; } #contenu .events#listExpos ul li a.type { display: block; left: auto; top: 1px; position: relative; margin-bottom: -19px; left: 29px; } #contenu #listExpos.events ul { padding-bottom: 10px; margin-bottom: 0; border-bottom: 10px solid #fff }  #currNav1, #currNav2 { background-color: #FD3500 !important; color: #fff !important }  #navRes2 { margin-top: 10px } #contenu .events#listExpos { margin-left: -3px !important; margin-top: 20px }  #rechEvent .crit { width: 6.9em;  }  #tout { margin-bottom: -15px !important  } #rechEvent {z-index: 2 } #rechEvent #rechDate fieldset select { width: 73px !important }  #contenu #listExpos.events li h3 span.titre { position: relative; margin-bottom: 20px } #contenu #listExpos.events li h3 { margin-bottom: 20px;   }  #contenu #listExpos.events li .chapeau { margin-top: -37px;} #contenu #listExpos.events ul.encours li h3, #contenu #listExpos.events ul.encours li .chapeau { margin-left: 17px;  } #contenu #listExpos.events ul.encours { margin-left: 15px;  } #contenu .events#listExpos ul.encours li a.type { left: 0 }  #pied-page { margin-top: -110px  }  #contenu #listExpos .chapeau { width: 46em !important }  #contenu #article #menuExpos { border: 1px none red;  }   #contenu #article #menuExpos ul, #contenu #article #menuExpos li {  }  #contenu #menuExpos li a { position: relative; width: 34px; padding: 0; display: block; float: left; cursor: pointer; } #contenu #menuExpos li a span { position: relative; width: 34px; display: block; float: left;visibility: hidden;  } #contenu #listExpos { clear: both } a.prec  { padding-right: 20px;  } a.prec.numP:hover, a.prec.numP.currNav:hover  {  } a.currNav {   } a.numP:hover {  }  #contenu #listEvents ul li a.type { left: 0   } #contenu.menu03 #pres_rub { position: relative !important;   z-index: 10; margin-top: -7.5em  }               #menu_sections #menu_rubriques ul { padding-bottom: 10px }  #menu_sections #section1 #menu_rubriques ul { margin-left: 0.55em; padding-top: 5px } #menu_sections #menu_rubriques li.rubr { margin-bottom: -2px } #menu_sections #menu_rubriques li.rubr a {  position: relative;   }  #menu_sections #menu_rubriques li.rubr a:hover { background: #eee } #menu_sections #menu_rubriques li.rubr a span { width: 119px; } #contenu #listEvents ul li a.type { left: 23px }  #menu_rubriques ul{   }      #menu_rubriques { border-top: 1px solid #fff !important;   }                                                                                                                                                                                                                                                                                                                                         ";



document.write('<style type="text/css">'+css+'</style>')

}

if(navigator.userAgent.indexOf('Gecko')>=0 && navigator.userAgent.indexOf('Win')>=0){

css = " #rechEvent .crit { width: 6.9em;  } #contenu h1 { margin-top: -2px  }";

document.write('<style type="text/css">'+css+'</style>')

}

if(navigator.userAgent.indexOf('Win')>=0){

css = "#contenu #listExpos .chapeau span { font-size: 11px !important; color: #666 } #contenu .paras { font-size: 12px; color: #666 } #contenu h4.dates { font-size: 11px }  #contenu .events#listExpos .chapeau { width: 48em }";

document.write('<style type="text/css">'+css+'</style>')

}

window.onload = init;


function init(){

	if(document.getElementById('listExpos')){
	
		//initListExpos();
	
	}

	if(document.getElementById('blocAnimFocus')){
	
		$('blocAnimFocus').style.visibility = "visible"
		Element.remove($('loader'))
	
	}

	if(navigator.userAgent.indexOf('MSIE')>=0){

		if(document.getElementById('listExpos')){

		$('listExpos').style.marginLeft = "0"
		}

		if(document.getElementById('dp-archives')){

		$('pres_rub').style.left = 0;
		}

	}


}


/*
function chckMinHeight(){

	h = $('anim2').offsetTop+400;
	if($('contenu').offsetHeight < h) { $('contenu').style.height = "583px" }
	 
}
*/
/*
function sldshw(n){

	sl = $('slideshow');
	
	imSl = sl.getElementsByTagName('img');
	imSl[n].style.display = "block"

	if(n==0){ 
	
		imSl[imSl.length-1].style.display = "none"
	
	}
	else {
	
		imSl[n-1].style.display = "none"
	
	}

	
	if(n==imSl.length-1){ 
	
		n = 0
	
	}
	else {
	
		n++
	
	}
	
	window.setTimeout('sldshw('+n+')',3000)
	

}
*/
/*
function initListExpos(){

	lE = $('listExpos').getElementsByTagName('a');
	
	$('listExpos').className = "unloaded"
	
	for(i=0;i<lE.length;i++){
	
		w1 = lE[i].getElementsByTagName('span')[0].offsetWidth;
		w2 = lE[i].getElementsByTagName('span')[1].offsetWidth;

		if(w1 < w2){ lE[i].className = 'variant2';}
	
	}
	
	$('listExpos').className = "";
	
	if($('menuExpos').parentNode.className=='encours'){
		$('open_Annee1').getElementsByTagName('a')[0].innerHTML = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
	}

}
*/

function swHd(d){

s = document.getElementById(d).style.display;

if(s == "block"){ferm(d)}
else {ouvr(d)}

}

function ouvr(d){
d = document.getElementById(d);
d.style.display = "block"

}

function ferm(d){

d = document.getElementById(d);
d.style.display = "none"


}

// creation DOM du menu Expos par annee

function menuListExpo(){

	exposT = $('listExpos').getElementsByTagName('h2');

	anc = window.location.hash;
	if(anc!=""){anc=anc.substring(1,anc.length);}

	//if(exposT.length > 1){

		for(i=0;i<exposT.length;i++){
		
			expoT = exposT[i].innerHTML;
		
			// preselection de l'annee ouverte
			if(anc!="" && expoT==anc ){ iden = "open_Annee1"; aff_annee(i,0); }
			else if(!anc&&i==0){iden = "open_Annee1";}
			else{iden = "ann"+i}
		
			
			//
			
			
			
if(navigator.userAgent.indexOf('MSIE 6')<0){

nL = Builder.node('li',{id:iden},[Builder.node('a',{href:'#'+expoT,onclick:'aff_annee('+i+',this);',className:'a'+expoT},[Builder.node('span',{},[expoT])])]);	

}

else {

nL = Builder.node('li',{id:iden},[Builder.node('a',{href:'javascript:aff_annee('+i+',\''+iden+'\');',className:'a'+expoT},[Builder.node('span',{},[''])])]);	

}
//alert(nL.innerHTML)
			$('menuExpos').appendChild(nL)
		
		}

	//}

}


// fonction Montrer/Cacher les expos triees par annee

function aff_annee(n,t){


if(navigator.userAgent.indexOf('MSIE')>=0&&t!=0){

	t = $('menuExpos').getElementsByTagName('a')[i];

	bgIE = $('open_Annee2').getElementsByTagName('img');
	for(i=0;i<bgIE.length;i++){

	bgIE[i].style.display = "none";

	}
}		

	$('open_Annee2').id = "";
	$('listExpos').getElementsByTagName('div')[n].id = "open_Annee2";
	
	if(document.getElementById('open_Annee1')){
	
	}
	
	if(t!=0){
		
		$('open_Annee1').id = "";
		

		if(navigator.userAgent.indexOf('MSIE')>=0){
			$('menuExpos').getElementsByTagName('li')[n].id = 'open_Annee1';
			$('contenu').style.height = ""
			$('contenu').style.height = $('listExpos').getElementsByTagName('div')[n].offsetHeight+"px";
			
		}
		else{
			$(t).parentNode.id = 'open_Annee1';
		}
	
	}
if(navigator.userAgent.indexOf('MSIE')>=0&&t!=0){

	bgIE = $('open_Annee2').getElementsByTagName('img');
	for(i=0;i<bgIE.length;i++){

	bgIE[i].style.display = "inline";

	}

}

}


function suivPrec(n){

	el = "navRes"+n;
	elS = "currNav"+n;
	
	

	lk = $(el).getElementsByTagName('a');
	
	for(i=0;i<lk.length;i++){
	
		if(lk[i].id==elS){

			lk[0].setAttribute('href',lk[i-1].getAttribute('href'));
			lk[lk.length-1].setAttribute('href',lk[i+1].getAttribute('href'))
		
		}
	
	}

}


opRech = 0;

function sh(t){

	if(opRech!=0&&opRech!=$(t)){opRech.className=""}
	ett = $(t).className;
	$(t).className = ( ett == 'opRech' ) ? "" : "opRech";
	opRech = $(t);

	if(t.className = "crit"){
	
		mnOpen = ( ett == 'opRech' ) ? "0" : "1";
	
	}

}

function sh2(t1,t){

	
	ett = $(t).style.display;
	$(t).style.display = ( ett == 'block' ) ? "" : "block";
	t1.className = ( ett == 'block' ) ? "" : "on";
	
	if(t1.id = "btRech"){
	
		mnOpen = ( ett == 'block' ) ? "0" : "1";
	
	}
	
}

function fermRech(){

	if(opRech!=0){opRech.className=""}
	$('blocFormRech').style.display = "";
	$('btRech').className = "";

}

function lkTarget(t){

	nw = window.open(t.href,'','');
	nw.focus();
	
}

mnOpen = 0;


/*
function chckClick(event){

	if(navigator.userAgent.indexOf('MSIE')<0){

		if(mnOpen==1){ 
			elm = Event.element(event);
			if(elm.className!="noEffect"){
				fermRech()
			}
		}
	}
	else{
	alert(e.srcElement)
	}


*/


document.onclick = function(e) {

  // get either event (W3C) or

  // window event object (MSIE)

  e = e || window.event;

  // get either target (W3C) or event source (MSIE)

  var t = e.target || e.srcElement; 

		if(mnOpen==1){ 
			elm = t;
			if(elm.className!="noEffect"){
				fermRech()
			}
		}

}


function showBulles(){

$('imgboite1').src='../imgs/boite3.png'
$('mrAnim').style.visibility='hidden'
$('bulle1').style.display = "block";
$('bulle2').style.display = "block";
$('bulle3').style.display = "block";

}

function hideBulles(){

$('mrAnim').style.visibility='visible'
$('bulle1').style.display = "none";
$('bulle2').style.display = "none";
$('bulle3').style.display = "none";

}













