if (navigator.appVersion.indexOf("MSIE")>=0){
	var arVersion = navigator.appVersion.split("MSIE")
	var version = parseFloat(arVersion[1])
	if (version < 7){
		window.attachEvent("onload", correctPNG);
	}
}

function correctPNG() {// correctly handle PNG transparency in Win IE 5.5 & 6.
  var arVersion = navigator.appVersion.split("MSIE")
  var version = parseFloat(arVersion[1])
  if ((version >= 5.5) && (document.body.filters))
  {
     for(var i=0; i<document.images.length; i++)
     {
        var img = document.images[i]
        var imgName = img.src.toUpperCase()
        if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
        {
           var imgID = (img.id) ? "id='" + img.id + "' " : ""
           var imgClass = (img.className) ? "class='" + img.className + "' " : ""
           var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
           var imgStyle = "display:inline-block;" + img.style.cssText
           if (img.align == "left") imgStyle = "float:left;" + imgStyle
           if (img.align == "right") imgStyle = "float:right;" + imgStyle
           if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
           var strNewHTML = "<span " + imgID + imgClass + imgTitle
           + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
           + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
           + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
           img.outerHTML = strNewHTML
           i = i-1
        }
     }
  }
}

function printBrique(id)
{
window.open('/modules/print.php?id=' + id,'print','scrollbars=yes,resizeable=yes,menubar=no');
}

function checkIframe(){
//	if(window.document.title!='glossaire' || !window.opener) { // on est dans une popup glossaire => pas de cadre!!!
		if (this.document.location.href.indexOf("/content/") > 0){
			if (this.name == "awsiframe"){
				//todo bene
			}
			else{
				window.top.document.location.href = "/content/inter.php?ifile=/"+getAccessPath();
			}
		}
//	}
brique();
}

function getAccessPath(){
	var l_adresse = document.location.href;
	//on vire protocole ://
	l_adresse = l_adresse.substr(l_adresse.indexOf("://")+3);
	return l_adresse.substr(l_adresse.indexOf("/")+1);
}
// recherche
function update(obj) {
	if((obj.value=='Rechercher dans le site') || (obj.value=='rechercher dans le site') || (obj.value=='votre e-mail'))
		obj.value='';
}
function searchword() {
	if(document.getElementById('searchfield').value!='')
		openBrWindow('/frontoffice/recherche/result.php?keyword=' + document.getElementById('searchfield').value + "&site=" + document.getElementById('fsite').value,'searchWnd',620,400,'scrollbars=yes','true')
}
function dosearchfield(eventKeyCode) {
	if(eventKeyCode==13){
		searchword();
	}
}

// Ouverture du popup
function send(id) {
	srcHTML = window.opener.document.getElementById(id).innerHTML;
	document.getElementById('contenu').innerHTML = srcHTML;
}

function impression(id) {
	srcHTML = window.opener.document.getElementById(id).innerHTML;
	document.getElementById('contenu').innerHTML = srcHTML;
	window.print();
}

function printIt(obj) {
	divObj = getDivToProcess(obj);
	if(divObj!=null) {
		window.open('/modules/print.php?id=' + divObj.getAttribute('id'),'print','scrollbars=yes,resizeable=yes,menubar=no');
	} else {
		window.print();
	}
}

function sendIt(obj) {
	divObj = getDivToProcess(obj);
	if(divObj!=null) {
		window.open('/modules/sendfriend.php?id=' + divObj.getAttribute('id'),'send','scrollbars=yes,resizeable=yes,menubar=no');
	} else {
		window.alert('Fonctionnalité désactivée sur la page d\'impression');
	}
}

function getDivToProcess(obj) {
	val = null;
	while(obj.tagName!='div' && obj.tagName!='DIV' && obj.tagName!='body' && obj.tagName!='BODY') {
		obj = obj.parentNode;
	}
	id = obj.getAttribute('id');
	if (id == "" || id == null){
		return getDivToProcess(obj.parentNode);
	}
	
	if(id.match(/^div/) || id.match(/^bf/)) {
		val = obj;
	}
	return val;
}

