function WindowBonusLevel()
{
    this.name = "bonuslvl";   //window_controller.Show("job");
    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 = 109*devise_size;
    this.getImg.regY = 61*devise_size;

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

    var up = ss_data.clone();
    up.gotoAndStop("text_yellow_bonus_level");
    up.x = 10*devise_size;
    up.y = -25*devise_size;
    this.getImg.addChild(up);

    var text = ss_data.clone();
    text.gotoAndStop("text_white_bonus level");
    text.x = 30*devise_size;
    text.y = 16*devise_size;
    this.getImg.addChild(text);

    this.sec_t = new ClassText("", 3);
    this.sec_t.getImg.y = text.y + 32*devise_size;
    this.getImg.addChild(this.sec_t.getImg);

    this.sec = ss_data.clone();
    this.sec.gotoAndStop("text_white_seconds");
    this.sec.y = text.y + 41*devise_size;
    this.getImg.addChild(this.sec);

    this.btn_p = ss_data.clone();
    this.btn_p.gotoAndStop("btn");
    this.btn_p.on("mousedown", function(){ window_controller.Show("location"); });
    this.btn_p.x = 84*devise_size;
    this.btn_p.y = 76*devise_size;
    this.getImg.addChild(this.btn_p);
    var btn_p_up = ss_data.clone();
    btn_p_up.gotoAndStop("icon_right");
    btn_p_up.x = 84*devise_size;
    btn_p_up.y = 76*devise_size;
    this.getImg.addChild(btn_p_up);
}
WindowBonusLevel.prototype = new ClassWindow();

WindowBonusLevel.prototype.Show = function()
{
    this.getImg.y = 2048;
    this.time = 0;

    this.sec_t.setText(config.lvls[game.level_num].bonus_lvl.toString());
    this.sec_t.getImg.x = ((121*devise_size - this.sec_t.getImg.width)/2);//((219 - this.sec_t.getImg.width - 98)/2)*devise_size;
    this.sec.gotoAndStop("text_white_seconds");
    this.sec.x = this.sec_t.getImg.x + this.sec_t.getImg.width + 5*devise_size;
};

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

WindowBonusLevel.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;
};