    function showOnly(showId, parentId, tagName) {
                var parObj = document.getElementById(parentId);
                var tagType = "DIV";
                if (tagName) {
                    tagType = tagName.toUpperCase();
                }
                if (parObj) {
                    var children = parObj.childNodes;
                    // alert(db_DumpTree(children, ''));
                    for(c = 0; c < children.length; c++) {
                        if (children[c].nodeName == tagType ) {
                            if (children[c].id == showId) {
                                children[c].style.display = 'block';
                            } else {
                                children[c].style.display = 'none';
                            }
                        }
                    }
                }
            }


// HULPFUNCTIES
function getElement(id) {
    if (document.getElementById(id)) {
        return document.getElementById(id);
    } else {
        alert('Element ' + id + ' is niet gevonden!');
    }
}

function getPageHeight() {
    if (window.innerHeight && window.scrollMaxY) { // Firefox
        yWithScroll = window.innerHeight + window.scrollMaxY;
    } else if (document.body.scrollHeight > document.body.offsetHeight) { // all but Explorer Mac
        yWithScroll = document.body.scrollHeight;
    } else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari
        yWithScroll = document.body.offsetHeight;
    }
    return yWithScroll;
}



function setDivPos(){
    var pageheight = getPageHeight();
    var mainheight = 580
//  var mainheight = getElement('main').offsetHeight;
//  alert(pageheight +" ---" +mainheight );

	if (pageheight > 675){	
    		var topmargin = parseInt(((pageheight - mainheight )/2)); 
		}
	else {
		var topmargin = 50;
		
		}
	getElement('main').style.top = topmargin+"px";
    
}

  /******************************************/
 /***********Muis pos bepalene *************/
/******************************************/
var IE = document.all?true:false;
if (!IE) document.captureEvents(Event.MOUSEMOVE)
document.onmousemove = getMouseXY;
var tempX = 0;
var tempY = 0;
function getMouseXY(e) {
	if (IE) { // grab the x-y pos.s if browser is IE
		tempX = event.clientX + document.body.scrollLeft;
		tempY = event.clientY + document.body.scrollTop;
	}else {  // grab the x-y pos.s if browser is NS
		tempX = e.pageX;
		tempY = e.pageY;
}  

if (tempX < 0){tempX = 0;}
if (tempY < 0){tempY = 0;}  
return true;
}

  /******************************************/
 /***********Abs top pos bepalene **********/
/******************************************/
function getTopPosition(obj){
    var topValue= 0;
    while(obj){
		topValue+= obj.offsetTop;
		obj= obj.offsetParent;
    }
    return topValue;
}

  /******************************************/
 /***********Slide functie met timer********/
/******************************************/
function slideDiv(id, margin){
	if(document.getElementById(id)){
	if(!margin){
		margin = 0;
	}
	var slide = document.getElementById(id);
	slide.style.overflow = "hidden";
	var innerDiv = document.createElement('div');
	innerDiv.id = id+"_innerDiv";
	innerDiv.style.marginTop = "0px";
	innerDiv.innerHTML = slide.innerHTML;
	slide.innerHTML = "";
	slide.appendChild(innerDiv);
	var timer;
	slide.onmouseover=function(){
		timer = setInterval(function(){slideTheDiv(slide, innerDiv, margin);},50);
	}
	slide.onmouseout=function(){
		clearInterval(timer);
	}
	}	
}
  /******************************************/
 /***********Slide functie callback ********/
/******************************************/
function slideTheDiv(div, innerDiv, margin){
	var divTop = getTopPosition(div);
	var divHeight = div.offsetHeight-margin;
	var innerTop = getTopPosition(div);
	var innerHeight = innerDiv.offsetHeight+margin;
	var innerMaxMin = divHeight - innerHeight;
	var innerCurPos = divTop - innerTop;
	var mouseTop = tempY;
	var mouseFromTop = (mouseTop-divTop);

	var pixmove1 = Math.floor((mouseFromTop - Math.ceil(divHeight) / 2) /10);
	var pixmove = ((pixmove1 > 2 || pixmove1 < -2) ? pixmove1 : 0);

	// boel inversen 
	pixmove = (pixmove >= 0 ? parseInt("-"+pixmove) : pixmove * -1);
	
	var curTop = parseInt(innerDiv.style.marginTop.replace("px",""));
	if(curTop >= (innerMaxMin - pixmove) && (curTop + pixmove) <= 0){
		innerDiv.style.marginTop = curTop + pixmove + "px";
	}	
	//document.getElementById('test').innerHTML = pixmove1 + " | " + pixmove + " | " + innerMaxMin + " | " + pixmove ;		
}


