function window_height(){
var x,y;
  if (self.innerHeight) // all except Explorer
  {
	  x = self.innerWidth;
	  y = self.innerHeight;
  }
  else if (document.documentElement && document.documentElement.clientHeight)
	// Explorer 6 Strict Mode
  {
	  x = document.documentElement.clientWidth;
	  y = document.documentElement.clientHeight;
  }
  else if (document.body) // other Explorers
  {
	  x = document.body.clientWidth;
	  y = document.body.clientHeight;
  }

  document.cookie = 'browser_y=' + y;
  document.cookie = 'browser_x=' + x;
  
  
  if (x<1000)
{
document.getElementById('page').style.margin = '-'+y/2+'px 0px 0px -'+x/2+'px';
}
}



function initLightbox(){
	window_height();
  
	if (!document.getElementsByTagName){ return; }
	var anchors = document.getElementsByTagName("a");

	// loop through all anchor tags
	for (var i=0; i<anchors.length; i++){
		var anchor = anchors[i];

		if (anchor.getAttribute("href") && (anchor.getAttribute("rel") == "info")){
			anchor.onclick = function () {showLightbox(this); return false;}
		}
	}
  	
}

function showLightbox(obj){


document.getElementById('zusatz').style.display = 'block';
document.getElementById('backbutton').style.display = 'block';
}  

function hideLightbox(obj){


document.getElementById('zusatz').style.display = 'none';
}  
 
function addLoadEvent(func){	
var oldonload = window.onload;
if (typeof window.onload != 'function'){
    	window.onload = func;
	} 
  else {
		window.onload = function(){
		oldonload();
		func();
		}
	}
}




addLoadEvent(initLightbox);