menuCount = 0;

function getStyle (layer) {
  if (document.getElementById) {
    return document.getElementById (layer).style;
  }
  else if (document.all) {
    return document.all[layer].style;
  }
  else
    return null;
}

function writeText (layer, text) {
  if (document.getElementById) {
    document.getElementById (layer).innerHTML = text;
  }
  else if (document.all) {
    document.all[layer].innerHTML = text;
  }
}

function init () {
  collapse ()

  for (i = 0; i <= menuCount; i++) {
    if (getStyle('menu' + i)) {
      getStyle('menu' + i).backgroundColor='#109ee5';
      getStyle('menu' + i).color='#ffffff';
      getStyle('menu' + i).fontSize=12;
      getStyle('menu' + i).width=140;
      getStyle('menu' + i).padding=0;
      getStyle('menu' + i).borderStyle='solid';
      getStyle('menu' + i).borderColor='#109ee5';
      getStyle('menu' + i).borderLeftWidth=0;
      getStyle('menu' + i).borderRightWidth=0;
      getStyle('menu' + i).borderTopWidth=0;
      getStyle('menu' + i).borderBottomWidth=0;
    }
  }
  
  if (getStyle('main')) {
    getStyle('main').fontSize=13;
    getStyle('main').padding=1;
    getStyle('main').marginLeft=0;
    getStyle('main').marginTop=0;
  }
  if (getStyle('img0')) {
    getStyle('img0').padding=0;
    getStyle('img0').fontSize=16;
  }
  if (getStyle('img1')) {
    getStyle('img1').padding=0;
  }
}

function menuNetscape () {
  menuText = '<TABLE width=140 align=center cellpadding=0 cellspacing=0 border=0 background="/Images/blue.gif"><TR><TD bgcolor="#109ee5">';
  menuText += '<DIV id="menu0"><IMG src="/Images/blue.gif" height=1 width=8><A HREF="/default.aspx" class="mainmenu"><FONT color="yellow"><B>Home</b></font></a><BR><BR></div>';
  for (i = 1; i <= menuCount; i++) {
    menuText += expandedMenu (i);
  }
  menuText += '</td></tr></table>';
  return menuText;
}

function menuExplorer () {
  menuText = '<DIV id="menu0"><IMG src="/Images/blue.gif" height=1 width=8><A HREF="/default.aspx" class="mainmenu"><B>Home</b></a><BR><BR></div>';
  for (i = 1; i <= menuCount; i++) {
    menuText += '<DIV id="menu' + i + '"></div>';
  }
  return menuText;
}

function collapse () {

}

function expand (id) {
  if (id <= menuCount) {
    writeText ('menu' + id, expandedMenu (id));
  }
}

function menuOption (label, id) {
  return ('<IMG src="/Images/blue.gif" height=1 width=8>' +
          '<A HREF="javascript:collapse(); expand(' + String (id) + ')" class="mainmenu">' +
          '<B>' + label + '</b>' +
          '</a><BR><BR>');
}

function menuOptionExpanded (label) {
  if (document.getElementById || document.all) {
    return ('<IMG src="/Images/blue.gif" height=1 width=8>' +
            '<A HREF="javascript:collapse()" class="mainmenu">' +
            '<FONT color="yellow"><B>' + label + '</b></font>' +
            '</a><BR>');
  } else {
    return ('<IMG src="/Images/blue.gif" height=1 width=8>' +
            '<FONT color="yellow"><B>' + label + '</b></font>' +
            '<BR>');
  }
}

function subMenuOption (label, link) {
  return ('<IMG src="/Images/blue.gif" height=1 width=16>' +
          '<A HREF="' + link + '" class="submenu">' + label + '</a><BR>');
}



function wachtwoordPopup() 
{
  var popupURL = "/popup/wachtwoord.html";
  var popup = window.open(popupURL,"Popup",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=300,height=400');
  popup.location.href = popupURL;
  if (popup.opener == null) popup.opener = self;
}

function smileysPopup() 
{
  var popupURL = "/popup/smileys.html";
  var popup = window.open(popupURL,"Popup",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=300,height=400');
  popup.location.href = popupURL;
  if (popup.opener == null) popup.opener = self;
}

function photoPopup(photopage, photo)
{
  var popupURL = "/cgi-bin/foto/photo.pl?photopage=" + photopage + "&photo=" + photo;
  var popup = window.open(popupURL,"Popup",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=720,height=540');
  popup.location.href = popupURL;
  if (popup.opener == null) popup.opener = self;
}
