<!--
var ie4 = (document.all) ? true : false;
var nn4 = (document.layers) ? true : false;

var gmenu_id = null;
var gcat_id = null;
var timerID = null;

// submenu display switch
function Pulldown(element,status) {
  id = document.getElementById(element);
  if (status==0)   { // hide submenu
    debugMsg("Starting hide timeout...");
    if (timerID==null) { debugMsg("set timerID");timerID = setTimeout("hideMenu();",150); }
  }
  if (status==1)   { // display submenu
    clearDebug();
    keepOpen(); // clear timeout
    if (gmenu_id!=null) { hideMenu(); } // hide displayed submenu first
    debugMsg("Displaying submenu...");
    if (gmenu_id==null) { debugMsg("set gmenu_id");gmenu_id = id; }
    timerID = null; debugMsg("timerID = null");
    gmenu_id.style.display=''; debugMsg("gmenu_id.style.display set to ''");
  }
}

// cathegory display switch
function Switch(element) {
    id = document.getElementById(element);
    // if any cat is displayed, hide it...
    if (gcat_id!=null) {
          if (gcat_id.style.display!=null) { gcat_id.style.display='none' };
          // if hided cat and switched one are the same, don't display it again
          if (id==gcat_id) { gcat_id = null; return; }
    }
    gcat_id = id;
    gcat_id.style.display='';
}

// hide submenu
function hideMenu() {
  debugMsg("Hiding Menu...");
  if (gmenu_id.style.display!=null) { gmenu_id.style.display='none'; debugMsg("gmenu_id style set to none "); }
  gmenu_id = null;   debugMsg("gmenu_id = null");
  timerID = null; debugMsg("timerID = null");
}

// open debug window
function debugWin() {
  parameters='width=500,height=450,top=0,left=0,resizable=yes,scrollbars=yes,toolbar=no,menubar=no,location=no';
  debugWin=window.open('debug.htm','debug',parameters);
  debugWin.focus();
  document.focus();
}

// display debug message
function debugMsg(msg) {
  if (debugWin.document!=null)
  {
  var now = new Date();
  var timestamp = now.toUTCString();
  var newline = "\r";
  target = debugWin.document.forms[0].debug_area;
  target.value = target.value + newline + timestamp + ": " + msg;
  }
}

// clear debug buffer
function clearDebug() {
  if (debugWin.document!=null)
  {
  target = debugWin.document.forms[0].debug_area;
  target.value = '';
  }
}

// clear hiding timeout
function keepOpen() {
  debugMsg("Clearing timeout...");
  clearTimeout(timerID);
  timerID = null;
}

// display panel
function ShowPanel(element) {
    id = document.getElementById(element);
    id.style.display='';
    id = document.getElementById("gal_selfrm"); // hide select to avoid displaying over panel (IE6 bug fix)
    if (id!=null) { id.style.display='none' };
}

// hide panel
function HidePanel(element) {
    id = document.getElementById(element);
    id.style.display='none';
    id = document.getElementById("gal_selfrm"); // show select (IE6 bug fix)
    if (id!=null) { id.style.display='' };
}

//-->
