
    var showed=false;
    var current_num=null;
    var timer_id=null;
    
    function item_over(num)
    {

	if (current_num != null && num != current_num) {
	    if (timer_id != null) 
		clearTimeout(timer_id);
	    showed = false;	    
	    item_out(current_num, 1);
	}
	showed = true;
	current_num = num;
	
	var bg = document.getElementById('bg'+num);
	bg.className = 'menu_yel';
	
	var cut = document.getElementById('cut'+num);
	cut_className = 'menu_bgreen_l menu_cut2_ligh_green';
	
//	var menu_bg = document.getElementById('menu_bg'+num);
//	menu_bg.className = 'menu_bgreen_r';

	var title_bg = document.getElementById('title_bg'+num);
	title_bg.className = 'font_black12b menu_bgreen_b';

	var link_bg = document.getElementById('link_bg'+num);
	link_bg.className = 'menu_bgreen_r menu_bgreen_b';

	var cut_bottom = document.getElementById('cut_bottom'+num);
	cut_bottom.className = 'menu_cut_green';

	num++;
	var next_cut = document.getElementById('cut'+num);
	if (next_cut == undefined)
	    next_cut = document.getElementById('cut_menu');
	next_cut.className = 'menu_border_l menu_cut2_green';
	
	// showchilds...
	num--;
	var locator = document.getElementById('locator'+num);
	var pos = findPos(locator);
	
//alert(document.getElementById('childs0'));				
	var childs = document.getElementById('childs'+num);

	childs.style.left = pos[0]+'px';
	childs.style.top = pos[1]+'px';
	
	var animated_box = document.getElementById('childs_box');
	animated_box.style.left = pos[0]+'px';
	animated_box.style.top = pos[1]+'px';
//	animated_box.style.display = 'block';
//	animate();


	childs.style.display = 'block';
    }
    
    function animate()
    {
	var animated_box = document.getElementById('childs_box');
	if (animated_box.style.width.replace('px', '') < 125) {
	    animated_box.style.width = new Number(animated_box.style.width.replace('px', '')).valueOf() + 5 + 'px';
	    setTimeout('animate()', 0);
	}
	else {
	    var childs = document.getElementById('childs'+current_num);
	    animated_box.style.display = 'none';
	    childs.style.display = 'block';
	}
    }
    
    function item_out(num, close)
    {
	if (close == null) {
	    showed = false;
	    timer_id = setTimeout('item_out('+num+',1)', 1000);
	    return;
	}
	else {
	    timer_id = null;
	}
	if (showed == true) return;
	
	var bg = document.getElementById('bg'+num);
	bg.className = 'menu_green';
	
	var cut = document.getElementById('cut'+num);
	if (num == 0) 
	    cut.className = 'menu_border_l';
	else if (current_num == num)
	    cut.className = 'menu_border_l menu_cut2_ligh_green';

//	var menu_bg = document.getElementById('menu_bg'+num);
//	menu_bg.className = 'menu_border_r';

	var title_bg = document.getElementById('title_bg'+num);
	title_bg.className = 'font_black12b menu_border_b';

	var link_bg = document.getElementById('link_bg'+num);
	link_bg.className = 'menu_border_r menu_border_b';

	var cut_bottom = document.getElementById('cut_bottom'+num);
	cut_bottom.className = 'menu_cut_ligh_green';

	num++;
	var next_cut = document.getElementById('cut'+num);
	if (next_cut == undefined)
	    next_cut = document.getElementById('cut_menu');
	next_cut.className = 'menu_border_l menu_cut2_ligh_green';

	var childs = document.getElementById('childs'+current_num);
	childs.style.display = 'none';
	
	var animated_box = document.getElementById('childs_box');
	animated_box.style.display = 'none';
	animated_box.style.width = '1px';
    }

    function separator_over(num)
    {
	clearTimeout(timer_id);
	showed = false;
	item_out(num, 1);
    }
    
    function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
	    curleft = obj.offsetLeft
	    curtop = obj.offsetTop
	    while (obj = obj.offsetParent) {
		curleft += obj.offsetLeft
		curtop += obj.offsetTop
	    }
	}
    return [curleft,curtop];
    }
    
    
    function childs_over() { showed=true; }
    
    function childs_out() 
    {
	item_out(current_num, null);
    }
    
    function childs_item_over(obj) {
	obj.className = 'cat_hover_item_link';
    }
    
    function childs_item_out(obj) {
	obj.className = 'cat_item_link';
    }
    
    