// redirect if called directly
if (self == top)
{ document.cookie = "loadpage="+self.location+";path=/"
  location = "/"
}

// last modified date
lastmod = "<span class=lastmod>Laatst gewijzigd: "+lastdate()+"&nbsp;</span>"
function lastdate()
{ l = new Date(document.lastModified)
  d = l.getDate()
  m = ["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"][l.getMonth()]
  y = l.getFullYear()
  return d+" "+m+" "+y
}

// anti-spambot mailto function
function mx(a,b,c,d)
{ if (d != "") d = "&#"+64+";"+d
  document.write("<a href=\"mail"+"to:"+a+"&#"+64+";"+b+"\">"+c+d+"</a>")
}

// menu functions
function move(e)
{ var x, y
  if (!e) var e = window.event
  if (e.pageX)
  { x = e.pageX
    y = e.pageY
  }
  else if (e.clientX)
  { x = e.clientX + document.body.scrollLeft
    y = e.clientY + document.body.scrollTop
  }
  if (submenu.offsetLeft != -9999 && !xover)
  { if (x < submenu.offsetLeft || x > submenu.offsetLeft+submenu.offsetWidth) submenu.style.left = -9999
    if (y < submenu.offsetTop || y > submenu.offsetTop+submenu.offsetHeight) submenu.style.left = -9999
  }
}

function over(obj)
{ var a, avail, max, n, cols, rows, i, j, t
  xover = true
  obj.style.color = "black"
  a = obj.nextSibling.innerHTML.split(",<")
  avail = document.body.clientHeight-obj.offsetTop-obj.offsetHeight
  max = Math.floor(avail/(obj.offsetHeight+1))
  if (max < 1) max = 1
  n = a.length-1
  if (n > max) rows = max
  else rows = n
  cols = Math.ceil(n/rows)
  t = "<table cellspacing=0 cellpadding=0>"
  for (i = 0; i < rows; ++i)
  { t += "<tr>"
    for (j = 0; j < cols; ++j)
    { index = j*rows+i+1
      if (index <= n) t += "<td><"+a[index]+"</td>"
      else t+= "<td onmouseover=submenu.style.left=-9999 style=opacity:0;filter:alpha(opacity=0)></td>"
    }
    t += "</tr>"
  }
  t += "</table>"
  submenu.innerHTML = t
  if (obj.offsetLeft+submenu.offsetWidth > document.body.clientWidth-20) submenu.style.left = document.body.clientWidth-submenu.offsetWidth-20
  else submenu.style.left = obj.offsetLeft-1
  submenu.style.top = obj.offsetTop+obj.offsetHeight
}

function out(obj)
{ xover = false
  obj.style.color = "white"
}

xover = false
