
var currentSubmenuUitklapId = false;
var submenuUitklapTimeout = false;

function prepareSubmenuUitklap() {
  if (!document.getElementById || !document.createElement) return false;

  var kopmenu = document.getElementById('kopmenu');
  if (!kopmenu) return false;
  
  var as = kopmenu.getElementsByTagName('a');
  for (var i=0; i<as.length; i++) {
    if (as[i].rel && as[i].rel.match(/uitklap-submenu-/)) {
      var submenu = document.getElementById(as[i].rel);
      submenu.className = submenu.className.replace(/uitklapmenu-nojs/,'') + ' uitklapmenu-ingeklapt';
      submenu.parentNode.removeChild(submenu);
      kopmenu.parentNode.insertBefore(submenu, kopmenu.nextSibling);
      
      as[i].onclick = function() { performSubmenuUitklap(this.rel); return false; };
      as[i].onmouseover = function() { performSubmenuUitklap(this.rel); };
      as[i].onmouseout =  function() { scheduleSubmenuInklap(); };
      
      submenu.onmouseover = function() { performSubmenuUitklap(this.id); };
      submenu.onmouseout =  function() { scheduleSubmenuInklap(); };
      
      var submenuAs = submenu.getElementsByTagName('a');
      for (var j=0; j<submenuAs.length; j++) {
        submenuAs[j].rel = as[i].rel;
        submenuAs[j].onmouseover = function() { performSubmenuUitklap(this.rel); };
        submenuAs[j].onmouseout =  function() { scheduleSubmenuInklap(); };
      }
    }
  }
}

function performSubmenuUitklap(submenuId) {
  if (submenuUitklapTimeout) {
    window.clearTimeout(submenuUitklapTimeout);
  }
  
  if (currentSubmenuUitklapId && currentSubmenuUitklapId!=submenuId) {
    performSubmenuInklap();
  }
  
  if (currentSubmenuUitklapId!=submenuId) {
    var body = document.getElementsByTagName("body")[0];
    body.className = body.className + "uitklapmenu-zichtbaar";
    
    var submenu = document.getElementById(submenuId);
    submenu.className = submenu.className.replace(' uitklapmenu-ingeklapt', '')
                        .replace(' uitklapmenu-ingeklapt', '')
                        + ' uitklapmenu-uitgeklapt';
    
    var submenuKop = document.getElementById(submenuId + "-kop");
    submenuKop.className = submenuKop.className.replace(/ ?uitgeklapt/, '') + ' uitgeklapt';
    
    currentSubmenuUitklapId = submenuId;
  }
}

function scheduleSubmenuInklap() {
  if (submenuUitklapTimeout) {
    window.clearTimeout(submenuUitklapTimeout);
  }
  
  submenuUitklapTimeout = window.setTimeout('performSubmenuInklap();', 100);
}

function performSubmenuInklap() {
  if (currentSubmenuUitklapId) {
    var body = document.getElementsByTagName("body")[0];
    body.className = body.className.replace(/uitklapmenu-zichtbaar/, "");
    
    var submenu = document.getElementById(currentSubmenuUitklapId);
    submenu.className = submenu.className.replace(' uitklapmenu-ingeklapt', '')
                        .replace(' uitklapmenu-ingeklapt', '')
                        + ' uitklapmenu-ingeklapt';
    
    var submenuKop = document.getElementById(currentSubmenuUitklapId + "-kop");
    submenuKop.className = submenuKop.className.replace(/ ?uitgeklapt/, '');
    
    currentSubmenuUitklapId = false;
  }
}

