function hide(obj) {
	if(!obj.contains(event.toElement)) {
		obj.style.visibility = 'hidden';
	}
}

function hideAllExcept(obj, mBeneden) {
	var Count, i;

	Count = document.all.tags("SPAN").length;
	for (i = 0; i < Count; i++) {
		document.all.tags("SPAN")[i].style.visibility = 'hidden';
	
	}
	obj.style.visibility = 'visible';
}

function MouseOut(obj) {
	if (obj.style.zIndex == 0) {
		obj.style.backgroundColor = 'FFFFFF';
	}
}

function MouseOver(obj) {
	if (obj.style.zIndex == 0) {
		obj.style.backgroundColor = 'ECF4FD';
	}
}

function ClearBackgrounds(table) {
	var Count, i;

	Count = table.all.tags("TD").length;
	for (i = 0; i < Count; i++) {
		table.all.tags("TD")[i].style.backgroundColor = 'FFFFFF';
		table.all.tags("TD")[i].style.zIndex = 0;
	}
}

function checkHeight(obj, mBeneden) {
	if (document.body.clientHeight > mBeneden) {
		hideAllExcept(eval('main' + obj));
	} else {
		hideAllExcept(eval('main' + obj + 'boven'));
	}
}