function openBrWindow(theURL,winName,width,height,features,bCentre) {
  var window_width = width;
  var window_height = height;
  var newfeatures= "," + features;
  var window_top = (screen.height-window_height)/2;
  var window_left = (screen.width-window_width)/2;
	if(bCentre == 'false'){
		newWindow=window.open(''+ theURL + '',''+ winName +
'','width=' + window_width + ',height=' + window_height + newfeatures +
'');
	}else{
	  newWindow=window.open(''+ theURL + '',''+ winName +
'','width=' + window_width + ',height=' + window_height + ',top=' +
window_top + ',left=' + window_left + newfeatures + '');
	}
  newWindow.focus();
}
// Gestion des RollOvers
function img_RollOver(objSel, imgUrl){
	objSel.src = imgUrl;
}

// Gestion des RollOuts
function img_RollOut(objSel, imgUrl){
  objSel.src = imgUrl;
} 
	

// Gestion des RollOvers
function img_rollOver(objSel, imgUrl){
	objSel.src = imgUrl;
}

// Gestion des RollOuts
function img_rollOut(objSel, imgUrl){
  objSel.src = imgUrl;
} 
	
// Gestion du preload

function img_Preload(){
	var d=document;
	if(d.image){
		if(!d.tbImage) d.tbImage = new Array();
		var i,j=d.tbImage.length, a=img_preload.arguments;
		for(i=0;i<a.length;i++){
			if(a[i].indexOf("#")!=0){
					d.tbImage[j] = new Image;
					d.tbImage[j++].src=a[i];
			}
		}
	}
}

// les fonctions Js de dreamweaver
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 MM_jumpMenu(targ,selObj,restore){ //v3.0
 
  		openBrWindow(selObj.options[selObj.selectedIndex].value,'site','600','400','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes',true);

  if (restore) selObj.selectedIndex=0;
}
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function verifyCompatibleBrowser(){ 
    this.ver=navigator.appVersion 
    this.dom=document.getElementById?1:0 
    this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; 
    this.ie4=(document.all && !this.dom)?1:0; 
    this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
 
    this.ns4=(document.layers && !this.dom)?1:0; 
    this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5) 
    return this 
} 
bw=new verifyCompatibleBrowser() 
 
 
var speed=50 
 
var loop, timer 
 
function ConstructObject(obj,nest){ 
    nest=(!nest) ? '':'document.'+nest+'.' 
    this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0; 
    this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0; 
    this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight 
    this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight 
    this.up=MoveAreaUp;this.down=MoveAreaDown; 
    this.MoveArea=MoveArea; this.x; this.y; 
    this.obj = obj + "Object" 
    eval(this.obj + "=this") 
    return this 
} 
function MoveArea(x,y){ 
    this.x=x;this.y=y 
    this.css.left=this.x 
    this.css.top=this.y 
} 
 
function MoveAreaDown(move){
	if(this.y>-this.scrollHeight+objContainer.clipHeight){
    this.MoveArea(0,this.y-move) 
    if(loop) setTimeout(this.obj+".down("+move+")",speed) 
	} 
} 
function MoveAreaUp(move){ 
	if(this.y<0){ 
    this.MoveArea(0,this.y-move) 
    if(loop) setTimeout(this.obj+".up("+move+")",speed) 
	} 
} 
 
function PerformScroll(speed){ 
	if(initialised){ 
		loop=true; 
		if(speed>0) objScroller.down(speed) 
		else objScroller.up(speed) 
	} 
} 
 
function CeaseScroll(){ 
    loop=false 
    if(timer) clearTimeout(timer) 
} 