function agenda() {
	if (document.getElementById) {
		var agenda = document.getElementById('agenda');
		if (agenda) {
			var divs = agenda.getElementsByTagName('div');
			var dezeWeek = false;
			var dezeWeekH2 = false;
			var volgendeWeek = false;
			for (var i=0; i<divs.length; i++) {
				if (divs[i].className=='dezeWeek') {
					dezeWeek = divs[i];
					var h2s = dezeWeek.getElementsByTagName('h2');
					dezeWeekH2 = h2s[0];
				} else if (divs[i].className=='volgendeWeek') {
					volgendeWeek = divs[i];
				}
				if (dezeWeek && volgendeWeek) {
					break;
				}
			}
			
      if (volgendeWeek) {
        dezeWeekH2.volgende = volgendeWeek;
        if (dezeWeekH2.style.cursor) dezeWeekH2.style.cursor = 'pointer';
        dezeWeekH2.onclick = function() {
                    if (this.volgende.style.display=='none') {
                      createCookie('agenda_uitgeklapt','y',300);
                      this.volgende.style.display = 'block';
                    } else {
                      eraseCookie('agenda_uitgeklapt');
                      this.volgende.style.display = 'none';
                    }
                  };

        if (readCookie('agenda_uitgeklapt')==null) {
          volgendeWeek.style.display = 'none';
        } else {
          createCookie('agenda_uitgeklapt','y',300);
        }
      }
		}
	}
}

function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	} else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	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) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name) {
	createCookie(name,"",-1);
}

function agendaKeuzeToggle() {
  if (document.getElementById) {
    var lijst = document.getElementById("agendaKeuzeKeuzelijst");
    if (lijst) {
      var formu = lijst.parentNode;
      if (formu.style.display=='block') {
        formu.style.display = 'none';
      } else {
        formu.style.display = 'block';
      }
    }
  }
}

function imgPopup() {
   msgWindow=open(this.href,'imgPopup','width=600,height=420,toolbar=no,status=no,location=no,directories=no,scrollbars=no,menubar=no,copyhistory=no,resizable=no');
   if (msgWindow.opener == null) msgWindow.opener = self;
   return false;
}

function prepareImgPopup() {
  if (!document.getElementsByTagName) return false;

  var allImages = document.getElementsByTagName('IMG');
  for (var i=0; i<allImages.length; i++) {
    if (allImages[i].parentNode &&
        allImages[i].parentNode.nodeName=='A' &&
        allImages[i].parentNode.target=='imgVergroting') {
      allImages[i].parentNode.onclick = imgPopup;
    }
  }
}

function addPrintLink() {
  if (document.createElement && document.getElementById) {
    // zoeken naar content-div
    var contentDiv = document.getElementById('content-container');
    if (contentDiv) {
      if (contentDiv.className.match(/printlink/) ||
          contentDiv.className.match(/leesvoor/)) {
        var printLinkDiv = document.createElement('div');
        printLinkDiv.id = 'pagina-actie-links';
        printLinkDiv.className = 'ISI_IGNORE';

        if (contentDiv.className.match(/leesvoor/)) {
          var printLinkA = document.createElement('a');
          printLinkA.href = '#';
          printLinkA.onclick = function() { leesvoor(this); return false; }
          printLinkA.className = 'nietprinten';
          printLinkA.title = 'Deze pagina voorlezen';
          var printLinkImg = document.createElement('img');
          printLinkImg.height = 18;
          printLinkImg.width = 36;
          printLinkImg.src = '/img/leesvoor.gif?colorizehex(&fe6700)+transparent(&000000)';
          printLinkImg.alt = 'Deze pagina voorlezen';
          printLinkImg.title = 'Deze pagina voorlezen';
          printLinkA.appendChild(printLinkImg);
          printLinkDiv.appendChild(printLinkA);
        }

        if (contentDiv.className.match(/printlink/)) {
          var printLinkA = document.createElement('a');
          printLinkA.href = '#';
          printLinkA.onclick = function() { window.print(); return false; }
          printLinkA.className = 'nietprinten';
          printLinkA.title = 'Deze pagina afdrukken';
          var printLinkImg = document.createElement('img');
          printLinkImg.height = 18;
          printLinkImg.width = 18;
          printLinkImg.src = '/img/printer.gif?colorizehex(&fe6700)+transparent(&000000)';
          printLinkImg.alt = 'Deze pagina afdrukken';
          printLinkImg.title = 'Deze pagina afdrukken';
          printLinkA.appendChild(printLinkImg);
          printLinkDiv.appendChild(printLinkA);
        }

        contentDiv.insertBefore(printLinkDiv, contentDiv.firstChild);
      }
    }
  }
}

