function WindowJob()
{
    this.name = "job";   //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_target");
    up.x = 50*devise_size;
    up.y = -25*devise_size;
    this.getImg.addChild(up);

    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);

    this.pre = [];
    this.text_count = [];
    for(var i = 0; i < 4; i++)
    {
        this.pre.push(ss_data.clone());
        this.pre[i].y = 20*devise_size;
        this.pre[i].regX = 22*devise_size;
        this.getImg.addChild(this.pre[i]);

        this.text_count.push(new ClassText("", 2));
        this.text_count[i].getImg.y = 50*devise_size;
        this.getImg.addChild(this.text_count[i].getImg);
    }
}
WindowJob.prototype = new ClassWindow();

WindowJob.prototype.Show = function()
{
    this.getImg.y = 2048;
    for(var i = 0 ; i < 4; i++)
    {
        if(game.all_job.job.job_v.length<=i)
        {
            this.pre[i].visible = false;
            this.text_count[i].getImg.visible = false;
        }
        else
        {
            this.pre[i].visible = true;
            this.text_count[i].getImg.visible = true;
            this.pre[i].x = (((219/(game.all_job.job.job_v.length+1))*(i+1))*devise_size)<<0;
            this.text_count[i].getImg.x = this.pre[i].x;
            this.text_count[i].setText(game.all_job.job.job_v[i].count.toString());
            this.text_count[i].getImg.regX = this.text_count[i].getImg.width/2;

            this.pre[i].gotoAndStop(game.all_job.job.pre[i].currentFrame);
        }
    }
};

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

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