/******************************************************************************
 *
 *                   INDIGEN SOLUTIONS PROPRIETARY INFORMATION
 *       This software is supplied under the terms of a license agreement or
 *       nondisclosure agreement with Indigen Solutions and may not be copied
 *       or disclosed except in accordance with the terms of that agreement.
 *            Copyright (c) 2004 Indigen Solutions. All Rights Reserved.
 *
 * Author    : David PISTORI (david.pistori@indigen.com)
 *
 * File name :
 *
 * Abstract  :
 *
 * RCS Id                       $Id: menu.js,v 1.1.1.1 2005/06/15 08:26:27 indigen Exp $
 * RCS Revision                 $Revision: 1.1.1.1 $
 * RCS Check in date            $Date: 2005/06/15 08:26:27 $
 * RCS State                    $State: Exp $
 * RCS Author                   $Author: indigen $
 * RCS Locked by                $Locker:  $
 *
 ******************************************************************************/
var tmp = "";
var timeout = "";

function menu_showMenu(obj, level, menuindex,color,color2) {
      
    if (color==0)
	obj.style.backgroundColor = "#7FB3E2";
    else { 
	obj.style.backgroundColor = color;
	obj.style.color = color2;
    }
    /**
  clearTimeout(timeout);
  if (level == 1) {
    tab = [ "empty","un","deux","trois","quatre" ];
    var menu = document.getElementById("menul" + tab[level + 1]);
    var newMenu = document.getElementById("menuhidden_" + (level + 1) + "_" + menuindex);    
    if (tmp == "")
      tmp = menu.innerHTML;
    menu.innerHTML = newMenu.innerHTML;
    menu.style.backgroundColor = "#7FB3E2";
    }
  */
}

function menu_hideMenu(obj, level, menuindex,color) {
    //if(color==0)
        obj.style.backgroundColor = "";
	//else 
	//obj.style.backgroundColor = color;
  /**
  timeout = setTimeout("menu_hideMenu2(" + level + ", " + menuindex + ")", 1000);
  */

}

function menuhide3(obj) {
    //if(color==0)
        obj.style.backgroundColor = "#6A90B5";
	obj.style.color = "white"; 

}

function menu_hideMenu3(obj, level, menuindex,color) {
    //if(color==0)
        obj.style.backgroundColor = color;
	obj.style.color = "white"; 
	//else 
	//obj.style.backgroundColor = color;
  /**
  timeout = setTimeout("menu_hideMenu2(" + level + ", " + menuindex + ")", 1000);
  */

}

function menu_hideMenu2(level, menuindex) {
  if (tmp != "") {
    if (level == 1) {
      var menu = document.getElementById("menul" + tab[level + 1]);
      menu.innerHTML = tmp;    
      menu.style.backgroundColor = "";
    }
  }
}

function menu_clearTimeout() {
  clearTimeout(timeout);
}