function displayRooster(id) {
  var plus_gif = "/assets/icons/tree_plus.gif";
  var min_gif = "/assets/icons/tree_min.gif";
  if (document.getElementById) {
    // netscape 6, explorer 5
    // level 1 DOM
    
    if (document.getElementById("table_"+id).style.display!="block") {
      document.getElementById("table_"+id).style.display="block";
      document.getElementById("img_"+id).src=min_gif;
    } else {
      document.getElementById("table_"+id).style.display="none";
      document.getElementById("img_"+id).src=plus_gif;
    }
  } else if (document.all) {
    // explorer 4 DOM
    
    if (document.all["table_"+id].style.display!="block") {
      document.all["table_"+id].style.display="block";
      document.all["img_"+id].src=min_gif;
    } else {
      document.all["table_"+id].style.display="none";
      document.all["img_"+id].src=plus_gif;
    }
  }
  
  window.onresize();
}

function shrinktofit() {
  var image = document.images.FullImage;
  var w = image.width;
  var h = image.height;

  // if this is ns6
  if((!document.layers) && (navigator.userAgent.indexOf('Netscape')!=-1)) {
    w += 7;
    h += 24;
  }

  window.resizeTo(w,h);
  if(document.body && document.body.clientWidth)
    window.resizeBy(image.width-document.body.clientWidth,image.height-document.body.clientHeight)
  //window.moveTo(self.screen.width/4,self.screen.height/4);
}
function shrinktofit2() {
  var image = document.images.FullImage;
  var w = image.width;
  var h = image.height+getbijschrifthoogte();

  // if this is ns6
  if((!document.layers) && (navigator.userAgent.indexOf('Netscape')!=-1)) {
    w += 7;
    h += 24;
  }

  window.resizeTo(w,h);
  if(document.body && document.body.clientWidth)
    window.resizeBy(image.width-document.body.clientWidth,image.height-document.body.clientHeight+getbijschrifthoogte())
  //window.moveTo(self.screen.width/4,self.screen.height/4);
}
function getbijschrifthoogte() {
  if (document.getElementById) {
    x = document.getElementById('bijschrift');
    if (x && x.offsetHeight) {
      return x.offsetHeight+50;
    }
  }
  return 20;
}

function fotoboekPlayer(url) {
  document.writeln('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="534" height="402" id="Untitled-1" align="middle">');
  document.writeln('<param name="allowScriptAccess" value="sameDomain" />');
  document.writeln('<param name="movie" value="/assets/ssp.swf" />');
  document.writeln('<param name="quality" value="high" />');
  document.writeln('<param name="bgcolor" value="#ffffff" />');
  document.writeln('<param name="FlashVars" value="xmlfile=' + url + '"/>');
  document.writeln('<embed src="/assets/ssp.swf" quality="high" bgcolor="#ffffff" width="534" height="402" name="Slideshow" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" FlashVars="xmlfile=' + url + '"/>');
  document.writeln('</object>');
}

function mp3Player(url, width) {
  if (width==null) width = 308;
  var mp3url = '/assets/xhtml/mp3player.swf?file='+url;
  document.write(
  '   <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="'+width+'" height="20" id="mp3player"'+
  '   codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" >'+
  '       <param name="movie" value="'+mp3url+'" />'+
  '       <param name="wmode" value="transparent" />'+
  '       <embed src="'+mp3url+'" wmode="transparent" width="'+width+'" height="20" name="mp3player" '+
  '         type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'+
  '   </object>'
  );
}

var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
  try {
    xmlhttp = new XMLHttpRequest();
  } catch (e) {
    xmlhttp=false;
  }
}
if (!xmlhttp && window.createRequest) {
  try {
    xmlhttp = window.createRequest();
  } catch (e) {
    xmlhttp=false;
  }
}

