function WindowGift()
{
    this.name = "gift";
    this.layer = 1;
    this.animation_time_in = 20;
    this.animation_time_out = 20;

    this.getImg.x = 160*devise_size;
    this.getImg.y = 2048;
    this.getImg.regX = 110*devise_size;
    this.getImg.regY = 105*devise_size;

    this.t = 0;

    var bg = ss_data.clone();
    bg.gotoAndStop("window2");
    this.getImg.addChild(bg);

    var up = ss_data.clone();
    up.gotoAndStop("text_yellow_special_gift");
    up.x = 32*devise_size;
    up.y = -20*devise_size;
    this.getImg.addChild(up);

    var lights = ss_data.clone();
    lights.gotoAndStop("lights");
    lights.x = -43*devise_size;
    lights.y = 60*devise_size;
    this.getImg.addChild(lights);

    var reward = ss_data.clone();
    reward.gotoAndStop("text_white_reward");
    reward.x = 64*devise_size;
    reward.y = 116*devise_size;
    this.getImg.addChild(reward);

    var gift_big = ss_data.clone();
    gift_big.gotoAndStop("gift_big");
    gift_big.x = 68*devise_size;
    gift_big.y = 15*devise_size;
    this.getImg.addChild(gift_big);

    this.gift = new ClassAddBonus();
    this.getImg.addChild(this.gift.gift_st);
    this.getImg.addChild(this.gift.gift);
}
WindowGift.prototype = new ClassWindow();

WindowGift.prototype.Show = function()
{
    this.getImg.y = 2048;
    if(audio_supported)
        s_use_of_bonus_award.play();
    this.gift.Show(110*devise_size, 164*devise_size, true);//this.gift.Show(219, 328, true);
    this.t = 0;
};

WindowGift.prototype.DrwIn = function()
{
    this.getImg.y = (-105 + 345*(this.animation/this.animation_time_in))*devise_size;
};

WindowGift.prototype.DrwOut = function()
{
    this.getImg.y = (240 + 345*(this.animation/(-this.animation_time_out)))*devise_size;
    if(this.animation == -this.animation_time_out) this.getImg.y = 2048;
};

WindowGift.prototype.Drw = function()
{
    if(this.isSt())
    {
        this.t++;
        if(this.t>40)
            this.gift.Drw();
        if(this.t>80)
            window_controller.Show("location");
    }
};