function Init(){


	var pwidth = 0 ;

	var rebuildSliderContent = function() {
		// détruit les précédents timers etc
		if ($('loopedSliderContainer'))	{
			$('loopedSliderContainer').innerHTML = '\
				<div id="loopedSlider">\
					<div class="slider_container">\
						<div class="slides">\
							<div style="height:420px;background:url(media/illus_environnement.jpg) no-repeat center 0"><a href="m1.php?hid=219084"><img src="media/acous_environnement.png" alt="" /></a></div>\
							<div style="height:420px;background:url(media/illus_architecture.jpg) no-repeat center 0"><a href="m1.php?hid=91822"><img src="media/acous_architecture.png" alt="" /></a></div>\
							<div style="height:420px;background:url(media/illus_eolien.jpg) no-repeat center 0"><a href="m1.php?hid=92220"><img src="media/acous_eolien.png" alt="" /></a></div>\
							<div style="height:420px;background:url(media/illus_industrie.jpg) no-repeat center 0"><a href="m1.php?hid=91521"><img src="media/acous_industrie.png" alt="" /></a></div>\
						</div>\
						<div class="control">\
							<a href="#" class="previous"><img src="media/prev_btn.png" onmouseover="this.src=\'media/prev_btn_over.png\'"  onmouseout="this.src=\'media/prev_btn.png\'" border="0" alt="Précédent" /></a>\
							<a href="#" class="next"><img src="media/next_btn.png"  onmouseover="this.src=\'media/next_btn_over.png\'"  onmouseout="this.src=\'media/next_btn.png\'" border="0" alt="Suivant" /></a>\
						</div>\
						<ul class="pagination">\
							<li><a href="#">1</a></li>\
							<li><a href="#">2</a></li>\
							<li><a href="#">3</a></li>\
							<li><a href="#">4</a></li>\
						</ul>\
					</div>\
				</div>' ;
		}
	}


	var rebuildSlider = function() {
		$j(function(){
			$j('#loopedSlider').loopedSlider({
				autoStart: 5000,
				restart: 5000
			})
		})
	}


	var callback = function() {

		var viewport = document.viewport.getDimensions(); // Gets the viewport as an object literal
		var width = viewport.width; // Usable window width
		var height = viewport.height; // Usable window height

//		console.log(width) ;		

		if (width >= 1200) {
			if (pwidth < 1200) {
				$('site').setStyle({'width':'1280px'}) ;
				$('navigation').setStyle({'width':'1280px'}) ;
				if ($('loopedSliderContainer'))	{
					rebuildSliderContent() ; 
					$$('.slider_container').each(function(item) { item.setStyle({'width':'1280px'}) }) ;
					$$('div.slides > div').each(function(item) { item.setStyle({'width':'1280px'}) }) ;
					$$('ul.slides li').each(function(item) { item.setStyle({'width':'1280px'}) }) ;
					$$('div.slides img').each(function(item) { item.setStyle({'margin':'190px 170px'}) }) ;
					$$('ul.pagination').each(function(item) { item.setStyle({'margin':'374px 0 0 910px'}) }) ;
	//				console.log('agrandissement') ;
					rebuildSlider() ;
				}
			}
		}
		else if (pwidth >= 1200) {
			$('site').setStyle({'width':'990px'}) ;
			$('navigation').setStyle({'width':'990px'}) ;
			if ($('loopedSliderContainer'))	{
				rebuildSliderContent() ;
				$$('.slider_container').each(function(item) { item.setStyle({'width':'990px'}) }) ;
				$$('div.slides > div').each(function(item) { item.setStyle({'width':'990px'}) }) ;
				$$('ul.slides li').each(function(item) { item.setStyle({'width':'990px'}) }) ;
				$$('div.slides img').each(function(item) { item.setStyle({'margin':'190px 40px'}) }) ;
				$$('ul.pagination').each(function(item) { item.setStyle({'margin':'374px 0 0 820px'}) }) ;
	//			console.log('rétrécissement') ;
				rebuildSlider() ;
			}
		}

		pwidth = width ;
	}

	callback() ;

	Event.observe(window, 'resize',	callback) ;

}