function rssAbonnement() {
  var div = document.getElementById('rssAbonnement');
  if (div && xmlhttp) {
    var span = document.createElement('span');
    span.innerHTML = div.className.match("off") ? "Je bent niet geabonneerd op deze pagina. " : "Je bent geabonneerd op deze pagina. ";
    div.appendChild(span);
    
    var a = document.createElement('a');
    a.innerHTML = div.className.match("off") ? "Abonneren" : "Opzeggen";
    a.href = "#";
    a.onclick = function() {
        xmlhttp.open("GET", "/rss?toggle="+div.className.match(/[0-9]+/), true);
        xmlhttp.onreadystatechange = function() {
            if (xmlhttp.readyState==4) {
              var div = document.getElementById('rssAbonnement');
              var as = div.getElementsByTagName('a');
              as[0].innerHTML = xmlhttp.responseText=="off" ? "Abonneren" : "Opzeggen";
              var spans = div.getElementsByTagName('span');
              spans[0].innerHTML = xmlhttp.responseText=="off" ? "Je bent niet geabonneerd op deze pagina. " : "Je bent geabonneerd op deze pagina. ";
            }
          };
        xmlhttp.send(null);
        return false;
      };
    div.appendChild(a);
    
    span = document.createElement('span');
    span.innerHTML = ' (<a href="/rss">Help</a>)';
    div.appendChild(span);
  }
}

var curHelpAan = false;
function switchHelp(element) {
  if (!element.className) { return; }

  if (element.className=="formHelp") {
    if (curHelpAan) {
      curHelpAan.className = "formHelp";
    }
    element.className = "formHelpActive";
    curHelpAan = element;
  } else {
    element.className = "formHelp";
  }
}

var supported = document.getElementById && document.childNodes && document.createElement;

function prepareBeoordeling() {
  if (!supported) return false;

  var beoordelingDiv = document.getElementById("uw-beoordeling");
  if (!beoordelingDiv) return false;
  
  var images = new Array();
  for (var i=0; i<beoordelingDiv.childNodes.length; i++) {
    if (beoordelingDiv.childNodes[i].nodeName=="IMG") {
      images[images.length] = beoordelingDiv.childNodes[i];
    }
  }

  var strong = beoordelingDiv.getElementsByTagName("H2");
  strong[0].origText = strong[0].innerHTML;
  
  for (var i=0; i<images.length; i++) {
    images[i].nummer = i+1;
    images[i].origSrc = images[i].src;
    images[i].style.cursor = "pointer";
    images[i].onmouseover = function() {
        var sib = this;
        while (sib) {
          if (sib.nodeName=="IMG") {
            sib.src = sib.src.replace(/beoordeling-.+\.gif/, "beoordeling-over-vol.gif");
          }
          sib = sib.previousSibling;
        }
        sib = this.nextSibling;
        while (sib) {
          if (sib.nodeName=="IMG") {
            sib.src = sib.src.replace(/beoordeling-.+\.gif/, "beoordeling-leeg.gif");
          }
          sib = sib.nextSibling;
        }

        var tekst;
        switch (this.nummer) {
          case 1: tekst = "Slecht"; break;
          case 2: tekst = "Matig"; break;
          case 3: tekst = "Gemiddeld"; break;
          case 4: tekst = "Goed"; break;
          case 5: tekst = "Geweldig"; break;
        }
        
        var strong = this.parentNode.getElementsByTagName("H2");
        strong[0].innerHTML = tekst;
      };
    images[i].onmouseout = function() {
        var images = this.parentNode.getElementsByTagName("IMG");
        for (var i=0; i<images.length; i++) {
          images[i].src = images[i].origSrc;
        }
        var strong = this.parentNode.getElementsByTagName("H2");
        strong[0].innerHTML = strong[0].origText;
      };
    images[i].onclick = function() {
        if (setBeoordeling) {
          setBeoordeling(this.nummer, function() { document.getElementById('uw-beoordeling').onmouseout=function(){this.onmouseout=function(){}; prepareBeoordeling();}; });
          var strong = this.parentNode.getElementsByTagName("H2");
          strong[0].origText = strong[0].innerHTML = "Even geduld...";
        }
      };
  }
}

