/*
 * http://flashsucks.org
 *
 * Yes, flash sucks. You know it, I know it, they know it.
 */

/* global variable - memory leaks are coming */
actual = null;
/* this should be replace with some queue */

/* hide actual submenu */
function hideActual() {
  if (actual!=null) {
    actual.hide();
    actual = null;
  }
};

/* switch submenu */
function switchSubMenu(elem, ml) {
  hideActual();
  elem.show(); 
  $('#mainMenu').css("z-index","0");
  $('#subMenuRow').css("z-index","100");

  if (ml) {
    $("#subHelper").css({marginRight:ml})
  };
  actual = elem;
};

