function centre(page,largeur,hauteur,options) {
	var top=(screen.height-hauteur)/2;
	var left=(screen.width-largeur)/2;
	window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
}
function checkLength (textarea,max) {
	if (textarea.value.length>max) {
	  	textarea.value = textarea.value.substring(0,max);
	}
}
window.addEvent('domready', function() {
	var myAccordion = new Accordion($('accordion'), 'div.toggler', 'div.element', {
		start: -1,
		show: -1,
		opacity: false,
		alwaysHide: true,
		onActive: function(toggler, element){
			var fleche = toggler.getElement('img');
			fleche.removeProperty('src');
			fleche.setProperty('src', 'flecheInverse.jpg');			
		},
		onBackground: function(toggler, element){
			var fleche = toggler.getElement('img');
			fleche.removeProperty('src');
			fleche.setProperty('src', 'fleche.jpg');
		}
	});
	var tabRep = $$('img.adrRep');
	tabRep.each(function(item){
		var adresse = new Element ('span', {'html' : '&#64;&#122;&#105;&#107;&#97;&#109;&#97;&#114;&#116;&#46;&#99;&#104;'});
		adresse.replaces(item);
	});
});
