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

function popen(urlstr,name,largeur,hauteur)
{
	var top=(screen.height-hauteur)/2;
    var gch=(screen.width-largeur)/2;
	new_win = window.open(urlstr, name, 'toolbar=no, location=no, directories=no, status=no, scrollbars=no, resizable=no, menubar=no, width='+largeur+', height='+hauteur+', top='+top+', left='+gch+'');
	new_win.focus();
	return;
}

function toogle( block ){
	document.getElementById( block ).style.display = ( document.getElementById( block ).style.display == "none" )? "block" : "none" ;
}

function addClass( element_id, class_name ){
	document.getElementById( element_id ).className = class_name ;
}

function removeClass( element_id, class_name ){
	( document.getElementById( element_id ).className == class_name )? document.getElementById( element_id ).className = null : '' ;
}

function slideActu( element_id, nb ){
	for( i=1; i<=nb ; i++ ){
		if( document.getElementById( element_id+i ).style.display == 'block' ){
			visible_id = ( i + 1 <= nb)? i + 1 : 1 ;
		}
	}
	
	for( i=1; i<=nb ; i++ ){
		document.getElementById( element_id+i ).style.display =  ( visible_id == i )? "block" : "none" ;
	}
}
