function michelin_swap_station() {
	head = window.document.getElementById('header_michelin');
	head.className = 'header_michelin_station';
		
	radio = window.document.getElementById('michelin_radio_search_agence');
	radio.checked = false;
	
	destination = window.document.getElementById('form_michelin_DestinationURL');
	destination.value = "content/view/full/224";
}

function michelin_swap_agence() {
	head = window.document.getElementById('header_michelin');
	head.className = 'header_michelin_agence';
	
	radio = window.document.getElementById('michelin_radio_search_station');
	radio.checked = false;
	
	destination = window.document.getElementById('form_michelin_DestinationURL');
	destination.value = "content/view/full/357";
}


function michelin_shut_radio (shut) {
	shut_obj = window.document.getElementById(shut);
	shut_obj.checked = false;
}


//
//Verschachteltes Mootools-Accordion
//Nested Mootools Accordion

//window.addEvent('domready', function() {
	function build_accordion() {	
		// Anpassung IE6
		if(window.ie6) var heightValue='100%';
		else var heightValue='';
		
		var togglerName='dt.accordion_toggler_';
		var contentName='dd.accordion_content_';
		
		
		var counter=1;	
		var toggler=$$(togglerName+counter);
		var content=$$(contentName+counter);
		
		
		while(toggler.length>0)
		{
			
			var isOpen = false;
			
			
			toggler.each(function(el, i){
				if(el.hasClass('open')){
					isOpen = true;
					new Accordion(toggler, content, {
						opacity: false,
						display: -1,
						show:i,
						alwaysHide: true,
						onComplete: function() { 
							var element=$(this.elements[this.previous]);
							if(element && element.offsetHeight>0) element.setStyle('height', heightValue);			
						},
						onActive: function(toggler, content) {
							toggler.addClass('open');
						},
						onBackground: function(toggler, content) {
							toggler.removeClass('open');
						}
					});
				}
			}); 
			
			if(!isOpen){
				var myAccordion = new Accordion(toggler, content, {
					opacity: false,
					display: -1,
					alwaysHide: true,
					onComplete: function() { 
						var element=$(this.elements[this.previous]);
						if(element && element.offsetHeight>0) element.setStyle('height', heightValue);			
					},
					onActive: function(toggler, content) {
						toggler.addClass('open');
					},
					onBackground: function(toggler, content) {
						toggler.removeClass('open');
					}
				});
			}
			
			counter++;
			toggler=$$(togglerName+counter);
			content=$$(contentName+counter);
		}
		
	}
	
window.addEvent('domready', function() {
	var myFont = new Font($('description'), [7, 8, 10, 11, 13, 15]);
	if($("increaseFont")) {
		$("increaseFont").addEvent('click', function() {
			myFont.increase();
		});
	}
	if($("decreaseFont")){
		$("decreaseFont").addEvent('click', function() {
			myFont.decrease();
		});
	}
	if($("restoreFont")){
		$("restoreFont").addEvent('click', function() {
			myFont.set(1);
		});
	}
});