    var loaded = false;
    
    var browser		    = navigator.appName;
    var system		    = navigator.userAgent;
    var macintosh       = (navigator.userAgent.indexOf("Mac") > -1) ? true : false;
    if (window.print); {macintosh = false;}

    window.defaultStatus = "=== Initiative gegen Mangelernährung in Österreich ====";
    
    
    // Browsertyp ermitteln
    var B_Type = new crossBrowserType();
    
    // Navi Preloader
    var nav = new Array(); 

    
    function crossBrowserType() 
    {
        this.IE = false;
        this.NS4 = false;
        this.NS6 = false;
        this.id = "";
        
        if (document.all) {this.IE = true; this.id = "IE";}
        else if (document.getElementById) {this.NS6 = true; this.id = "NS6";}
        else if (document.layers) {this.NS4 = true; this.id = "NS4";}
    } 
    
    
  
    function init( fullsite )
        {
            if (!fullsite) { 
                document.forms['members']['user'].focus();
                //alert(document.getElementById("mainContent").style.overflowX);
            }
            
            for(var i=1; i<=8 ; i++)
               { nav[i]= new Image(); nav[i].src="/img/site/nav_0"+i+"_mo.gif"; }
            
            loaded = true;
            resize();
        }
        
        
        
        
        var content_height= 0;
        function resize()
        {
                if (content_height == document.getElementById("Spreizer").style.height) { return; }
                content_height = getHeight() - (117 + 25 + 45);
                
                //alert(getWidth());
                //alert(crossGetScroll("x"));
                if (getWidth() <= 1098 || crossGetScroll("x") > 0) { content_height -= 10; }
                
                document.getElementById("Spreizer").style.height = content_height + "px";
                
                iframe_setup();
                
        }
    
    
    
    function iframe_setup()
    {
        if (document.getElementById("webforum") && B_Type.IE) {
            var iframe_height = window.frames["webforum"].document.body.clientHeight;
            document.getElementById("webforum").style.height = (iframe_height + 10) +"px";
        }
    }
    
    
    
    
    function getHeight () 
    {
      if (window.innerHeight) {
            return window.innerHeight;
      } else if (document.body && document.body.offsetHeight) {
            return document.body.offsetHeight;
      } else {
            return 0;
      }
    }
    
    function getWidth () 
    {
      if (window.innerWidth) {
            return window.innerWidth;
      } else if (document.body && document.body.offsetWidth) {
            return document.body.offsetWidth;
      } else {
            return 0;
      }
    }
    

    function crossGetScroll(achse) 
    {
        var val;
        if (!achse || achse == "y") {  // vertikale Achse
        if (B_Type.IE) val=document.body.scrollTop;
        else if (B_Type.NS6) val=window.pageYOffset;
        else if (B_Type.NS4) val=window.pageYOffset;
        }
        else {  // horizontale Achse
        if (B_Type.IE) val=document.body.scrollLeft;
        else if (B_Type.NS6) val=window.pageXOffset;
        else if (B_Type.NS4) val=window.pageXOffset;
        }
        return val;
    } 




    var remoteWin = false;
    
    function PopUp (url, breite, hoehe, x, y, noBorder, scrollbars_off)
    {
    
        var fenstereigenschaften = "";
        var win_width  = window.screen.width;
        var win_height = window.screen.height;
        
        //Pruefung, ob zwei Monitore angeschlossen sind
        var secondMon = 0;
        if (win_width >= 1600) {win_width = win_width/2; secondMon=win_width;}
    
        if (x<0) {x = secondMon+(win_width-breite)/2;} else if (!x){x=0;}
        if (y<0) {y = (win_height-hoehe)/2;} else if (!y){y=0;}
        
        x -= 20;
        
        if (!scrollbars_off) {scrollbars_off = 0;}
        
        
        if (noBorder <= 0) {
            fenstereigenschaften = "resizable=0,toolbar=0,scrollbars="+scrollbars_off+",fullscreen=0,status=0,directories=0,menubar=0,location=0,width="+breite+",height="+hoehe+",screenX="+x+",left="+x+",screenY="+y+",top="+y;
        } else {
            fenstereigenschaften = "resizable=1,toolbar=0,scrollbars="+scrollbars_off+",fullscreen=0,status=0,directories=0,menubar=0,location=0,width="+breite+",height="+hoehe+",screenX="+x+",left="+x+",screenY="+y+",top="+y;
        }
    
        remoteWin = window.open(url,"WAIT",fenstereigenschaften);
    
    }


