function ClassWindow()
{
    this.name = "";
    this.layer = 0;
    this.animation_step = 0; //  1 show
                             //  0 stop
                             // -1 hide
    this.animation_time_in = 0;
    this.animation_time_out = 0;
    this.animation_pos = 0;

    this.getImg = new createjs.Container();
    this.getImg.visible = false;
}

ClassWindow.prototype.isIn = function()
{
    return (this.animation_step == 1);
};

ClassWindow.prototype.isSt = function()
{
    return (this.animation_step == 0);
};

ClassWindow.prototype.isOut = function()
{
    return (this.animation_step == -1);
};

ClassWindow.prototype._Show = function()
{
    this.getImg.visible = true;
    if(this.layer == 1) window_controller.modal_bg.visible = true;
    //this.Show();
};

ClassWindow.prototype._Hide = function()
{
    this.getImg.visible = false;
    //this.Hide();
};

ClassWindow.prototype.Show = function()
{
};
ClassWindow.prototype.Hide = function()
{
};

ClassWindow.prototype.AShow = function()
{
    this.animation_step = 1;
    this.animation_pos = 0;
    this.Show();
};
ClassWindow.prototype.AHide = function()
{
    this.animation_step = -1;
    this.animation_pos = 0;
    this.Hide();
};

ClassWindow.prototype.__defineGetter__("animation", function(){
    return this.animation_pos;
});

ClassWindow.prototype.getAnimation = function()
{
    return this.animation_pos;
};

ClassWindow.prototype._Drw = function()
{
    this.ADrw();
    this.Drw();
};

ClassWindow.prototype.ADrw = function()
{
    if(this.animation_step != 0)
    {
        this.animation_pos += this.animation_step;

        if(this.animation_step == 1)
            this.DrwIn();
        else
            this.DrwOut();

        if(this.animation_pos == this.animation_time_in)
        {
            this.animation_step = 0;
            window_controller.AUpd();
        }
        if(this.animation_pos == -this.animation_time_out)
        {
            this.animation_step = 0;
            window_controller.ShowPost();
            window_controller.AUpd();
        }
    }
};

ClassWindow.prototype.Drw = function()
{
};

ClassWindow.prototype.DrwIn = function()
{
};

ClassWindow.prototype.DrwOut = function()
{
};