	
	var ppTop = 427;
	var ppAmount = 2;
	var ppTimeout = 2;
	var ppForwardPage = "overview.html";
	
	
	/* DHTML micro API */
	function getObj(name) {
		if (document.getElementById) {
			this.obj = document.getElementById(name);
			this.style = document.getElementById(name).style;
		} else if (document.all) {
			this.obj = document.all[name];
			this.style = document.all[name].style;
		} else if (document.layers) {
			this.obj = document.layers[name];
			this.style = document.layers[name];
		}
	}
		
	/* Checks whether DHTML is active. */
	function isDhtml() {
		return (document.getElementById || document.all || document.layers);
	}
	
	/* Initializes the layer functionality */
	function initIntro(top, amount, timer, page) {
		if (isDhtml()) {
			ppTop = top;
			ppAmount = amount;
			ppTimeout = timer;
			ppForwardPage = page;
		}
	}
	
	/* Scrolls the initialized layer down till an end position */
	function scrollDown(amount, pos) {
		if (isDhtml()) {
			var bottomLayer = new getObj('bottomLayer');
			
			if (parseInt(bottomLayer.style.top) < pos) {
				bottomLayer.style.top = parseInt(bottomLayer.style.top) + amount + "px";
				setTimeout('scrollDown(' + amount + ', ' + pos + ')', ppTimeout);
			} else if (ppForwardPage != null && ppForwardPage != "") {
				// window.location.href = ppForwardPage;

				scrollTimer = window.setTimeout(function() {
						var introLayer = new getObj('introLayer');
						var img_separator = new getObj('img_separator');
						var img_overview = new getObj('img_overview');
						var showSelection = new getObj('showSelection');
						var showOverview = new getObj('showOverview');
						introLayer.style.display = 'none';
						img_separator.style.display = 'block';
						img_overview.style.display = 'block';
						showOverview.style.display = 'none';
						showSelection.style.display = 'block';
					}, 500
				);

			}
		}
	}
	
	function fromFlash() {
		if (isDhtml()) {
			// Set the background of the intro to transparent.
			var introLayer = new getObj('introLayer');
			introLayer.style.background = 'transparent';

			// Scroll down the navigation
			scrollDown(ppAmount, ppTop);
		}
	}
	
	/* Checks if browser is supported. */
	function checkBrowser() {
		if ( (navigator.appName == 'Microsoft Internet Explorer' && navigator.appVersion.substring(0,1) > '3') 
			|| (navigator.appName == 'Netscape' && navigator.appVersion.substring(0,1) >= '3')) {
			return true;
		} 

		return false;
	}
	
		/*
	 * Checks if a flash player is installed.
	 */
	function checkFlash() {
		var hasFlash = false;
		
		if (checkBrowser()) {
			if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]
				&& navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin
				&& navigator.plugins && navigator.plugins["Shockwave Flash"])
			{
				hasFlash = true;
			} else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE") != -1 && (navigator.userAgent.indexOf('Win') != -1)) {
				try {
					// version will be set for 4.X or 5.X player
					var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
					var version = axo.GetVariable("$version");
					if (version != -1 ) {
						hasFlash = true;
					}
				} catch (e) {
				}
			}
		}
		
		return hasFlash;
	}
