/**********************
** MOUVEMENT DU MENU **
**********************/

var object = null;

function UngrowAll()
{
}

function move_div(pos, max_pos)
{
  if (pos > max_pos)
  {
    document.getElementById('menu_tmp').style.display = "none";
    document.getElementById('menu_general').appendChild(object);


  var noeuds = document.getElementById('menu_general').firstChild
  while (noeuds!=null) {
    if (noeuds.nodeName == "DIV")
       noeuds.onclick = click_menu;
    noeuds = noeuds.nextSibling;
    }
    load_main_div(document.getElementById(object.id+'_val').innerHTML, object);
    object = null;
  }
  else
  {
    document.getElementById('menu_tmp').style.marginTop = pos+"px";
    pos = (pos * 1) + 1;
    setTimeout("move_div("+pos+", "+max_pos+")",10);
  }
}

function reinit_menu_style()
{
  document.getElementById('menu_1').className = "menuDiv";
  document.getElementById('menu_2').className = "menuDiv";
  document.getElementById('menu_3').className = "menuDiv";
}

function modif_menu_style(obj)
{
  reinit_menu_style();

  obj.className = "menuDivSelected";
}

function do_click_menu(element)
{
  document.getElementById('all_page_contain').style.display = "none";
  object = element;
  click_menu();
}

/***** fonction appelee au click *****/
function click_menu(evt)
{
  var to = document.getElementById(this.id+'_val').innerHTML;
  to = strReplace(to, "%26", "&");
  GET(to, 'contain_1');
}


/*******************************************************
** FONCTIONS DE CHARGEMET DANS LE CONTAINER PRINCIPAL **
*******************************************************/

function load_main_div(to)
{
  GET(decodeURIComponent(to), 'contain_1');
}
