	// <![CDATA[
	window.addEvent('domready',function(){
	var fontSize = 11;
	var tools = $('fonctionnalites');

	if ($('tmoins'))
	{
		$('tmoins').addEvent('click',function(){
			fontSize--;
			$('contenu').setStyles({'font-size':fontSize+'px'});
		});
	}
	if ($('tplus'))
	{
		$('tplus').addEvent('click',function(){
			fontSize++;
			$('contenu').setStyles({'font-size':fontSize+'px'});
		});
	}

			var path = 'images/';
			var images = [
				path + 'fd_box_01.jpg',
				path + 'fd_box_02.jpg',
				path + 'fd_box_03.jpg'

			];
			var libelles = [

				'<strong>&copy; Département du Rhône<'+'/strong><br/>'
				+'photo Nicolas Robin',
				
				'<strong>&copy; Département du Rhône<'+'/strong><br/>'
				+'photo Nicolas Robin',
				
				'<strong>&copy; Département du Rhône<'+'/strong><br/>'
				+'photo Nicolas Robin'
				

				

			];

			var loadedImages = [];
			var myChain = new Chain();
			
			shuffle = function(o){ //v1.0
				for(var j, x, i = o.length; i; j = parseInt(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x);
				return o;
			};
			
			function changeBkg(item) {

				texte = item[1];
				image = item[0];

				
				$$('#box15 h2 a span').setHTML('<br/>'+texte);


				var myChain2 = new Chain();
				var boxes = [];
				$$('.box').each(function(el,i){
					boxes[i] = el;
				});
				boxes = shuffle(boxes);
				boxes.each(function(el){
					myChain2.chain(function(){
						el.effects({duration:100}).start({opacity:0}).chain(function(){
							el.setStyles({'background-image':('url('+image+')')});	
							el.effects({duration:100}).start({opacity:1});
						});
					})
				});
				var runChain2 = function() { 
					myChain2.callChain();
					if (myChain2.chains.length == 0){
						runChain2 = $clear(timer);
					} 
				}
				var timer2 = runChain2.periodical(20+Math.round(Math.random(0)*140));
			}
			
			new Asset.images(images, {
				onProgress: function(i) {
					loadedImages[i] = this;
				},
				onComplete: function() {
					images.each(function(item,index){
						images[index] = [item,libelles[index]];
					});

					images = shuffle(images);

					// test double boucle
					images.each(function(image){
						myChain.chain(function(){
							changeBkg(image);
						}); 
					});
					images.each(function(image){
						myChain.chain(function(){
							changeBkg(image);
						}); 
					});
					
					var runChain = function() { 
						myChain.callChain();
						if (myChain.chains.length == 0){
							runChain = $clear(timer);
						} 
					}
					
					var timer = runChain.periodical(6000);

				}
			});		
			

			
			$$('#box15 h2 a').addEvent('mouseover',function(){
				$$('#box15 h2 a span').setStyles({'display':'block'});
				$$('#box15 h2 a').setStyles({'background':'#fff','border-bottom':'1px solid #fff'});
			});	
			$$('#box15 h2 a').addEvent('mouseout',function(){
				$$('#box15 h2 a span').setStyles({'display':'none'});
				$$('#box15 h2 a').setStyles({'background':'none','border-bottom':'none'});
			});	
			
			
		});
		
		
	sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

function displayInfo(mois, divID) 
{
	var XMLHttpRequestObject = false;
	if (window.XMLHttpRequest)
	{
		XMLHttpRequestObject = new XMLHttpRequest();
	} 
	else if (window.ActiveXObject) 
	{
		XMLHttpRequestObject = new ActiveXObject("Microsoft.XMLHTTP");
	}
		
		var url=mois+'.html'; 
		
		if(XMLHttpRequestObject) 
		{
			var obj = document.getElementById(divID);
			XMLHttpRequestObject.open("GET", url);
			XMLHttpRequestObject.onreadystatechange = function()
			{
				if (XMLHttpRequestObject.readyState == 4 && XMLHttpRequestObject.status == 200) 
				{
					obj.innerHTML = XMLHttpRequestObject.responseText;
					var allscript = obj.getElementsByTagName('script');
					for(var i=0;i< allscript.length;i++){
						eval(allscript[i].text);
					}
					
				}
			}
		XMLHttpRequestObject.send(null);
		}

}
		// ]]>
