function showGalleryImage () {
		
		var widthFull   = screen.width;
		var heightFull  = screen.height;
		var screenWidth = window.innerwidth || document.documentElement.clientWidth;
		var screenHeight = window.innerHeight || document.documentElement.clientHeight;
		var curImage    = null;
		var curGal      = null;
		var imgHeight   = null;
		var imgWidth    = null;
        var imageRoot   = null;
				                
		this.loadImage = function (path) {
			
			var imageLoad = new AjaxLoader.construct("index.php");
				imageLoad.setSendMethod("GET");
				imageLoad.addGetParam("action","ImageLoader");
				imageLoad.addGetParam("curImg",path);
				imageLoad.setCallBack(showGalImage);
				imageLoad.initLoad();
		}
				
		function showGalImage() {
		
			var request = this.http_request.responseText;
            var width  = 0;
            var height = 0;
            
			var contentValues = request.split("@@@");

            var img     = new Image();
                img.src = contentValues[3];
            
            
            if(img.complete) {
                displayImage();
            } else {
                img.onload = function () {
                    displayImage();
                }
            }
            
            function displayImage() {

                if(!imageRoot) {
                    imageRoot = document.createElement('DIV');
                    imageRoot.className = 'simpleWindowRoot';
                    imageRoot.id        = 'simpleWindow';
                        
                    document.getElementsByTagName('BODY')[0].appendChild(imageRoot);   
                }
                                     
                document.getElementById('simpleWindow').innerHTML = contentValues[0];            
                document.getElementById('simpleWindowBody').innerHTML = '<img src="'+img.src+'" alt="bild">'; 
                                     
    			with(document.getElementById('simpleWindow')) {
                    style.display='block';
                    style.border = '1px solid';
                    style.width  = (parseInt(contentValues[1])+40)+'px';
                                  
                    width = offsetWidth;
                    height = offsetHeight;
    			}
                
                
                
                //rücken wir alles in die Mitte nun            
                var leftSpacing = Math.ceil((screenWidth-width)/2);
                var topSpacing  = Math.ceil((screenHeight-height)/2);
                            
                var scrollAmountTop = document.documentElement.scrollTop || window.pageYOffset; 
                            
                with(document.getElementById('simpleWindow')) {                   
                    style.left = leftSpacing+"px";
                    style.top  = topSpacing+scrollAmountTop+"px";
                    style.display='block';
                }
                
                eventHandling(document.getElementById('closeSimpleWindowButton'),'click',closeSW);
            }

		}
        
        function closeSW () {
            imageRoot.parentNode.removeChild(imageRoot);
            imageRoot = null;
        }
	}
    	
	function highlightGalleryThumb(obj,id,highlight) {
        
		if(highlight){
        
			obj.className += ' highLightImage';
            
			var newWidth = parseInt(document.getElementById(id).offsetWidth)+3;
			var newHeight = parseInt(document.getElementById(id).offsetHeight)+3;
			
            document.getElementById(id).style.width = newWidth+'px';
			document.getElementById(id).style.height = newHeight+'px';
		
        }else {
			obj.className = obj.className.replace(/highLightImage/,'');
			var newWidth = parseInt(document.getElementById(id).style.width)-3;
			var newHeight = parseInt(document.getElementById(id).style.height)-3;
			document.getElementById(id).style.width = newWidth+'px';
			document.getElementById(id).style.height = newHeight+'px';
		}
	}
    
    function addNet(url,titel){
        if((typeof window.sidebar=="object") && (typeof window.sidebar.addPanel=="function")){
            window.sidebar.addPanel(titel,url,"");
        }else{
            alert("Sie Nutzen eine veralterte Netscape Version!\nLesezeichen hinzufügen ist nicht möglich!");
        }
    }
    
    function lesezeichen(){
        var url=window.location.href,t=document.title,ap=navigator.appName;
        
        if(ap=="Microsoft Internet Explorer"){
            window.external.AddFavorite(url,t);
        }else{
            if(ap=="Netscape"){
                addNet(url,t);
            }else{
                alert("Mit ihren Browser ist kein Lesezeichen über Javascript möglich.\nBitte legen sie das Lesezeichnen manuel an.\nURL:"+url);
            };
        }
    };
    
    var sGI = null;
    
    window.onload = function () {

        sGI = new showGalleryImage();
       
       /**
                     * Banner Change
                     */
        var bc = new Bannerchange();
            bc.init();
              
        /**
                       * für das GB
                       */
        if(typeof Guestbook == 'function') {
            var smilieWindow = document.getElementById('smilieSelectGB');
            var msgField     = document.getElementById('gbMessage');
            
            new Guestbook(smilieWindow,msgField);
        }
    }