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,'');
	}
}

/* gestion des png automatique */
if ( browser.isIE && browser.versionMajor == 6 )
{
window.addEvent('domready', function()
{
	// correctly handle PNG transparency in Win IE 5.5 or higher.
	for(var i=0; i<document.images.length; i++)
    {
     var img = document.images[i]
     var imgName = img.src.toUpperCase()
     if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
     {
       var imgID = (img.id) ? "id='" + img.id + "' " : ""
       var imgClass = (img.className) ? "class='" + img.className + "' " : ""
       var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
       var imgStyle = "display:inline-block;" + img.style.cssText
       if (img.align == "left") imgStyle = "float:left;" + imgStyle
       if (img.align == "right") imgStyle = "float:right;" + imgStyle
       if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle      
       var strNewHTML = "<span " + imgID + imgClass + imgTitle
       + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
        + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
       + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
       img.outerHTML = strNewHTML
       i = i-1
     }
    }
});
}

// roll over du menu en javascript non intrusif
window.addEvent('domready', function initMouseovers()
	{
	// menu principal
	var nav = document.getElementById('menu');
	var uls = nav.getElementsByTagName('ul');
	//on commence à 1 puisque le 0 est le ul du 1er niveau de menu
	for (var i=1;i<uls.length;i++)
		{
		if (uls[i].parentNode.className != 'select')
		{
      	uls[i].onmouseover = function() { this.parentNode.className='select'; };
     	uls[i].onmouseout = function() { this.parentNode.className='';  };
		}
	}
});

window.onDomReady (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 = $$('#vignettes li a');collection.each(function(el)
				{
			 	var a_parent = el.getParent();
				if(!a_parent.hasClass('active'))
					{
					var myMorph = new Fx.Morph(el,{wait: false, duration: 200});
					el.addEvent('mouseenter', function(e){new Event(e).stop();myMorph.start('linkhover');});
					el.addEvent('mouseleave', function(e){new Event(e).stop();myMorph.start('linknormal');});
					}
			});
});