﻿// JScript File
var preloadFlag = false;

//Preloader, + zet preloadFlag op true
function WM_preloadImages() {
  // Don't bother if there's no document.images
  if (document.images) {
    if (typeof(document.WM) == 'undefined'){
      document.WM = new Object();
    }
    document.WM.loadedImages = new Array();
    // Loop through all the arguments.
    var argLength = WM_preloadImages.arguments.length;
    for(arg=0;arg<argLength;arg++) {
      // For each arg, create a new image.
      document.WM.loadedImages[arg] = new Image();
      // Then set the source of that image to the current argument.
      document.WM.loadedImages[arg].src = WM_preloadImages.arguments[arg];
    }
    preloadFlag = true;
  }
}

//Image swap when preloadFlag = true
function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

//Openen van zoekresultaten
function o(url) {
    if (window.opener) {
        window.opener.document.location.href=url
        window.opener.focus()
        self.focus()
       }
    else
        window.open(url)
}
function end() {
   window.opener.focus()
   window.close()
}
