/* helper function to load multiple functions, courtesy Simon Wilson */
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}

function popup(url,w,h,scroll)
{
  var l = (screen.width-w)/2;
  var t = (screen.height-h)/2;

  window.open(url,'_blank','resizable=yes,location=no,menubar=no,scrollbars='+scroll+',status=no,toolbar=no,fullscreen=no,dependent=no,width='+w+',height='+h+',left='+l+',top='+t);
}

//get basepath
var site_base = "";
if(a=document.getElementsByTagName("link")[0])
{
  site_base = a.href.substr(0,a.href.indexOf('/resources'));
}

function seachbox()
{
  if(document.getElementById("searchq"))
  {
    document.getElementById("searchq").onclick = function()
    {
      if(this.value=='zoekwoord')
      {
        this.value='';
      }
    }
    document.getElementById("searchq").onblur = function()
    {
      if(this.value=='')
      {
        this.value='zoekwoord';
      }
    }
  }
}

addLoadEvent(function(){seachbox();});
