
var myHeight = 0;
if( typeof( window.innerHeight ) == 'number' ) {
    //Non-IE
    myHeight = window.innerHeight;
}  else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { 
    //IE 6+ in 'standards compliant mode' 
    myHeight = document.documentElement.clientHeight; 
} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myHeight = document.body.clientHeight;
}
if (screen.height < 910 || myHeight < 820 ) {
    document.write('<link type="text/css" rel="stylesheet" href="stylesheets/1024x768.css" >');
}

function scrollit(){
    var fenster = document.getElementsByTagName("html")[0];
    if( fenster.scrollLeft > 5 ){
        document.getElementById("leisteInner").style.position = "relative";
        
        if( fenster.scrollTop > 0 ){
            var hoehe;
            //alert (myHeight);
            //alert(fenster.scrollTop);
            /*if( (650 - myHeight) > 0 ){
                 hoehe = document.getElementById("main").offsetHeight - myHeight - 100;
                 alert("offsetHeight: "+document.getElementById("main").offsetHeight+"<br>scroltOp:"+fenster.scrollTop);
            }     
            else {
                hoehe = document.getElementById("main").offsetHeight;
                  
            }
            if( fenster.scrollTop < hoehe )
                document.getElementById("leisteInner").style.top = fenster.scrollTop+"px";
            */
            if ( (fenster.scrollTop + 610) < document.getElementById("main").offsetHeight )
                document.getElementById("leisteInner").style.top = fenster.scrollTop+"px";
        
        }
        else 
            document.getElementById("leisteInner").style.top = "10px";
    }
    /*else{
        document.getElementById("leisteInner").style.position = "fixed";
        document.getElementById("leisteInner").style.top = "";
    }*/
}

function openImage(image) {
    var fenster;
    var bild;
    bild = new Image();
    bild.src = image;
    //pageH = Window.outerHeight;
    //pageW = Window.outerWidth;
    //alert(parseInt(bild.height));
    //alert(parseInt(bild.width));
    fenster = window.open("","Detailansicht","width="+(parseInt(bild.width)+20)+",height="+(parseInt(bild.height)+28)+",left=100,top=100");
    fenster.document.write('<html><head><title>Trollhammer - Detailansicht<\/title><\/head><body><center><a onclick="window.close();" href="#"><img border="0" src="'+image+'" alt="bild" ><\/a><\/center><br><\/body><\/html>');
    fenster = null;
    //fenster.document.flush();
    //fenster.close();
}
function showFirmen() {
    var o1 = document.getElementById('nurfirmen1');
    var o2 = document.getElementById('nurfirmen2');
    
    if (o1.style.display == 'none' ) {
        o1.style.display = 'table-row';
        o2.style.display = 'table-row';
    } else {
        o1.style.display = 'none';
        o2.style.display = 'none';
    }
    
}
