function view(name) {

	hide();
	var block = document.getElementById(name);
	block.style.display = 'block';
}


function hide() {

	for( var i=0; i<champs.length; i++ ) {
		name 			= champs[i];
		var d			= document.getElementById(name);
		d.style.display = 'none';
	}
}





/*
 * Fonction antispam.
 */
function nospam(adresse){

	return adresse 		= adresse.replace('_AT_', '@');
}




/*
 * Ouverture d'un popup via un lien <a href="javascript:( ... )"</a>.
 * @author Guillaume Kulakowski <guillaume@kaliop.com>
 * @param 	String 	url 	url de la popup.
 * @param 	String 	name 	nom de la popup.
 * @param 	String 	width 	Largeur de la popup.
 * @param 	String 	height 	hauteur de la popup.
 */
function openPop( url, name, width, height ) {

	window.open( url, name, 'width=' + width + ',height=' + height + ', resizable=no, scrollbars=no');
}





/*
 * Ouverture d'un lien ? partir d'un menu de selection
 * @author Guillaume Kulakowski <guillaume at kaliop dot com>
 * @param 	String 	url 	url.
 * @param 	String 	target 	Atribut target.
 */
function selectUrl ( select, target ) {

	if ( select.value != '' ) {
		if ( target != '' ) {
			window.open(select.value, target);
		}
		else {
			window.location.href=select.value;
		}
	}
}
