function Ajax(Adres, Func) {
	this.Adres = Adres;
	this.Func = Func;
	this.Http = null;
	this.Send = function() {
		try {
			this.Http = new XMLHttpRequest();
		} catch(e) {
			try {
				this.Http = new ActiveXObject("Msxml2.XMLHTTP");
			} catch(e) {
				try {
					this.Http = new ActiveXObject("Microsoft.XMLHTTP");
				} catch(e) {
					alert('Uw browser ondersteunt geen ajax');
					return false;
				}
			}
		}
		this.Http.onreadystatechange = this.Func;
		this.Http.open("GET",this.Adres,true);
		this.Http.send(null);
	}
}
function $(Id) {
	return document.getElementById(Id);
}
function $T(Tag) {
	return document.getElementsByTagName(Tag);
}
function $C(Tag) {
	return document.createElement(Tag);
}
function popup(uri,w,h,scrol,resize) {
	if(!scrol) scrol = 'no';
	if(!resize) resize = 'no';
	window.open(uri,'','width='+w+',height='+h+',location=no,status=no,menubar=no,directories=no,toolbar=no,resizeable='+resize+',scrollbars='+scrol);
}
function $A(url) {
	window.location.href = url;
}
function conf(str,uri) {
	if(confirm(str)) window.location.href = uri;
}
var directurl;
function redirect(uri,tm) {
	directurl = uri;
	setTimeout(function() {
		window.location.href = directurl;
	},tm);
}
function toggle(o,d,e) {
	if(!e) var e = window.event;
	if(e.clientX || e.clientY) {
		$(o).style.left = e.clientX + 'px';
		$(o).style.top = e.clientY + 'px';
	} else {
		$(o).style.left = e.pageX + 'px';
		$(o).style.top = e.pageY + 'px';
	}
	$(o).style.display = d;
}
function get_mouse_coors(e) {
	if(document.all) {
		return {x:e.clientX, y:e.clientY}
	} else {
		return {x:e.pageX, y:e.pageY}
	}
}
function pick_calendar(d, m, y, e) {
	if(!e) var e = e || window.event;
	var cs = get_mouse_coors(e);
	$('calendar').style.display = 'block';
	$('calendar').style.left = cs.x + 'px';
	$('calendar').style.top = cs.y + 'px';
	$('calendar').firstChild.src = './kalender.php?d='+d+'&m='+m+'&y='+y+'';
}
