function AjoutFavoris(theURL, theTITLE) {
	if (window.external) {
		/* Internet Explorer 4+, et ses dérivés (Crazy Browser, Avent Browser ...) */
		window.external.AddFavorite(theURL, theTITLE);
	}
	else if (window.sidebar) {
		/*Netscape 6+ ; Mozilla, FireFox et compagnie (K-Meleon ...) */
		window.sidebar.addPanel(theTITLE,theURL,'');
	}
}

window.addEvent('domready', function()
	{
	var element = $$('div.tbl_commande, div.bloc_stretcher');
	var toggler = $$('div.lib_commande, span.titre_toggler');
	var plop = ($$('div.lib_commande').length)-1;
	var myAccordion = new Accordion(toggler, element,
		{
		'opacity': false,
		'alwaysHide': true,
		'display': plop,
		'start': false,
		'duration': 200,
		'transition': Fx.Transitions.linear,
		onActive: function(toggler, element)
			{
			//toggler.setStyle('background-color', '#cccccc');
			element.setStyle('display', 'block');
			},
		onBackground: function(toggler, element)
			{
			//toggler.setStyle('background-color', '#ffffff');
			}
		});
	});


// MORPH
if (browser.isMozilla)
	{
	window.addEvent('domready', function()
	{
		Fx.Morph = Fx.Styles.extend(
		{
			start: function(className){var to = {};$each(document.styleSheets, function(style){var rules = style.rules || style.cssRules;$each(rules, function(rule){if (!rule.selectorText.test('\.' + className + '$')) return;Fx.CSS.Styles.each(function(style){if (!rule.style || !rule.style[style]) return;var ruleStyle = rule.style[style];to[style] = (style.test(/color/i) && ruleStyle.test(/^rgb/)) ? ruleStyle.rgbToHex() : ruleStyle;});});});return this.parent(to);}});
	        Fx.CSS.Styles = ["backgroundColor", "backgroundPosition", "color", "width", "height", "left", "top", "bottom", "right", "fontSize", "letterSpacing", "lineHeight", "textIndent", "opacity"];
	        Fx.CSS.Styles.extend(Element.Styles.padding);
	        Fx.CSS.Styles.extend(Element.Styles.margin);
	        Element.Styles.border.each(function(border){['Width', 'Color'].each(function(property){Fx.CSS.Styles.push(border + property);});});
			var collection = $$('.txt select, .txt select.form0');collection.each(function(el)
				{
			 	var a_parent = el.getParent();
				if(!a_parent.hasClass('active'))
					{
					var myMorph = new Fx.Morph(el,{wait: false, duration: 500});
					el.addEvent('focus', function(e){new Event(e).stop();myMorph.start('selectextend');});
					el.addEvent('blur', function(e){new Event(e).stop();myMorph.start('selectnormal');});
					}
		});
	});
}
