function affiche_div(valDiv){
  var valDiv;
  document.getElementById(valDiv).style.display="block";
}

function enlever_div(valDiv){
  var valDiv;
  document.getElementById(valDiv).style.display="none";
}

function chngcol(valCol){
  var valCol;
  if (document.getElementById(valCol).style.backgroundColor=="") document.getElementById(valCol).style.backgroundColor="#fef2d8";
  else document.getElementById(valCol).style.backgroundColor="";
}

function swap_n(img_name,to_what,nochange) {
	if (nochange=='') {
		var swap, towhat;
		swap	= eval('document.images.'+img_name);
		towhat=usrdir+'/_img/menu/'+to_what+'.gif';
		swap.src	= towhat;
	}
}

function swap_m(img_name,to_what,nochange) {
	if (nochange=='') {
		var swap, towhat;
		swap	= eval('document.images.'+img_name);
		towhat=usrdir+'/_img/'+to_what+'.gif';
		swap.src	= towhat;
	}
}


function tinyIE_version() {
	var ret = false;
	if( -1<navigator.userAgent.toLowerCase().indexOf("msie") ) {
		var ua = navigator.userAgent.toLowerCase().substr(navigator.userAgent.indexOf("(")+1);
		ua = ua.substr(0,ua.lastIndexOf(")")).split(";");
		if( -1<ua[1].indexOf("msie") ) ua[1] = parseFloat(ua[1].replace(/[a-z ]+/i,""));
		ret = ua[1];
	}
	return ret;
}



function putTaille(menu_height,bord_mini) {
	var ie_version = tinyIE_version();
	var marge = ( false==ie_version?0:6<ie_version?25:0);
	if(document.all)document.getElementById("Bord").outerHTML = document.getElementById("Bord").outerHTML;
	document.getElementById("MenuPanel").style.height = Math.max(20,document.getElementById("Contenu").offsetHeight-menu_height+marge)+"px"
	document.getElementById("Bord").style.height = Math.max(bord_mini-10-marge,document.getElementById("Contenu").offsetHeight-5)+"px"
}

var usrdir = window.location.pathname.substr(1).split("/")[0]
usrdir = ('~'==usrdir.substr(0,1)?"/"+usrdir:"");