function sendRequest(url,callback,postData) {
  var req = createXMLHTTPObject();
  if (!req) return;
  var method = (postData) ? "POST" : "GET";
  req.open(method,url,true);
  req.setRequestHeader('User-Agent','XMLHTTP/1.0');
  if (postData)
    req.setRequestHeader('Content-type','application/x-www-form-urlencoded');
  req.onreadystatechange = function () {
    if (req.readyState != 4) return;
    if (req.status != 200 && req.status != 304) {
//      alert('HTTP error ' + req.status);
      return;
    }
    callback(req);
  }
  if (req.readyState == 4) return;
  req.send(postData);
}

var XMLHttpFactories = [
  function () {return new XMLHttpRequest()},
  function () {return new ActiveXObject("Msxml2.XMLHTTP")},
  function () {return new ActiveXObject("Msxml3.XMLHTTP")},
  function () {return new ActiveXObject("Microsoft.XMLHTTP")}
];

function createXMLHTTPObject() {
  var xmlhttp = false;
  for (var i=0;i<XMLHttpFactories.length;i++) {
    try {
      xmlhttp = XMLHttpFactories[i]();
    }
    catch (e) {
      continue;
    }
    break;
  }
  return xmlhttp;
}

function leesvoor(link) {
  var leesVoorSpeler = document.getElementById("leesVoorSpeler");
  
  if (!leesVoorSpeler) {
    var leesVoorSpelerDiv = document.createElement("div");
    leesVoorSpelerDiv.id = "leesVoorSpelerDiv";

    var cont = document.getElementById("pagina-actie-links");
    cont.insertBefore(leesVoorSpelerDiv, cont.firstChild);

    var leesVoorIntro = document.createElement("div");
    leesVoorIntro.id = "leesVoorIntro";
    leesVoorIntro.innerHTML = "<strong>Pagina voorlezen</strong><br/>Selecteer het stukje dat je wilt laten voorlezen. Het voorlezen begint vanzelf.";
    cont.insertBefore(leesVoorIntro, cont.firstChild);

    var so = new SWFObject('/_leesvoor/mediaplayer.swf','leesVoorSpeler','180','20','8');
    so.addParam('allowscriptaccess','always');
    so.addParam('allowfullscreen','false');
    so.addVariable('height','20');
    so.addVariable('width','180');
    so.addVariable('file','empty.mp3');
    so.addVariable('id','leesVoorSpeler');
    so.addVariable('usefullscreen','false');
    so.addVariable('autostart','false');
    so.addVariable('shuffle','false');
    so.addVariable('enablejs','true');
    so.addVariable('type','mp3');
    so.addVariable('backcolor','0xFFFFFF');
    so.addVariable('frontcolor','0xFE6700');
    so.addVariable('lightcolor','0x000000');
    so.addVariable('screencolor','0xFE6700');
    so.addVariable('showdownload','false');
    so.addVariable('showdigits','false');
    so.write('leesVoorSpelerDiv');
  }

  document.onmouseup = function() {
    var selectedText = getUserSelectedText();
    if (selectedText) doeLeesVoor(selectedText);
  };
  
  doeLeesVoor();
}
function doeLeesVoor(selectedText) {
  var leesVoorSpeler = document.getElementById("leesVoorSpeler");
  if (leesVoorSpeler && leesVoorSpeler.loadFile) {
    var contentDiv = document.getElementById("content-container");
    if (selectedText || contentDiv) {
      var postData = 'url='+escape('http://www.daltonvoorburg.nl/dummy')+'&'+
                     'customerid=5078&'+
                     'lang=nl_nl&'+
                     'output=audio&';
      if (selectedText) {
        postData += 'selectedtext='+escape(selectedText);
      } else {
        postData += 'selectedhtml='+escape(contentDiv.innerHTML);
      }
      var leesVoorCallback = function(req) {
        var url = req.responseText;
        if (url.match(/^http:\/\/.+\.mp3$/)) {
          leesVoorSpeler.loadFile({file:url,type:'mp3'});
          leesVoorSpeler.sendEvent('playitem',1);
        } else {
          alert('De pagina kan op dit moment niet worden voorgelezen.');
        }
      };
      sendRequest('/_leesvoor/proxy.php', leesVoorCallback, postData);
      if (selectedText) {
        _gaq.push(['_trackEvent', 'Readspeaker', 'Read selected', document.location.href]);
      } else {
        _gaq.push(['_trackEvent', 'Readspeaker', 'Read content div', document.location.href]);
      }
      return true;
    } else {
      var url = 'http://app.readspeaker.com/cgi-bin/rsent?customerid=5078&lang=nl_nl&url='+escape(location.href);
      leesVoorSpeler.loadFile({file:url,type:'mp3'});
      leesVoorSpeler.sendEvent('playitem',1);
      _gaq.push(['_trackEvent', 'Readspeaker', 'Read url', document.location.href]);
      return true;
    }
  } else {
    setTimeout('doeLeesVoor()', 500);
    return false;
  }
}

