
addListenner(window, "load", addSlidersEvents, true);

function addSlidersEvents()
{
    
    // lorsque la souris est au dessus des zones
	// affiche le curseur
	// et le fait suivre la souris
	
	var chooserList = document.getElementById('contentChooserList');
	if (!chooserList) {
		return false;
	}
	
	var linkList = chooserList.getElementsByTagName('ul');
	if (!linkList[0]) {
		return false;
	}
	linkList = linkList[0].getElementsByTagName('a');
	var i, height, pos;
	var linkPos = [];
	for (i = 0; i < linkList.length; i++) {
		height = linkList[i].clientHeight;
		pos = getPosition(linkList[i]);
		linkPos[i] = {};
		linkPos[i]['top'] = pos.y;
		linkPos[i]['bottom'] = pos.y + height;
		//alert('linkPos[i][top] = ' + linkPos[i]['top'] + ', linkPos[i][bottom] = ' + linkPos[i]['bottom']);
	}
	

	chooserList = chooserList.getElementsByTagName('div');
	
	for (i = 0; i < chooserList.length; i++) {
		if (chooserList[i].className.indexOf('contentChooser') >= 0) {

			chooserList[i].onmousemove = function(e) {
				 if (!e && window.event) {
				 	e = window.event;
				 }
				 var coor = getPosition(this, false);
			     var pos = getMousePosition(e);
			     var mark = this.getElementsByTagName('div');
			     if (mark[0]) {
			         mark = mark[0];
			     }
			     var y = pos.y - coor.y - 12;
			     if (y < 78) {
			    	 y = 78;
			     }
			     var max = this.clientHeight - 34;
			     if (y > max) {
			    	 y = max;
			     }
			     if (mark) {
			     	mark.style.top = y + 'px';
			     }
			     
			     
			     //alert('linkPos.length = ' + linkPos.length);
			     var markY = pos.y;
			     var currentLink;
			     //alert('markY = ' + markY);
			     var linkList = this.getElementsByTagName('ul');
			     linkList = linkList[0].getElementsByTagName('a');
			     mark.onclick = function() { return false; };
			     for (var j=0; j < linkPos.length; j++) {
			    	 if (linkList[j]) {
				    	 if (markY >= linkPos[j]['top'] && markY <= linkPos[j]['bottom']) {
				    		 addClass(linkList[j], 'actif');
				    		 currentLink = linkList[j];
				    		 mark.onclick = function() { 
				    			 //alert('currentLink.href = ' + currentLink.href);
				    			 window.location.href = currentLink.href;
				    			 return false; 
			    			 };
				    		 
				    	 } else {
				    		 removeClass(linkList[j], 'actif');
				    		 //mark.onclick = function() { return false; };
				    	 }
			    	 }
			     }
			     
			     
			     
			     
			     
			     
			     
			}; // fin de onmousemouve
			
			
			
			chooserList[i].onmouseout = function(e) {
			     var linkList = this.getElementsByTagName('ul');
			     linkList = linkList[0].getElementsByTagName('a');
			     
			     for (var j=0; j < linkList.length; j++) {
			    	 removeClass(linkList[j], 'actif');
			     }
			}; // fin de onmouseout
			
			

		}
	}

} // end of "addNewAdEvents()"






