// Functie om een methode 'onResize' uit te voeren
function onResize(method) {
  if(is.ns4comp || is.ns6comp) {
    return window.onresize = method;
  } else {
    document.body.onresize = method;
  }
}

// Functie om een methode 'onScroll' uit te voeren
function onScroll(method) {
  if(is.ns4comp || is.ns6comp) {
    return window.onscroll = method;
  } else {
    document.body.onscroll = method;
  }
}

function initStijlset() {
  prepareScrollPaginaFuncties();
  setPrint();
  document.documentElement.onscroll = scrollPaginaFuncties; // for IE
  window.onscroll = scrollPaginaFuncties; // for Moz
  window.onresize = scrollPaginaFuncties;
  document.getElementById("Doelgroepafbeelding_rechtsboven").style.overflow="hidden";
}

function checkScroll() {
  //check how much the page has scrolled. for each element in the array, offset it by the amount of scroll
  var meDiX = 0, meDiY = 0, PrevmeDiX = 0, PrevmeDiY = 0;
  if( typeof( window.pageYOffset ) == 'number' ) { meDiY = pageYOffset; meDiX = pageXOffset; } else {
    if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
      meDiY = document.body.scrollTop; meDiX = document.body.scrollLeft;
    }
    else {
      if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
        meDiY = document.documentElement.scrollTop; meDiX = document.documentElement.scrollLeft;
      }
    }
  }
  if (meDiX != PrevmeDiX || meDiY != PrevmeDiY) scrollPaginaFuncties();
}


function setPrint() {
  var anchors = document.getElementsByTagName('a');
  for(var i=0; i<anchors.length; i++) {
    if(anchors[i].className == 'print') {
      anchors[i].onclick = function() {
        print();
      }
    }
  }
}