HistoriaObiekt = Class.create(HistoryObject,
{
    /*
     * konstruktor
     */
    initialize:function(json)
    {
        HistoryObject.prototype.constructor.apply(this,arguments);
    },
    getRights:function()
    {
        return this.rights;
    },
    isActive:function()
    {
        return this._isActive;
    },
    setActive:function(act)
    {
        this._isActive=act;
    },


    /*
     * funkcje związane ze stylem
     */

    setColor:function(color)
    {
        this.color = color;
        this.Path.setColor(color);
        this.Pojazd.setColor(color);
		this.Label.setColor(color);
    },
    /*
     *
     */
    update:function()
    {
        //do_nothing funkcja anty błędowa, interfejs zgodny z RT obiektem
    },
    /*
     * usuwa obiekty dom i inne
     */
    jumpTo:function(datestep)
    {
        if (this.flags.data!=0)
        {   
            var xi;
            if ((xi = this.arr[3].indexOf(datestep))!=-1)
            {
                this.step = xi;
            }
            else
            {
                var s;
                var tmp = 100000;
                for(var i=0,l=this.arr[3].length;i<l;i++)
                {
                    if (Math.abs(this.arr[3][i]-datestep) < tmp)
                    {
                        tmp = Math.abs(this.arr[3][i]-datestep);
                        s = i;
                    }
                }
                this.step = s;
            }
            //prawdziwy jump
            this.setStep(this.step);
        }  
    },
    getNextStepDate:function()
    {
        return (this.flags.data!=0 && this.arr[3].length > (this.step+1)) ? parseInt(this.arr[3][this.step+1]) : undefined;
    }
});
HistoriaObiekt.creator = HistoryObject.creator;

