function WindowLevelFailed()
{
    this.name = "fail";
    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;

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

    var up = ss_data.clone();
    up.gotoAndStop("text_yellow_game_over");
    up.x = 40*devise_size;
    up.y = 59*devise_size;
    this.getImg.addChild(up);

    this.btn_m = ss_data.clone();
    this.btn_m.gotoAndStop("btn");
    this.btn_m.on("mousedown", function(){
        window_controller.Show("map");
    });
    this.btn_m.x = 15*devise_size;
    this.btn_m.y = 180*devise_size;
    this.getImg.addChild(this.btn_m);
    var btn_m_up = ss_data.clone();
    btn_m_up.gotoAndStop("icon_menu");
    btn_m_up.x = 15*devise_size;
    btn_m_up.y = 180*devise_size;
    this.getImg.addChild(btn_m_up);

    this.btn_r = ss_data.clone();
    this.btn_r.gotoAndStop("btn");
    this.btn_r.on("mousedown", function(){
        adManager.showAd(function () {
            game.CreateLvl(game.level_num);
            window_controller.Show("location");
            window_controller.Show("job");
        });
    });
    this.btn_r.x = 152*devise_size;
    this.btn_r.y = 180*devise_size;
    this.getImg.addChild(this.btn_r);
    var btn_r_up = ss_data.clone();
    btn_r_up.gotoAndStop("icon_reset");
    btn_r_up.x = 152*devise_size;
    btn_r_up.y = 180*devise_size;
    this.getImg.addChild(btn_r_up);
}
WindowLevelFailed.prototype = new ClassWindow();

WindowLevelFailed.prototype.Show = function()
{
    this.getImg.y = 2048;
    if(audio_supported)
        s_game_over.play();
};

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

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