/***********************************/
/**
 * @author DELSOL Mikael :) 
 * @copyright 2008 Carnon :)
 * @license none
 */
/*commentaire*/
function update($el,$display)
{
	if($display==true)
		$el.className = 'category hover';
	else
		$el.className = 'category';
	var $ul_child = $el.getElementsByTagName("UL")[0];
	if($display==true)
		$ul_child.style.height = "100pt";
	else
		$ul_child.style.height = "0pt";
}
function myajaxmenu($_id)
{
	//recuperation du menu complet contenu dans l'ul d'id $_id
	this.$ul_menu = $($_id);
	this.$children = this.$ul_menu.getElementsByTagName("LI");;
	for($i=0;$i<this.$children.length;$i++)
	{
		$child = this.$children[$i];
		if($child && $child.tagName=="LI" && $child.getElementsByTagName("UL").length>0)
		{
			$child.onmouseover =function onmouseover(event)
								{
									update(this,true);
								};
			$child.onmouseout = function onmouseout(event)
								{
									update(this,false);
								};
			$ul_child = $child.getElementsByTagName("UL")[0];
			if($ul_child.tagName=="UL")
			{
				$ul_child.style.height = 0;
				$ul_child.style.overflow = 'hidden';
				$ul_child.style.display  = 'block';
			}
		}
	}
}
/*fin commentaire*/
/***********************************/

/**
 * Light Menu System v0.1
 * @author Jonathan Schemoul
 * @copyright 2006-2007 Holdiland
 * @license GPL V2 or newer
 */
/*
var menuEffects = new Class({
        initialize: function(selector, options) {
                this.options = Object.extend({
                        subElement: false,
                        subElementSelector: 'a'
                }, options || {})
                this.selector = selector;
                this.currTimer = 500;
                $ES(selector + ' li ul').each(function(el) {
                        el.setStyles({
                                'display': 'block'
                        });
                        normalHeight = el.offsetHeight;
                        el.setStyles({
                                'height': 0,
                                'overflow': 'hidden'
                        });
                        elParent = $(el.parentNode);
                        
                        currentMenu = new Fx.Style(el, 'height');
                        elParent.addEvents({
                                'mouseover': function(submenu, myParent, targetValue) {
                                        myParent.addClass('hover');
                                        submenu.clearTimer();
                                        submenu.custom(targetValue);
                                }.pass([currentMenu, elParent, normalHeight]),
                                'mouseout': function(submenu, myParent, targetValue) {
                                        myParent.removeClass('hover');
                                        submenu.clearTimer();
                                        submenu.custom(targetValue);
                                }.pass([currentMenu, elParent, 0])
                        })
                }.bind(this));
        }
});
function processMenuEffects (){
        var myMenus = new menuEffects('#myajaxmenu', {
                subElement: true
        });
}
window.onDomReady(processMenuEffects);
*/