/* ------------------------------------------------------------------------------------------------------------------------------*/
//	***Journal des modifications news.js***
//	
//	Intégrateur principal: Léo Renaud-Allaire
//
//	4 fév 09: 
//  -Création du .js
//	-Création de la fonction de base
/* ------------------------------------------------------------------------------------------------------------------------------*/

function init() {
		var mesNews=$$('.news');
		mesNews.each(attacherEvenement)
	}

function attacherEvenement(maNews) {
		Event.observe(maNews,'click',naviguer);
		Event.observe(maNews,'mouseover',roll);
		Event.observe(maNews,'mouseout',out);
	}
	
function naviguer(event) {
		window.location.href=this.firstDescendant()
	}

function roll(event) {
	this.style.backgroundColor='#e1ebf7';
	this.style.backgroundImage='url<?php echo $niveauRepertoire ?>/img/news_shadow_rl.gif)';
	this.style.backgroundRepeat='repeat-y';
	this.style.cursor='pointer';
};

function out(event) {
	if(this.hasClassName('altNews')) {
		this.style.backgroundColor="";
		this.style.backgroundImage="";
		this.style.backgroundRepeat="";
		this.style.cursor="";
		}
	else {
		this.style.background="";
		}
	}

Event.observe(window,'load',init);