var agt = navigator.userAgent.toLowerCase();
var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));

var cancel = new Array();
function hidemenu(menu, i) {
	cancel[i] = false;
	setTimeout("hidenow('" + menu + "', " + i + ")", 200);
}

function hidenow(menu, i) {
	try {
		if (!cancel[i]) {
			document.getElementById(menu).style.visibility = 'hidden';
		}
	}
	catch (e) {}
}

function showmenu(src, menu, i) {
	try {
		document.getElementById('submenu' + (i-1)).style.visibility = 'hidden';
	}
	catch (e) {}
	try {
		document.getElementById('submenu' + (i+1)).style.visibility = 'hidden';
	}
	catch (e) {}
	var windowWidth = (window.innerWidth ? window.innerWidth : document.body.clientWidth);
	var offset = (windowWidth - 800)/2;
	if (offset < 0) offset = 0;
	try {
		document.getElementById(menu).style.left = (offset + 120) + "px";
	}
	catch (e) {}
	try {
		document.getElementById(menu).style.visibility = 'visible';
	}
	catch (e) {}
}

function on_load() {
	try {
		document.getElementById("verzenden").onclick = handleEvent;
	}
	catch (er) {}
	try {
		document.getElementById("verzenden").addEventListener("click", handleEvent, false);
	}
	catch (er) {}
}

function handleEvent(aEvent){ 
	/*// if aEvent is null, it is the Internet Explorer event model, 
	// so get window.event. 
	var myEvent = aEvent ? aEvent : window.event;
	*/
	window.open('http://www.bma-ict.nl/www.vccrijnmond.nl/site/index.php?option=com_fiscaal&postcode=' + document.getElementById('postcode').value, null, 'height=600,width=800,status=no,toolbar=no,menubar=no,location=no');
} 

function zoek(to, val) {
		try {
			document.location = to + val;
		}
		catch (er) {}
	}