function mini_object(){

    this.obj=document.getElementById('mini_navi');
    this.fade=document.getElementById('mini_fade');

    this.obj_width=null;
    this.obj_height=null;
    
    this.fade_width=null;
    this.fade_height=null;
    
    this.faktor_width=null;
    this.faktor_height=null;

    this.status_opener=true;



    this.init=function(){

        this.width=this.obj.offsetWidth;
        this.height=this.obj.offsetHeight;

        mini_navi_width=this.width;
        mini_navi_height=this.height;

        this.set_fade_dimension();

        this.obj.style.left=(window.container_width-this.width)+"px";
        this.obj.style.top=(window.container_height-this.height)+"px";
    }

    this.set_fade_dimension=function(){

        this.create_faktor();

        this.fade_width=this.width*this.faktor_width;
        this.fade_height=this.height*this.faktor_height;
        
        this.fade.style.width=this.fade_width+"px";
        this.fade.style.height=this.fade_height+"px";
        
        return;
    }

    this.set_fade_position=function(){
        /*
        faktor=minhöhe/kartenhöhe
        fadetop=faktor*maptop*-1
        */
        this.create_faktor();
        
        this.fade_top=-1*this.faktor_top*window.map_top;
        this.fade_left=-1*this.faktor_left*window.map_left;

        this.fade.style.top=this.fade_top+"px";
        this.fade.style.left=this.fade_left+"px";

        return;

    }
    
    this.change_coords=function(top,left){
        /*
            übergeben werden top und left des minifades
            umrechnen nach neuen map coords
            fadetop/faktor_top=maptop
        */
        this.create_faktor();
        
        this.fade_top=top;
        this.fade_left=left;

        window.map_top=parseInt(-1*this.fade_top/this.faktor_top);
        window.map_left=parseInt(-1*this.fade_left/this.faktor_left);
        return;
    }

    this.create_faktor=function(){
        this.faktor_width=window.container_width/window.map_width;
        this.faktor_height=window.container_height/window.map_height;
        
        this.faktor_top=this.width/window.map_width;
        this.faktor_left=this.height/window.map_height;
        return;
    }
    
    this.change_view=function(){

        this.faktor_m=(this.width)/(this.height);
        
        //zumachen
        if(this.status_opener===true){
            
            this.status_opener=false;

            this.anfang_x=parseInt(this.obj.style.left);
            this.anfang_y=parseInt(this.obj.style.top);

            this.ende_x=this.anfang_x+this.width-10;
            this.ende_y=this.anfang_y+this.height-10;
            
            this.aktiv1 = window.setInterval("window.my_navi.run_it1()",1);
            
        }
        
        //aufmachen
        else if(this.status_opener===false){
            
            this.status_opener=true;

            this.anfang_x=parseInt(this.obj.style.left);
            this.anfang_y=parseInt(this.obj.style.top);

            this.ende_x=this.anfang_x-this.width+10;
            this.ende_y=this.anfang_y-this.height+10;

            this.aktiv2 = window.setInterval("window.my_navi.run_it2()",1);
            
        }
    }
    
    this.run_it1=function() {
        document.getElementById('open_pfeil').style.display='none';
        this.anfang_y=this.anfang_y+1;
        this.anfang_x=Math.round(this.anfang_x+this.faktor_m);
        
        this.obj.style.top=this.anfang_y+"px";
        this.obj.style.left=this.anfang_x+"px";

        if(this.anfang_y>=this.ende_y){
            window.clearInterval(this.aktiv1);
            document.getElementById('close_pfeil').style.display='block';
            document.getElementById('open_pfeil').style.display='none';
        }
    }
    
    this.run_it2=function() {
        document.getElementById('close_pfeil').style.display='none';
        this.anfang_y=this.anfang_y-1;
        this.anfang_x=Math.round(this.anfang_x-this.faktor_m);

        this.obj.style.top=this.anfang_y+"px";
        this.obj.style.left=this.anfang_x+"px";

        if(this.anfang_y<=this.ende_y){
            window.clearInterval(this.aktiv2);
            document.getElementById('close_pfeil').style.display='none';
            document.getElementById('open_pfeil').style.display='block';
        }
    }
    
    this.set_default_view=function(){
        //mininavi aufklappen und default setzen
        document.getElementById('close_pfeil').style.display='none';
        document.getElementById('open_pfeil').style.display='block';
        this.status_opener=true;
        return;
    }

}