function getUserSelectedText() {
  // http://www.quirksmode.org/dom/range_intro.html
  var userSelection;
  if (window.getSelection) {
    userSelection = window.getSelection();
  }
  else if (document.selection) { // should come last; Opera!
    userSelection = document.selection.createRange();
  }
  var selectedText = userSelection;
  if (userSelection.text) {
    selectedText = userSelection.text;
  }
  if (!selectedText || selectedText=="") {
    selectedText = null;
  }
  return selectedText;
}
function prepareWaarisRoot() {
  var div = document.getElementById('waaris-root');
  var wieInput = document.getElementById('waaris-root-wie');
  var submitInput = document.getElementById('waaris-root-submit');
  var dataDiv = document.getElementById('waaris-root-data');
  var indicator = document.getElementById('waaris-root-indicator');
  var disclaimer = document.getElementById('waaris-root-disclaimer');
  
  if (div && xmlhttp) {
    submitInput.style.display = 'none';
    indicator.style.display = 'none';
    disclaimer.style.display = 'none';
    div.style.display = '';
    
    wieInput.form.onsubmit = function() { triggerWaarisRoot(); return false; };
    wieInput.onchange = function() { triggerWaarisRoot(); };
    wieInput.onkeydown = function() { triggerWaarisRoot(); };
  }
}

var waarisRootTimeout = null;
var waarisRootCurrentWie = null;
function triggerWaarisRoot() {
  if (waarisRootTimeout) {
    window.clearTimeout(waarisRootTimeout);
  }
  waarisRootTimeout = window.setTimeout(updateWaarisRoot, 400);
}

function updateWaarisRoot() {
  var wieInput = document.getElementById('waaris-root-wie');
  
  if (wieInput.value != waarisRootCurrentWie) {
    waarisRootCurrentWie = wieInput.value;
    xmlhttp.open("GET", "/rooster/waaris?json=1&wie="+encodeURIComponent(wieInput.value), true);
    xmlhttp.onreadystatechange = function() {
      if (xmlhttp.readyState==4) {
        document.getElementById('waaris-root-indicator').style.display = 'none';
        document.getElementById('waaris-root-disclaimer').style.display = '';

        var data = eval(xmlhttp.responseText);
        var dataDiv = document.getElementById('waaris-root-data');
        
        if (data.length==0) {
          dataDiv.innerHTML = '<p>Niet gevonden.</p>';
        } else {
          var s = '<table cellspacing="0">';
          for (var i=0; i<data.length; i++) {
            s += '<tr><td>'+data[i].dag+'</td><td>'+data[i].wie+'</td><td>'+data[i].lokaal+'</td></tr>';
          }
          s += '</table>';
          dataDiv.innerHTML = s;
        }
      }
    }
    xmlhttp.send(null);
    document.getElementById('waaris-root-indicator').style.display = '';
    _gaq.push(['_trackEvent', 'Waar is', 'Voorpagina-blok', waarisRootCurrentWie]);
  }
}