var initialised; 
function InitialiseScrollableArea(strContent, strContainer){ 
    objContainer= new ConstructObject(strContainer); 
    objScroller=new ConstructObject(strContent, strContainer) 
    objScroller.MoveArea(0,0) 
    objContainer.css.visibility='visible' 
    initialised=true; 
} 

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
function quizz(id) { 
if(id==3) window.opener.document.location='/content/situation%20energetique/énergies%20renouvelables/Panorama/';
if(id==2) window.opener.document.location='/content/situation%20energetique/bilans%20énergétiques/bilans%20départementaux%201999/';
if(id==1) window.opener.document.location='/content/Decouvrir%20energie/en%20savoir%20plus/';
window.close();
}
function awsprint() {
	if(bw.ns5) { // Correction BUG Moz
	// Impossible d'imprimer un long div positionné en absolu
	// Il es coupé.
		beforeprint()
		setTimeout("window.print(); afterprint()",1000)
	}
	else window.print();
/*	if(window.onafterprint==undefined) { // Moz and others
		beforeprint()
		setTimeout("window.print(); afterprint()",1000)
	}
	else { // IE
		window.print();
	}
*/
}

function beforeprint() {
	var tab_div = document.getElementsByTagName("DIV");
	for(elt in tab_div) {
		if(tab_div[elt].id) {
			var block = ""+tab_div[elt].id
			if(block=="content") tab_div[elt].style.overflow="visible"
			if(block=="space") tab_div[elt].style.overflow="visible"
			if(block.substring(0,3)=="div") tab_div[elt].style.overflow="visible"
			
			if(block=="content") tab_div[elt].style.position="relative"
			if(block=="space") tab_div[elt].style.position="relative"
			if(block.substring(0,3)=="div") tab_div[elt].style.position="relative"

			if(block.substring(0,3)=="div") tab_div[elt].style.top="0px"
			if(block.substring(0,3)=="div") tab_div[elt].style.left="0px"
		}
	}
}
function afterprint() {
	document.location = document.location.href
}
if(window.onbeforeprint!="undefined") window.onbeforeprint=beforeprint
if(window.onafterprint!="undefined") window.onafterprint=afterprint

// fonctions d'impression

function printActu() { // Imprime la liste des actus
var url=document.location.href.split("?")
window.open("/modules/actualite/print_actu.php?"+url[1]);
}

function printListeMu() { // Imprime la liste de musiciens

	var typeSearch = printListeMu.arguments[0];
	var bornePagination = printListeMu.arguments[1];
	if (bornePagination!="") addPaginationMu(bornePagination);
	var formu = getCurrentSearchMu(typeSearch);
	var oldaction = formu.action;
	formu.action="/modules/musiciens/print_listmu.php";
	formu.target="_blank";
	submitCurrentSearchMu(typeSearch);
	formu.action=oldaction;
	formu.target="_top";

}

function printMu(id) { // Imprime la fiche d'un musicien
window.open("/modules/musiciens/print_mu.php?id="+id);
}


function printListeRep() { // Imprime la liste des fiches répertoire

	var typeSearch = printListeRep.arguments[0];
	var bornePagination = printListeRep.arguments[1];
	if (bornePagination!="") addPaginationRep(bornePagination);
	var formu = getCurrentSearchRep(typeSearch);
	var oldaction = formu.action;
	formu.action="/modules/repertoires/print_listrep.php";
	formu.target="_blank";
	submitCurrentSearchRep(typeSearch);
	formu.action=oldaction;
	formu.target="_top";

}

