function browserObject() {
	this.ver = navigator.appVersion;

	this.docId = (document.getElementById && document.defaultView) ? true : false;
	this.docLay = document.layers ? true : false;
	this.docAll = document.all ? true : false;
	
	this.compatible = ( this.docId || this.docLay || this.docAll );

	this.width = null; //to be set later after document is loaded;
	this.height = null; //to be set later after document is loaded;
	return this;
}
var browser = new browserObject();

var _oBody; // Will hold pointer to document body

function initBrowserComp() {
	if (browser.compatible) { // browser compatible ?
		if (browser.docAll) {
			// IE6 with right doctype needs 'document.documentElement'
			if(document.documentElement && document.body.clientHeight == 0) _oBody = document.documentElement;
			else _oBody = document.body;
			browser.width = _oBody.clientWidth;
			browser.height = _oBody.clientHeight;
		}
		else if (browser.docId) {
			browser.width = window.innerWidth;
			browser.height = window.innerHeight;
			_oBody = document.body;
		}
		else if (browser.docLay) {
			browser.width = window.innerWidth;//-20;
			browser.height = window.innerHeight;//-20;
		}
	}
}

function initall() {
	initBrowserComp();
	window.onresize = initall;
	checkScroll();
}
var _iY, _iH;

function checkScroll() {
	var iY = (browser.docLay) ? window.pageYOffset : _oBody.scrollTop;
//	var iH = (browser.docLay) ? document.layers['navScrollDiv'].document.images[0].height : document.images['scrollIMG'].height;
	var iH = 72;
	iY += browser.height - iH;
	if((_iY != iY) || (_iH != iH)) layerMoveTo('divIconen',0,iY);
	_iY = iY;
	_iH = iH;
	setTimeout('checkScroll()',10);
}

function layerMoveTo( sID, iX, iY) {
	var oSL = layerGetRef(sID);
	if (browser.docLay) {
		oSL.moveTo(iX, iY);
	}
	else {
		oSL.style.left= iX +'px';
		oSL.style.top = iY +'px';
	}
}

function layerGetRef( sID ) {
	if (browser.docId) return document.getElementById(sID);
	else if (browser.docLay) return document.layers[sID];
	else if (browser.docAll) return document.all[sID];
}

function isDefined( vElt ) {
	var UNDEF;
	var bDef = (vElt == UNDEF) ? false : true;
	return bDef;
}

/* URL Rewrites */
/* Gebruiken ipv de normale open functie */
function openPrefix(Name, Title, Style) {
    if (document.getElementsByTagName('base')[0] && Name.substring(0, 1) != "/") {
        var prefix = document.getElementsByTagName('base')[0].href;
    }
    else {
        var prefix = "";
    }
    window.open(prefix + Name, Title, Style);
}
