function getcat(tt) {
	location = "default.asp?MTbl=" + document.myform.categorie.value + "&TT=" + tt;
}

function kijkindewijk(tt) {
	for(i=0; i<=document.myform.wat.value.length; i++)
	{
		if(document.myform.wat.value.charAt(i) == "|") 
		{
			ic = document.myform.wat.value.substring(0, i);
			cat = document.myform.wat.value.substring(i + 1, document.myform.wat.value.length + 1);
		}
	}

	if(ic=="-1")
	{
		alert("U dient bij 'wat zoekt u?' een subcategorie te selecteren. Bv.: * Basisonderwijs bij Onderwijs.");
	}
	else {
		location = "default2.asp?MTbl=" + document.myform.categorie.value + "&tt=" + tt + "&WkId=-1&Categorie=" + cat + "&Ic=" + ic + "&pc1=";
	}
}

function toggle(obj) {
	getObj(obj).style.display = (getObj(obj).style.display == "none") ? "block" : "none";
}

function getObj(obj) {
	return (document.getElementById) ? document.getElementById(obj) : document.all[obj];
}

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 = 230;
	iY += browser.height - iH;
	if((_iY != iY) || (_iH != iH)) layerMoveTo('bgfading',199,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;
}

function Popup(p){
	window.open(p ,"_blank","toolbar=no,location=no,menubar=no,scrollbars=yes,width=590,height=505,resizeable=no,status=no");
}

