	/**
	 * This script is used to display images fullsized in center of the screen
	 *
	 * @author  Matthias Sojka
	 * @package Framework
	 * @version 0.01 / 16.04.2008
	 */
	var bIsCrappyBrowser = 0;
	//Hide Image
	function hidePic() {
		$('containerImagePreview').style.display = 'none';
		$('dimmer').style.display                = 'none';
	}
	
	//Show Image
	function showPic(oImg,iWidth,iHeight,border) {		
		 if($('dimmer').getStyle("position") == 'absolute') {
		 	bIsCrappyBrowser = true;
		 	var aViewPort        = document.viewport.getScrollOffsets();
		 }
		 iWidth   = parseInt(iWidth);
		 iHeight  = parseInt(iHeight);
		
		 if(bIsCrappyBrowser) {
		 	$('dimmer').style.top    = aViewPort[1]+'px';
		 	$('dimmer').style.left   = aViewPort[0]+'px';
		 	var iWindowWidth  = windowWidth();
		 	var iWindowHeight = windowHeight();
		 	var xPos = ((iWindowWidth  / 2) - (iWidth / 2))  + aViewPort[0];
		 	var yPos = ((iWindowHeight / 2) - (iHeight / 2)) + aViewPort[1];
		 } else {
		 	$('dimmer').style.top    = '0px';
		 	$('dimmer').style.left   = '0px';
		 	var aDimensions   = document.viewport.getDimensions();
		 	var iWindowWidth  = aDimensions['width'];
		 	var iWindowHeight = aDimensions['height'];
		 	var xPos = (iWindowWidth  / 2) - (iWidth / 2);
		 	var yPos = (iWindowHeight / 2) - (iHeight / 2);
		 }
		 $('dimmer').style.width  = iWindowWidth+'px';
		 $('dimmer').style.height = iWindowHeight+'px';
		 $('dimmer').setStyle("opacity: 0.9");
		 $('containerImagePreview').style.width   = iWidth+'px';
		 $('containerImagePreview').style.height  = iHeight+'px';
		 $('containerImagePreview').style.top     = yPos+'px';
		 $('containerImagePreview').style.left    = xPos+'px';
		 $('containerImagePreview').style.width   = (iWidth+border)+'px';
		 $('containerImagePreview').style.height  = (iHeight+border)+'px';
		 $('dimmer').style.display                = 'block';
		 $('containerImagePreview').style.display = 'block';
		 $('imagePreview').height                 = iHeight;
		 $('imagePreview').width                  = iWidth;
		 $('imagePreview').src                    = oImg.src;
	}
	
	//Figures out the screen width (to determine to center for dialog windows)
	function windowWidth() {
		if (window.innerWidth) {
			return window.innerWidth;
		} else if (document.body && document.body.offsetWidth) {
			return document.body.offsetWidth;
		} else {
			return 0;
	  	}
	}
	
	//Figures out the screen height (to determine to center for dialog windows)
	function windowHeight() {
		if (window.innerHeight) {
			return window.innerHeight;
	  	} else if (document.body && document.body.offsetHeight) {
			return document.body.offsetHeight;
	  	} else {
			return 0;
	  	}
	}