function del( Obj ) {
	var label = ( Obj.title ) ? Obj.title : 'Etes vous sûr de vouloir supprimer cet élément ?';
	return confirm( label );	
}

function popup( href, name, h, l ) {
	var hauteur = Math.round( ( screen.availHeight - h ) / 2 );
	var largeur = Math.round( ( screen.availWidth - l ) / 2 );
	var popup = window.open( href, name, 'toolbar=0,location=0,directories=0,status=0, scrollbars=yes,resizable=1,menubar=0,top='+hauteur+',left='+largeur+',width='+l+',height='+h);
	popup.focus();
	return false;	
}

function changeOptions(optionstoshow) {
	var currentOptionsValue = document.getElementById( 'optiontype' ).value;
	//alert(currentOptionsValue);
	if ( optionstoshow == 2 ) {
		document.getElementById( 'equipements_list' ).style.display = 'none';
		document.getElementById( 'options_list' ).style.display = '';
		document.getElementById( 'equipement_btn' ).src = 'images/titre/equipement_off.jpg';
		document.getElementById( 'option_btn' ).src = 'images/titre/options_on.jpg';
		document.getElementById( 'optiontype' ).value = 2;
	}
	else {
		document.getElementById( 'equipements_list' ).style.display = '';
		document.getElementById( 'options_list' ).style.display = 'none';
		document.getElementById( 'equipement_btn' ).src = 'images/titre/equipement_on.jpg';
		document.getElementById( 'option_btn' ).src = 'images/titre/options_off.jpg';
		document.getElementById( 'optiontype' ).value = 1;
	}
}


function bookmark() {
	var anchor = document.getElementById( 'bookmark' ); 
	if( anchor ) {
		anchor.setAttribute( 'rel', 'sidebar' );

		if( window.external ) {
			addEvent( anchor, 'click', function(){ window.external.AddFavorite( anchor.getAttribute('href'), anchor.getAttribute('title') ) } );
		}
	}
}


