// JavaScript Document
	function disableSelection(target){
		/*
		if (typeof target.style.MozUserSelect!="undefined") //Firefox route
			target.style.MozUserSelect="none"
		else //All other route (ie: Opera)
		*/
		if (typeof target.onselectstart!="undefined") //IE route
			target.onselectstart=function(){return false}
		else 
			target.onmousedown=function(){return false}
	}
	
	function $(id){
		if(document.getElementById(id)){
			return(document.getElementById(id));
		}else{
			//alert('ID '+id+' bestaat niet!')	
			return false;
		}
	}
	
	function Viewport(){ 
		this.windowX = (document.documentElement && document.documentElement.clientWidth) || window.innerWidth || self.innerWidth || document.body.clientWidth; 
		this.windowY = (document.documentElement && document.documentElement.clientHeight) || window.innerHeight || self.innerHeight || document.body.clientHeight; 
		this.scrollX = (document.documentElement && document.documentElement.scrollLeft) || window.pageXOffset || self.pageXOffset || document.body.scrollLeft; 
		this.scrollY = (document.documentElement && document.documentElement.scrollTop) || window.pageYOffset || self.pageYOffset || document.body.scrollTop; 
		this.width = (document.documentElement && document.documentElement.scrollWidth) ? document.documentElement.scrollWidth : (document.body.scrollWidth > document.body.offsetWidth) ? document.body.scrollWidth : document.body.offsetWidth; 
		this.height = (document.documentElement && document.documentElement.scrollHeight) ? document.documentElement.scrollHeight : (document.body.scrollHeight > document.body.offsetHeight) ? document.body.scrollHeight : document.body.offsetHeight;
		return(this)
	}
	
	function scrollPosition(){
		test = Viewport();
		return(test.scrollY);
	}
	
	function trace(msg){
		$('debug').innerHTML = msg +'<br />'+$('debug').innerHTML;	
	}
	
	var checkin 	= false;
	var checkout 	= false;
	var lightboxMoveTimeout = false;
	function showLightbox(){
		var coordinates = Viewport();
		$('lightbox').style.height = coordinates.height + 'px';		
		$('lightbox').style.display = 'block';
		if($('select_1')) $('select_1').style.visibility = 'hidden';
		if($('select_2')) $('select_2').style.visibility = 'hidden';		
		moveLightbox();
		window.onscroll = window.onresize = function(){
			moveLightbox(true)
		}
	}
	
	function hideLightbox(){
		if($('select_1')) $('select_1').style.visibility = 'visible';
		if($('select_2')) $('select_2').style.visibility = 'visible';	
		$('lightbox').style.display = 'none';	
		window.onscroll = window.onresize = function(){
			return false;
		}
	}
	
	function moveLightbox(onlyx){
		var coordinates = Viewport();
		var newposY = Math.round(coordinates.scrollY + ((coordinates.windowY - $('lightbox_content').offsetHeight)/2));
		var newposX = Math.round(coordinates.scrollX + ((coordinates.windowX - $('lightbox_content').offsetWidth)/2));		
		if(newposY != parseInt($('lightbox_content').style.top) || newposX != parseInt($('lightbox_content').style.height)){
			if(!onlyx)
			$('lightbox_content').style.top = newposY + 'px';
			$('lightbox_content').style.left = newposX + 'px';	
			$('lightbox_bg').style.height = coordinates.height + 'px';
			$('lightbox_bg').style.width = coordinates.width + 'px';	
		}				
	}	
