/*
 * Functies behulpzaam voor het tonen van dingen op het scherm
*/

function getElementById(id){
	return (document.all ? document.all[id] : document.getElementById(id) );
};

function showhideSelectie(id) {
	var showhide = getElementById(id);
	if (showhide.className == 'show') {
		showhide.className = 'hide';
	} else {
		showhide.className = 'show';
	}
}

function showHideCheck(id,which_action) {
	var showhide = getElementById(id);
	if (which_action == 'show') {
		showhide.className = 'show';
	} else {
		showhide.className = 'hide';
	}
}

function findPosX(obj) {
	var curleft = 0;
	if (obj.offsetParent) {
		while (obj.offsetParent) {
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	} else if (obj.x)
		curleft += obj.x;
	return curleft;
}

function findPosY(obj) {
	var curtop = 0;
	if (obj.offsetParent) {
		while (obj.offsetParent) {
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	} else if (obj.y)
		curtop += obj.y;
	return curtop;
}

function scrollToObj(obj) {
	scrollTo(findPosX(obj), findPosY(obj));
}

function full_screen() {
	var URL = document.location.href;
	var breedte = screen.availWidth;
	var hoogte = screen.availHeight; 
	window.open(URL,'_blank','top=0,left=0,width='+(breedte-10) +',height='+(hoogte-30) +',location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes,resizable=yes');
}
