// IMPRESSION ACTU //

function getParamUrl(){
	var prm = new Array();
	var tmp = unescape(window.location.search).substr(1).split("&");
	var inter;
	for ( i=0; i<tmp.length; i++){
		inter=tmp[i].indexOf("=");
		if ( inter>=0 ){
			prm[tmp[i].substr(0,inter)]=tmp[i].substr(inter+1)
		}else {
			prm[tmp[i]]="";
		}
	}
	return prm;
}

function impression(){
	$_GET = getParamUrl();

	var lien = document.getElementById('e_imp');
	var str_url=lien.getAttribute("href");
	if ($_GET && $_GET['n']) str_url +='&n=' + $_GET['n'] ;
	
	lien.setAttribute("href",str_url) ;

}

// FAIRE UN ONLOAD //

function globalAttachEvent(oElt, sEvt, fFct) {
		if ( typeof(oElt)=='object' && sEvt.length ) {
			if (document.all) {
				oElt.attachEvent(sEvt, fFct);
			} else {
				sEvt = sEvt.replace(/^on/, '') ;
				oElt.addEventListener(sEvt, fFct, false);
			}
		}
	}

globalAttachEvent(window,'onload',impression);

// MENU //

var d = null;
var delais = 500;
var timeOut = null;
function montre(id) {
	annulerCache();
	if (d) {d.style.display='none';}
	d = document.getElementById(id);
	if (d) {d.style.display='block';}
}
function cacheDelais(id){
	timeOut = setTimeout('cacheMenu()', delais);
}
function cacheMenu(){
	if (d) {d.style.display='none';}
}
function annulerCache(){
	if(timeOut){
		clearTimeout(timeOut);
	}
}
function clear_hover(html_obj, indice){
	html_obj.className = 'niv'+indice ;
}
function set_hover(html_obj, indice){
	html_obj.className = 'niv'+indice+'_on' ;
}
function clic_hover(html_obj){
	table_html_a = html_obj.getElementsByTagName("a");
	window.location.replace(table_html_a[0].getAttribute("href"));
}
