

// login etc.

function pop(url,name,str) {
    popwin=window.open(url,'popwin',str);
}

//Sprachmenue international, v. typhoon
function change_intl(url,slang_directory){
    var slang_destiny = document.fi.international.options[document.fi.international.options.selectedIndex].value;
    var spos=url.indexOf(slang_directory);
    var url1=url.slice(0,spos);
    var url2="/"+slang_destiny+"/";
    var url3=url.slice(spos+4);
    //alert(url+"+"+slang_directory+"+"+slang_destiny+"+"+spos+"+"+url1+"+"+url2+"+"+url3);
    var url_destiny=""+url1+""+url2+""+url3+"";
    window.top.location.href=url_destiny;
}

//Popcenter allgemein + Forum, pics tmp 21



var strprops;
var zoom;
function popcenter(uri,wi,he,strprops) {
    //alert("wi="+wi+"he="+he+"");
    //defaults
    if(zoom){zoom.close();} //das evtl. offene Fenster wird geschlossen, das Neue geöffnet
    wi=parseInt(wi); he=parseInt(he);    
    var l=(window.screen.availWidth-wi)/2-32; //wg scrollbar
    var t=(window.screen.availHeight-he)/2-32;  //sieht passabel aus
    if(strprops=="narrow"){
        uri="../include/zoom.php?path="+uri+"&title=Zoom";
        strprops="titlebar=0,location=0";
    }else if(strprops=="gallery"){
        //uri=../$slang/gallery
        strprops="titlebar=0,location=0,status=1,resizable=1";
    }else{    
        wi+=20;he+=20;  //wg margin ca 12px, den die Browser um Bilder bauen
        strprops+="resizable=1";
    }    
    //Sicherung -> wie wide
    if(wi>window.screen.availWidth){wi=window.screen.availWidth-12;l=0;strprops+=",scrollbars=1,resizable=1";}
    if(he>window.screen.availHeight){he=window.screen.availHeight-32;t=0;strprops+=",scrollbars=1,resizable=1";}
    //OPEN
    str="width="+wi+",height="+he+",top="+t+",left="+l+","+strprops+""; //alert(str);
    zoom=window.open(uri,"zoom",str);
}

