function NW(adres) {
	window.open(adres);
}

function Popup(adres, w, h) {
	window.open(adres, "", "toolbar=no, width=" + w + ",height=" + h);
}

function Goto(obj) {
	var URL = obj.options[obj.selectedIndex].value;
	window.location.href = URL;
}

var oldObj;

function expand(name) {
	if (oldObj)
		oldObj.style.display = 'none';

	obj = document.getElementById(name);
	if (obj.style.display == 'none')
		obj.style.display = '';
	else
		obj.style.display = 'none';

	oldObj = obj;
}

function show(name) {
	obj = document.getElementById(name);
	if (obj.style.display == 'none')
		obj.style.display = '';
	else
		obj.style.display = 'none';
}

function getInfo(l, q, h) {
	var xmlHttpReq = false;
	var self = this;

	// Mozilla/Safari
	if (window.XMLHttpRequest) {
		self.xmlHttpReq = new XMLHttpRequest();
	}
	// IE
	else if (window.ActiveXObject) {
		self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
	}

	self.xmlHttpReq.open('GET', '/query.php?l=' + l + '&h=' + h + '&q=' + q, true);
	self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	self.xmlHttpReq.onreadystatechange = function() {
		if (self.xmlHttpReq.readyState == 4) {
			document.getElementById("explanation").innerHTML = self.xmlHttpReq.responseText;
		}
	}
	self.xmlHttpReq.send(null);
}

// Spring uit frames
if (top.location.href != document.location.href) {
	top.location.href = document.location.href;
}

function hideText(inputField, autotext) {
	if (inputField.value == autotext) {
		inputField.value = "";
		inputField.style.color = "#000";
	}
}

function showText(inputField, autotext) {
	if (inputField.value == "") {
		inputField.value = autotext;
		inputField.style.color = "#AAA";
	}
}
