function nopicture(id) {

  var lyr = getElemRefs('layer');
  if (lyr && lyr.css) lyr.css.visibility = "hidden";
  lyr.css.display = "none"
  
   var hoogte = (document.getElementById(id).offsetTop + 300);
   
   var afbeeldinghoogte = document.getElementById(id).height;
   var totaal = (hoogte + afbeeldinghoogte);
  /* window.scrollTo(0, hoogte); */

}

function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
do {
			curleft += obj.offsetLeft;
			curtop += obj.offsetTop;
	} while (obj = obj.offsetParent);
	return [curleft,curtop];
}
}


function picture(url, info, id) {
	
  var lyr = getElemRefs('layer');
  if (lyr && lyr.css) lyr.css.visibility = "visible";
  lyr.css.display = "block";
  
  document.getElementById('img').innerHTML = "Loading picture, please wait...";
  document.getElementById('img').innerHTML = "<a onclick=\"javascript:nopicture('" + id + "');\" href=\"#" + id + "\"><img id=\"screenshot\" src=\"" + url + "\" alt=\"" + info + "\" /></a>";
  document.getElementById('imgclose').innerHTML = "<a href=\"#" + id + "\" onclick=\"javascript:nopicture('" + id + "');\">Close</a>";
  document.getElementById('imginfo').innerHTML = info;

 	window.scrollTo(0,0);

	
  
}

function hl(id) {
	document.getElementById(id).style.backgroundImage = 'url(images/Pictures/Small/border-light.jpg)';
}

function nl(id) {
	document.getElementById(id).style.backgroundImage = 'url(images/Pictures/Small/border.jpg)';
}

function jpb(id) {
	document.getElementById(id).src = 'images/Arrow-light.jpg';
}

function jpbw(id) {
	document.getElementById(id).src = 'images/Arrow.jpg';
}

function getElemRefs(id) {
	var el = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? getLyrRef(id,document): null;
	if (el) el.css = (el.style)? el.style: el;
	return el;
}

function getWindowHeight() {
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') {
		windowHeight = window.innerHeight;
	}
	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}
		else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
