// Browser Window Detection for ASP
// [c] 2003 Herold Velema / dotSolutions
// h.r.velema@dotSolutions.nl / www.dotsolutions.nl

var windowWidth = 630, windowHeight = 460;

function getWindowSize() {
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    windowWidth = window.innerWidth;
    windowHeight = window.innerHeight;
  } else {
    if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
      //IE 6+ in 'standards compliant mode'
      windowWidth = document.documentElement.clientWidth;
      windowHeight = document.documentElement.clientHeight;
    } else {
      if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
        //IE 4 compatible
        windowWidth = document.body.offsetWidth;
        windowHeight = document.body.offsetHeight;
      }
    }
  }
}

function makeCookies() {
  // document.cookie = "windowHeight=" + windowHeight;
  // document.cookie = "windowWidth=" + windowWidth;
  
  document.write ("Gedetecteerde browser.windowHeight: " + windowHeight + "<br>");
  document.write ("Gedetecteerde browser.windowWidth: " + windowWidth + "<br>");
}

function goToPage(pageToLoad) {
	pageToLoad = pageToLoad + "&windowHeight=" + windowHeight + "&windowWidth=" + windowWidth;
	document.write ("<p>Wanneer u niet automatisch wordt doorgestuurd, klik dan <a href='" + pageToLoad + "'>hier</a> ...")
	window.location.href = pageToLoad;
}

document.write("Gedetecteerde status JavaScript: Ingeschakeld<br>");
getWindowSize();
makeCookies();
