esproducts = {
 start: function() {
  this.lijst = document.getElementById('lijst');
  this.lijst.title = 'Productgalerij';
  this.lijst.onclick = function() {
   document.location = '/productgalerij';
  };
  this.lijst.className = 'js';
  this.aantal = this.lijst.getElementsByTagName('li').length;
  this.changeList();
 },
 changeList: function() {
  this.lijst.getElementsByTagName('li')[this.current].className = '';
  this.current = Math.floor(Math.random() * this.aantal);
  this.lijst.getElementsByTagName('li')[this.current].className = 'current';
  window.setTimeout('esproducts.changeList()', 2000);
 },
 lijst: null,
 aantal: null,
 current: 0
};

// Dean Edwards/Matthias Miller/John Resig
function init() {
 if (arguments.callee.done) return;
 arguments.callee.done = true;
 if (_timer) clearInterval(_timer);
 if (document.getElementById) {
  esproducts.start();
 }
};

if (document.addEventListener) {
 document.addEventListener('DOMContentLoaded', init, false);
}

/*@cc_on @*/
/*@if (@_win32)
 document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>");
 var script = document.getElementById("__ie_onload");
 script.onreadystatechange = function() {
  if (this.readyState == "complete") {
   init(); // call the onload handler
  }
 };
/*@end @*/

if (/WebKit/i.test(navigator.userAgent)) {
 var _timer = setInterval(function() {
  if (/loaded|complete/.test(document.readyState)) {
   init();
  }
 }, 10);
}

window.onload = init;