function printRep(id) { // Imprime la fiche d'un répertoire
window.open("/modules/repertoires/print_rep.php?id="+id);
}
function ajustScroll() {
	var tab_div = document.getElementsByTagName("DIV");
	for(elt in tab_div) {
		if(tab_div[elt].id) {
			var block = ""+tab_div[elt].id
			if(block=="container"){
				hScroll = document.documentElement.clientHeight - tab_div[elt].offsetTop - 2;  // IE
				tab_div[elt].style.height=String(hScroll)+"px"
			}
		}
	}
	return true;
}
function brique() {
	if(eval(document.getElementById("content")) == null){
		return false; // pages non AWS - execution inutile
	}
	
	//divToExclude = "bf7733";
	divToExclude = "none of them";
	
	//alert("function brique()")
	var tab_div = document.getElementsByTagName("DIV");
	var previousButt = -9999;
	var previousEnd = -9999;
	var previousLeft = -9999;
	var previousIsZE = 0;
	for(elt in tab_div) {
		if(tab_div[elt].id) {
			var block = ""+tab_div[elt].id
			
			if (block != divToExclude){
				//alert("processing "+block);
			
				//if(block=="content") tab_div[elt].style.overflow="visible"
				//if(block=="space") tab_div[elt].style.overflow="visible"
				//if(block=="content") tab_div[elt].style.position="relative"
				//if(block=="space") tab_div[elt].style.position="relative"
				
				if(block.substring(0,2)=="ze"){
					/*
					// si brique vide, on la cache
					if (eval(document.getElementById('briquevide')) != null){
						if (document.getElementById('briquevide').parentNode.parentNode.id == block){
							alert(document.getElementById('briquevide').parentNode.parentNode.id);
							document.getElementById(block).style.top = "0px";
						}
						//alert(document.getElementById(block).childNodes[1].id);
					}
					*/
				}
	
				if(block.substring(0,2)=="bf"){
					if (previousIsZE == 1){
						//alert(tab_div[elt] + " previous is ZE");
						if (tab_div[elt].offsetTop < previousButt){
							//alert(block + " BF\n" + tab_div[elt].id + ".offsetTop = " + tab_div[elt].offsetTop + " previousButt = " + previousButt + "\n" + tab_div[elt].parentNode.id  + " must move by : " + (previousButt-(tab_div[elt].offsetTop)));
							tab_div[elt].style.top=String(tab_div[elt].offsetTop + previousButt-tab_div[elt].offsetTop)+"px"
						}
					}
					previousIsZE = 0;
				}
	
				if(block.substring(0,3)=="div"){
					tab_div[elt].style.overflow="auto";
					if (previousIsZE == 1){
						if (tab_div[elt].parentNode.offsetTop < previousButt){
							
							if ((tab_div[elt].parentNode.offsetLeft < previousEnd) && ((tab_div[elt].parentNode.offsetLeft+tab_div[elt].parentNode.offsetWidth) > previousLeft)) {
								
								//alert(block + " ZE\n" + tab_div[elt].id + ".offsetTop = " + tab_div[elt].parentNode.offsetTop + " previousButt = " + previousButt + "\n" + tab_div[elt].parentNode.id  + " must move to : " + (tab_div[elt].parentNode.offsetTop+previousButt-(tab_div[elt].parentNode.offsetTop)));
								//alert(block + " ZE\n" + tab_div[elt].id + ".offsetLeft = " + tab_div[elt].parentNode.offsetLeft + " previousEnd = " + previousEnd + "\n" + tab_div[elt].parentNode.id  + " must move by : " + (previousEnd-(tab_div[elt].parentNode.offsetLeft)));
								tab_div[elt].parentNode.style.top = String(tab_div[elt].parentNode.offsetTop + (previousButt-tab_div[elt].parentNode.offsetTop))+"px";
							}
							
						}
					}
					
					if(tab_div[elt].scrollHeight > tab_div[elt].parentNode.scrollHeight){ // only si la brique a 'gonflé'	
						if ((tab_div[elt].parentNode.offsetTop + tab_div[elt].scrollHeight) > previousButt){ // si le butt est plus bas que le précédent
							previousButt = tab_div[elt].parentNode.offsetTop + tab_div[elt].scrollHeight;
							//alert(block + " ZE\n" + tab_div[elt].id + "scrollHeight = " + tab_div[elt].scrollHeight + " /  parentNode.scrollHeight = " + tab_div[elt].parentNode.scrollHeight + " \npreviousButt = " + previousButt);
						}
						else{
							// previousButt inchangé
							
						}
						
						previousEnd = tab_div[elt].parentNode.offsetLeft + tab_div[elt].scrollWidth;
						previousLeft = tab_div[elt].parentNode.offsetLeft;
						//alert(block + " ZE\n" + tab_div[elt].id + "scrollWidth = " + tab_div[elt].scrollWidth + " /  parentNode.scrollWidth = " + tab_div[elt].parentNode.scrollWidth + " \npreviousEnd = " + previousEnd);
					}
					else{
						//
					}
					tab_div[elt].style.overflow="visible";
					previousIsZE = 1;
				}
				if(block=="divhachures"){
					tab_div[elt].style.display="none";
				
				}
			//----------
			}
		}
	}
	
	// masquage des briques vides
	if (eval(document.getElementById('briquevide')) != null){
		divVide = document.getElementById('briquevide').parentNode.parentNode.id
		document.getElementById(divVide).style.top = "0px";
		document.getElementById(divVide).style.display = "none";
	}
	
	// spec BBENT ------------------------------------------------------------------
	if ((eval(document.getElementById('bf17733')) != null) || (eval(document.getElementById('bf18258')) != null)) {
		if (eval(document.getElementById('bf17733')) != null){
			var footerBrique = 'bf17733';
		}
		else if (eval(document.getElementById('bf18258')) != null){
			var footerBrique = 'bf18258';
		}
		// footer 
		if (eval(document.getElementById(footerBrique)) != null){
			document.getElementById(footerBrique).style["zIndex"] = "20";
		   //find the height of the internal page
		   if ( (document.getElementById(footerBrique).style.top) != ""){
			var the_height=eval(eval(document.getElementById(footerBrique).style.top.replace("px","")) - 350) + "px";
		  }
		  else{
			  if ((document.body.clientHeight != undefined) && (document.body.clientHeight != 0)){
				var the_height = eval(document.body.clientHeight - 25 - 350) + "px";
				document.getElementById(footerBrique).style.top = eval(document.body.clientHeight - 25) + "px";
			  }
			  else{
				var the_height=eval(eval(document.getElementById(footerBrique).offsetTop) - 350) + "px";
			  }
		  }
		}
	  // cas du menu de recherche, si the_height est plus petite que lui, on la conforme
	  if (eval(document.getElementById('bf17768')) != null){
		  if (document.getElementById('bf17768').offsetHeight > eval(the_height.replace("px",""))){
			  the_height = document.getElementById('bf17768').offsetHeight + "px";
			  document.getElementById(footerBrique).style.top = eval(eval(the_height.replace("px","")) + 350) + "px";
		  }
	  }
	  // cas du menu de gauche, si the_height est plus petite que lui, on la conforme
	  if (eval(document.getElementById('bf17858')) != null){ 	  
		  if (document.getElementById('bf17858').offsetHeight > eval(the_height.replace("px",""))){
			  the_height = document.getElementById('bf17858').offsetHeight + "px";
			  document.getElementById(footerBrique).style.top = eval(eval(the_height.replace("px","")) + 350) + "px";
		  }
	  }
	  // cas du menu de gauche, si ça marche pas avec la brique on reteste avec le div de fond
	  if (eval(document.getElementById('fondgris')) != null){ 		  
		  if (document.getElementById('fondgris').offsetHeight > eval(the_height.replace("px",""))){
			  the_height = document.getElementById('fondgris').offsetHeight + "px";
			  document.getElementById(footerBrique).style.top = eval(eval(the_height.replace("px","")) + 350) + "px";
		  }
	  }
	
	  if (eval(document.getElementById('fondgris')) != null){
		  //change the height of the menu
		  document.getElementById('fondgris').style.height = the_height;
	  }
	  if (eval(document.getElementById('bf17756')) != null){
		   //change the height of the fond gris
		  document.getElementById('bf17756').style.height = the_height;
	  }
	  if (eval(document.getElementById('bf17735')) != null){
		   //change the height of the fond gris
		  document.getElementById('bf17735').style.height = the_height;
	  }
	  if (eval(document.getElementById('fondvert')) != null){
		   //change the height of the fond vert
		  document.getElementById('fondvert').style.height = the_height;
	  }
	  if (eval(document.getElementById('bf17768')) != null){
		   //change the height of the fond recherche
		  document.getElementById('bf17768').style.height = the_height;
	  }
	  if (eval(document.getElementById('bf17769')) != null){
		   //change the height of the fond recherche resultats
		  document.getElementById('bf17769').style.height = the_height;
	  }
	  if (eval(document.getElementById('fonddegraderecherche')) != null){
		   //change the height of the fond fonddegraderecherche
		  document.getElementById('fonddegraderecherche').style.height = the_height;
	  }
	  if (eval(document.getElementById('fonddegradeinter')) != null){
		   //change the height of the fond fonddegradeinter
		  document.getElementById('fonddegradeinter').style.height = the_height;
	  }
	  if (eval(document.getElementById('fonddegrade')) != null){
		   //change the height of the fond fonddegrade
		  document.getElementById('fonddegrade').style.height = the_height;
	  }
	}
	
	// z index du menu vert
	if ((eval(document.getElementById('bf17731')) != null)) {
		if (eval(document.getElementById('bf17731')) != null){
			var menuvertBrique = 'bf17731';
		}
		// menuvertBrique 
		if (eval(document.getElementById(menuvertBrique)) != null){
			document.getElementById(menuvertBrique).style["zIndex"] = "11";
		}
	}
	
	// z index du menu toplevel
	if ((eval(document.getElementById('bf17732')) != null) || (eval(document.getElementById('bf17743')) != null)) {
		if (eval(document.getElementById('bf17732')) != null){
			var toplevelBrique = 'bf17732';
		}
		else if (eval(document.getElementById('bf17743')) != null){
			var toplevelBrique = 'bf17743';
		}
		// toplevelBrique 
		if (eval(document.getElementById(toplevelBrique)) != null){
			document.getElementById(toplevelBrique).style["zIndex"] = "15";
		}
	}
	
	// le scroller ...
	if (eval(document.getElementById('scroller')) != null){		
		
		if (eval(document.body.offsetHeight) > 0){
			// ie
			var scroll_height = eval(document.body.offsetHeight - 25 - 360);
			document.getElementById('scroller').style.height = scroll_height + "px";
		}
		else{
		// moz
			var scroll_height = eval(document.getElementById('scroller').offsetHeight);
		}
		document.getElementById('scroller').style.width = "771px";
		
		var new_tab_div = document.getElementsByTagName("DIV");
		for(elt in new_tab_div) {
			if ((new_tab_div[elt].id != undefined) && (new_tab_div[elt].id != "")){
				tempDiv = eval(document.getElementById(new_tab_div[elt].id));
				
				if(tempDiv != null){
					if (String(tempDiv.parentNode.id) == "scroller"){
						tempDiv.style.top = eval(tempDiv.offsetTop - 360) + "px";
						
					}
				}
			}
		}
		document.getElementById(footerBrique).style.top = scroll_height + 355 + "px"; // 355 pour moz - 360 pour ie
		document.getElementById(footerBrique).style.bottom = "0px";
		
	  }
	 // - fin scroller 
	 // fin BBENT
	 
	 // spec COTEAUX ------------------------------------------------------------
	 if (eval(document.getElementById('bf18603')) != null){
			   //resets the height of menu
			  document.getElementById('bf18603').style.top = "225px";
		}
	 
	 // fin COTEAUX
	  
	// spec BBCNR ------------------------------------------------------------------
	
	//alert(previousButt);
	if (previousButt < 570){
		previousButt = 570;
	}
	
	if (true){
	//if (eval(document.getElementById('bf17893')) != null){
	   //find the height of the internal page
	   if (true){
		//if ( (document.getElementById('bf17893').style.top) != ""){
	  		//var the_height=eval(eval(document.getElementById('bf17893').style.top.replace("px",""))) + "px";
			var the_height=previousButt + "px";
			//alert(the_height);
		}
		else{
		  if ((document.body.clientHeight != undefined) && (document.body.clientHeight != 0)){
		  	var the_height = eval(document.body.clientHeight) + "px";
			//document.getElementById('bf17893').style.top = eval(document.body.clientHeight) + "px";
			//alert("2");
		  }
		  else{
			//var the_height=eval(eval(document.getElementById('bf17893').offsetTop)) + "px";
			//alert("3");
		  }
	 	}
		// si recherche
		if (eval(document.getElementById('programmation')) != null){			
			deltaHeight = document.getElementById('programmation').offsetHeight - document.getElementById('bf18526').offsetTop;
			if (deltaHeight > 0){			  
				the_height = eval(the_height.replace("px",""));
				the_height = eval(the_height + deltaHeight) +  "px";				
				//document.getElementById('bf17893').style.top = the_height;
			}
		}				  
		document.getElementById('content').style.overflow = "visible";
		//document.getElementById('content').style.overflow-y = "visible";
		//document.getElementById('content').style.overflow-x = "visible";
		document.getElementById('space').style.overflow = "visible";
		//document.getElementById('space').style.overflow-y = "visible";
		//document.getElementById('space').style.overflow-x = "visible";
		if (eval(document.getElementById('bf17892')) != null){
			   //change the height of the fond home
			  document.getElementById('bf17892').style.height = the_height;
		}
		if (eval(document.getElementById('fondhomecnr')) != null){
			   //change the height of the fond home
			    document.getElementById('fondhomecnr').style.height = the_height;
		}
		if (eval(document.getElementById('bf17911')) != null){
			   //change the height of the fond annexes
			  document.getElementById('bf17911').style.height = the_height;
		}
		if (eval(document.getElementById('bgpagesannnex')) != null){
			   //change the height of the fond annexes
			    document.getElementById('bgpagesannnex').style.height = the_height;
		}
		if (eval(document.getElementById('bf17910')) != null){
			   //change the height of the fond principales
			  document.getElementById('bf17910').style.height = the_height;
		}
		if (eval(document.getElementById('bf17891')) != null){
			   //change the height of the fond principales
			  document.getElementById('bf17891').style.top = document.getElementById('bf17884').style.height ;
		}
		if (eval(document.getElementById('bgpagesprincip')) != null){
			   //change the height of the fond principales
			    document.getElementById('bgpagesprincip').style.height = the_height;
		}
		if (eval(document.getElementById('bf17928')) != null){
			   //change the height of the fond pages type home
			  document.getElementById('bf17928').style.height = the_height;
		}
		if (eval(document.getElementById('fondhomepagescnr')) != null){
			   //change the height of the fond pages type home
			    document.getElementById('fondhomepagescnr').style.height = the_height;
		}
		if (eval(document.getElementById('bf18529')) != null){
			   //change the height of the fond pages type progra
			//  document.getElementById('bf18529').style.height = the_height;
		}
		if (eval(document.getElementById('bgpagesproga')) != null){
			   //change the height of the fond pages type progra
			    document.getElementById('bgpagesproga').style.height = the_height;
				//document.getElementById('bgprogra').style.border = "dotted";
		}
	}	  
	// fin BBCNR ----------------------------------
	  
	return true;
}
function showprops(obj, obj_name) {
  for (var i in obj)
    document.write (obj_name+"."+i+"="+obj[i]+"<BR>")
}
function alertprops(obj, obj_name) {
	tempStr = "";
  for (var i in obj){
   tempStr = tempStr + (obj_name+"."+i+"="+obj[i]+" - ")
   }
   alert(tempStr);
}
function printMe(me) {
	window.print();
}
/*
function printMe(me) {
	
	divObj = document.getElementById(me);
	//divObj = getDivToProcess(obj);
	if(divObj!=null) {
		window.open('/modules/print.php?id=' + divObj.getAttribute('id'),'print','scrollbars=yes,resizeable=yes,menubar=no');
	} else {
		window.print();
	}
}*/
function hideMyself(me){
	// nada
	
}

function getWindowHeight() {
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') {
	windowHeight = window.innerHeight;		
	}
	else{	   
		if (document.documentElement && document.documentElement.clientHeight){
				windowHeight = document.documentElement.clientHeight;
		}
		else if(document.body && (document.body.clientHeight > 1)){
        	windowHeight = document.body.clientHeight;
        }	
	}
	return windowHeight;
}