
/** Auto. resizing image popup (url, title(,alt),info **/

function fullImage(url,t,i){

    if (t==""){ t = i; }

    var isOther=1;
    if (parseInt(navigator.appVersion.charAt(0))>=4){
        var isNN=(navigator.appName=="Netscape")?1:0;
        var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;
        isOther = (isNN||isIE)?0:1;
        isOther = (navigator.userAgent.indexOf("Opera") != -1 || navigator.userAgent.indexOf("opera") != -1)?1:0;
    }
    
    if (!isOther){
        if (isNN){imgWin=window.open('about:blank','imgwin','scrollbars=no,width=200,height=150,left=100,top=100');}
        if (isIE){imgWin=window.open('about:blank','imgwin','scrollbars=no,width=200,height=150,left=100,top=100');}
        with (imgWin.document){
            writeln("<html><head>");
            writeln("<title>Bild wird geladen...</title>");
            writeln("<style>body{margin:0px;background:url(/TRIXY/media/layout/pu_stand_by.gif);background-repeat: no-repeat;");
            writeln("}</style><scr"+"ipt language=\"JavaScript\">");
            writeln("var isNN="+isNN+";var isIE="+isIE+";var d=document;var w=window;");
            writeln("function i(){var im = new Image;");
            writeln("im.onload = function (event) {");
            writeln("if (isIE){w.resizeTo(200,150);");
            writeln("pw=(200-d.body.clientWidth);");
            writeln("ph=(150-d.body.clientHeight);");
            writeln("w.resizeTo((this.width+pw),(this.height+ph));}");
            writeln("if (isNN){w.innerWidth=this.width;w.innerHeight=this.height;}");
            writeln("d.title=\""+t+"\";self.focus();");
            writeln("d.getElementById(\"imh\").src=this.src;");
            writeln("d.getElementById(\"imh\").style.display=\"inline\";}");
            writeln("im.src=\""+url+"\";}</scr"+"ipt>");
            writeln("</head><body scroll=\"no\" onClick=\"self.close();\" onload=\"i();\" onblur=\"self.close()\">");
            writeln("<div align=\"center\"><img id=\"imh\" src=\""+url+"\" alt=\""+i+"\" style=\"display:none\">");
            writeln("</div></body></html>");
            
            close();	
        }
    }
    else { imgWin=window.open(url,'imgWindow',''); }

}
