// ==============================
function openPopup(o)
{
  window.open(o.href, '', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=yes,width=560,height=480');
  return false;
}

function openPic(pic, w, h, dl)
{
  window.open('popup/gallery.php?pic=' + pic + (dl?'&dl=1':''), '', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=yes,width=' + w +',height=' +h);
  return false;
}


function setmenuhover()
{
  try
  {
  arImageList = new Array ();
  var o = document.getElementById("menucont");
  var p = o.getElementsByTagName("img");
  for (i=0; i < p.length; i++)
  {
    p[i].onmouseover = menuhoveron;
    p[i].onmouseout = menuhoveroff;
    arImageList[i] = new Image();
    arImageList[i].src = p[i].src.replace(".jpg", "_sel.jpg");
  }
  }
  catch (e) {}
}

function menuhoveron(e)
{
  try
  {
    e = e || event;
    if (!e) return;
    var t = e.srcElement || e.target;
    t.src = t.src.replace(".jpg", "_sel.jpg");
  }
  catch (ex) {}
}

function menuhoveroff(e)
{
  try
  {
    e = e || event;
    if (!e) return;
    var t = e.srcElement || e.target;
    t.src = t.src.replace("_sel.jpg", ".jpg");
  }
  catch (ex) {}
}

function addEvent(O,E,F,x){
  return(x=O.addEventListener)?x(E,F,1):(x=O.attachEvent)?x('on'+E,F):!1
}

addEvent(window, "load", setmenuhover);
