function $(id){
	if (document.getElementById(id)){
		return document.getElementById(id);
	}else{
		return false;
	}
}
function setHeigth() {
	var divID = "links";
	var bottomDiv
	var bottomDivminheight = 166;
	//var hoogte = document.getElementById("midden").clientHeight
	var vensterH = getSize();
	if (document.getElementById(divID)){
		//if (hoogte > vensterH) {
		//	document.getElementById(divID).style.height = hoogte + 'px';
		//	document.getElementById('midden').style.height = hoogte + 'px';
		//} else{
			document.getElementById(divID).style.height = vensterH-120+ 'px';
			document.getElementById('midden').style.height = vensterH-120 + 'px';
			
			if (bottomDiv = document.getElementById('bottomDiv')){
				
				var photoY = findPosY(bottomDiv);
			
				if (admin== true){
					photoY = photoY+50;
				}
				if (vensterH -photoY < bottomDivminheight){
					bottomDiv.style.height = bottomDivminheight+ 'px';
				} else {
					bottomDiv.style.height = vensterH -photoY+ 'px';
				}
			}
		//}
		
	}
}
function getSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    //myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    //myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    //myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  return myHeight
  
}
function confirmDelete(delUrl) {
  if (confirm("Weet u zeker dat u dit wilt verwijderen?")) {
    document.location = delUrl;
  }
}

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

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

