/* (c) 2009 - Jean Luc BIELLMANN */

var _edito = {
	show : function () {
		new Ajax.Request('index.php', {
			method: 'get',
			parameters: { p:'Accueil', f:'jsonGetEdito', n:$F('editoNum') },
			onSuccess: function(transport) {
				this.updEdito (transport.responseText.evalJSON());
			}.bind(this)
		});
	},
	updEdito : function (edito) {
		$('edito').update(edito['content']);
		$('sign').update(edito['author']+' - '+edito['date']);
	},
	gotoRel : function (i) {
		var n = editosKeys.indexOf(parseInt($F('editoNum')))+i;
		if (n>=0 && n<editosKeys.length) {
			$('editoNum').options[n].selected=true;
			this.show();
		}
	},
	init : function (editoKey) {
		//$('editoNum').select('option[value="'+editoKey+'"]')[0].selected = true;
		this.show();
		//options.each(function (option)
	}
}

