function popup(strUrl, strName, strWidth, strHeight) {
	intLeft = (screen.width - strWidth) / 2;
	intTop = (screen.height - strHeight) / 2;
	strParams = 'width=' + strWidth + ',height=' + strHeight + ',top=' + intTop + ',left=' + intLeft + ',scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';

	try {
		objPopup = window.open(strUrl, strName, strParams);
		if (objPopup) {
			objPopup.window.focus();
		} else {
			throw 'Helaas!\nDoor een popup blocker kon deze popup niet geopend worden.';
		}
	} catch(err) {
		alert(err);
	}
}

function toggleID( targetId ) {
	if (document.getElementById){
		target = document.getElementById( targetId );
		if (target.style.display == "none"){
			target.style.display = "";
		} else {
			target.style.display = "none";
		}
	}
};

window.onload = function() {
	var x = document.getElementsByTagName('a');
	for (var i=0;i<x.length;i++) {
		if (x[i].className == 'popup') {
			x[i].href = 'javascript://';
			x[i].onclick = function () {
				if (this.id == 'plattegrond') {
					popup('/belvedair/media/plattegrond.jpg', 'plattegrond', 750, 430);
				}
				return false;
			}
		}
		if (x[i].className == 'toggle') {
			x[i].href = 'javascript://';
			x[i].onclick = function () {
				return toggleID(this.id + 'c')
			}
		}
	}
};