function zetzoek(wat){
  dz = document.zoekform;
  if (wat == 'catalogus'){dz.target='_top'; dz.action = 'http://bicat.obvenlo.nl/zoeken.htm'}
  if (wat == 'website'){dz.target='_top'; dz.action = '/zoeken'}
  if (wat == 'google'){dz.target='_blank';dz.action = 'http://www.google.nl/search'}
}

window.onload = testgroot;

function testgroot(){
  document.body.id = getCookie('grootte', 'klein');
}

function grootte(){
  if (document.body.id != 'groot'){
    document.body.id = 'groot';
    document.cookie = "grootte=groot; path=/";}
  else {
    document.body.id = 'klein';
    document.cookie = "grootte=klein; path=/";  
  }
}

function uitklap(welke, o){
  uit();
  eId(welke).style.left= o.offsetLeft + 150 + 'px';
  eId(welke).style.width= o.offsetWidth + 'px';
  eId(welke).style.display='block';
  vorigklap = eId(welke); 
}

function uitklapdingen(){
  eId('zoeken').onmouseover = uit;
  eId('t1').onmouseover = uit;
  eId('t2').onmouseover = uit;
  eId('uitklapOverons').onmouseout = uit2;
  eId('uitklapEducatie').onmouseout = uit2;
  eId('uitklapProducten').onmouseout = uit2;  
}

function uit(){if (window.vorigklap) vorigklap.style.display = 'none';}

function uit2(e){
  if (!e) var e = window.event;
  var reltg = (e.relatedTarget) ? e.relatedTarget : e.toElement;
  while (reltg.tagName != 'BODY'){
  if (reltg.id == this.id){return;}
  reltg = reltg.parentNode;
  }
  uit();
} 

function eId(id){return document.getElementById(id)}

function getCookie(name, defval) {
  var nameEQ = name + "="; var ca = document.cookie.split(';');
  for(var i=0;i < ca.length;i++) {
    var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) {
      ck = '' + c.substring(nameEQ.length,c.length); if (ck != '') return ck;
    }
  }
  return defval;
} 

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-18634348-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
