var th_arm = {};
var arm_mode = {};
var arm_opt_odrm_range = "(1 ~ "+info.NO_OF_ICM_GRPS+")";
var arm_scenario = {};
var th_psm = {};
var psm_msg = {};
var psm_val = {};
var psm_dvu = {};

if (info.ATD_ENABLE == "1") {
	th_arm = {key: "pgmup001_th_arm", th: [{label: langs.getText("up001","arm"), colspan: 2, cell_type: "sub_title"}]};
	arm_mode = {key: "pgmup001_arm_mode", tr:[{label: langs.getText("up001","arm_mode")}, {name:"ARM_MODE", value:"", select: [{value: "0", option: langs.getText("up001","opt_dayrm")}, {value: "1", option: langs.getText("up001","opt_nightrm")}, {value: "2", option: langs.getText("up001","opt_timedrm")}, {value: "3", option: langs.getText("up001","opt_autorm")}, {value: "4", option: langs.getText("up001","opt_odrm")+arm_opt_odrm_range}], sel_type: "up001_arm_sel", message: ""}]};
	arm_scenario = {key: "pgmup001_arm_scenario", tr:[{label: langs.getText("up001","arm_scenario")}, {name:"ARM_SCENARIO", value: "", textfield: [{max: 8}], message: ""}]};
	th_psm = {};
	psm_msg = {};
	psm_val = {};
	psm_dvu = {};
} else {
	th_arm = {};
	arm_mode = {};
	arm_scenario = {};
	th_psm = {key: "pgmup001_th_psm", th: [{label: langs.getText("up001","psm"), colspan: 2, cell_type: "sub_title"}]};
	psm_msg = {key: "pgmup001_psm_msg", tr:[{label: langs.getText("up001","psm_msg")}, {name:"PSM_MSG", value:"", select: [{value: "0", option: langs.getText("up001","psm_msg_opt_deact")}, {value: "2", option: langs.getText("up001","psm_msg_opt_lunch")}, {value: "3", option: langs.getText("up001","psm_msg_opt_vacation")}, {value: "4", option: langs.getText("up001","psm_msg_opt_oootime")}, {value: "5", option: langs.getText("up001","psm_msg_opt_ooodate")}, {value: "6", option: langs.getText("up001","psm_msg_opt_ooounknown")}, {value: "7", option: langs.getText("up001","psm_msg_opt_calltostn")}, {value: "8", option: langs.getText("up001","psm_msg_opt_inofficestn")}, {value: "9", option: langs.getText("up001","psm_msg_opt_inmeeting")}, {value: "10", option: langs.getText("up001","psm_msg_opt_athome")}, {value: "11", option: langs.getText("up001","psm_msg_opt_branch")}], sel_type: "up001_psm_sel", message: "", note: langs.getText("up001","psm_msg_note")}]};
	psm_val = {key: "pgmup001_psm_val", tr:[{label: ""}, {name:"PSM_VAL_BLANK", value:"", label: 1}, {name:"PSM_VAL_2", value: "", textfield: [{max:4}], message: "", error:"HD", note: langs.getText("up001","psm_val_2_note")}, {name:"PSM_VAL_3", value: "", textfield: [{max:4}], message: "", error:"HD", note: langs.getText("up001","psm_val_3_note")}, {name:"PSM_VAL_4", value: "", textfield: [{max:4}], message: "", error:"HD", note: langs.getText("up001","psm_val_4_note")}, {name:"PSM_VAL_5", value: "", textfield: [{max:4}], message: "", error:"HD", note: langs.getText("up001","psm_val_5_note")}, {name:"PSM_VAL_7", value: "", textfield: [{max:17}], message: "", error:"HD", note: langs.getText("up001","psm_val_7_note")}, {name:"PSM_VAL_8", value: "", textfield: [{max:8}], message: "", error:"HD", note: langs.getText("up001","psm_val_8_note")}, {name:"PSM_VAL_9", value: "", textfield: [{max:4}], message: "", error:"HD", note: langs.getText("up001","psm_val_9_note")}]};
	psm_dvu = {key: "pgmup001_psm_dvu", tr:[{label: langs.getText("up001","psm_dvu")}, {name:"PSM_DVU", value:"", select: [{value: "0", option: langs.getText("up_common","opt_off")}, {value: "1", option: langs.getText("up_common","opt_on")}], message: "", note: langs.getText("up001","psm_dvu_note")}]};
}

define(
    {elements:[
        {name:"tab1", tab: [
            {key: "pgmup001_button", header: [{btn: langs.getText("common","btn_save"), btn_type: "btn right up_save"}]},
            {key: "pgmup001_mktbl", table: [{label: ""}, {label: ""}]},
            {key: "pgmup001_th_common", th: [{label: langs.getText("up001","common"), colspan: 2, hidden: 1, cell_type: "sub_title"}]},
            {key: "pgmup001_common_dnd", tr:[{label: langs.getText("up001","common_dnd"), hidden: 1}, {name:"COMMON_DND", radio: [{value: "1"}], hidden: 1}, {label: langs.getText("up_common","opt_on")+"&nbsp; &nbsp;", cont: 1}, {name:"COMMON_DND", radio: [{value: "0"}], cont: 1}, {label: langs.getText("up_common","opt_off"), cont: 1}]},
            {key: "pgmup001_th_cfw", th: [{label: langs.getText("up001","cfw"), cell_type: "sub_title"}, {name:"CFW_ENABLE", radio: [{value: "1"}]}, {label: langs.getText("up_common","opt_on")+"&nbsp; &nbsp;", cont: 1}, {name:"CFW_ENABLE", radio: [{value: "0"}], cont: 1}, {label: langs.getText("up_common","opt_off"), cont: 1}]},
            {key: "pgmup001_cfw_cond", tr:[{label: langs.getText("up001","cfw_cond")}, {name:"CFW_COND", value:"", select: [{value: "12", option: langs.getText("up001","opt_cancel")}, {value: "1", option: langs.getText("up001","opt_uncond")}, {value: "2", option: langs.getText("up001","opt_busy")}, {value: "3", option: langs.getText("up001","opt_noans")}, {value: "4", option: langs.getText("up001","opt_busyornoans")}], message: ""}]},
            {key: "pgmup001_cfw_desttype", tr:[{label: langs.getText("up001","cfw_desttype")}, {name:"CFW_DESTTYPE", value:"", select: [{value: "0", option: langs.getText("up001","opt_na")}, {value: "1", option: langs.getText("up001","opt_stanum")}, {value: "2", option: langs.getText("up001","opt_stagrp")}, {value: "3", option: langs.getText("up001","opt_spd")}, {value: "4", option: langs.getText("up001","opt_extnum")}], message: ""}]},
            {key: "pgmup001_cfw_dest", tr:[{label: langs.getText("up001","cfw_dest")}, {name:"CFW_DEST", value: "", textfield: [{}], message: "", note: langs.getText("up001","cfw_dest_note1")}]},
            {key: "pgmup001_th_mex", th: [{label: langs.getText("up001","mex"), cell_type: "sub_title"}, {name:"MEX_ENABLE", radio: [{value: "1"}]}, {label: langs.getText("up_common","opt_on")+"&nbsp; &nbsp;", cont: 1}, {name:"MEX_ENABLE", radio: [{value: "0"}], cont: 1}, {label: langs.getText("up_common","opt_off"), cont: 1}]},
            {key: "pgmup001_mex_dest", tr:[{label: langs.getText("up001","mex_dest")}, {name:"MEX_DEST", value: "", textfield: [{}], message: "", note: langs.getText("up001","mex_dest_note")}]},
            th_psm,
            psm_msg,
            psm_val,
            psm_dvu,
            {key: "pgmup001_th_ad", th: [{label: langs.getText("up001","ad"), cell_type: "sub_title"}, {name:"AD_ENABLE", radio: [{value: "1"}]}, {label: langs.getText("up_common","opt_on")+"&nbsp; &nbsp;", cont: 1}, {name:"AD_ENABLE", radio: [{value: "2"}], cont: 1}, {label: langs.getText("up_common","opt_off"), cont: 1}]},
            {key: "pgmup001_ad_stagrp", tr:[{label: langs.getText("up001","ad_stagrp")}, {name:"AD_STAGRP", value: "", textfield: [{max: 5}], message: ""}]},
            {key: "pgmup001_ad_reason", tr:[{label: langs.getText("up001","ad_reason")}, {name:"AD_REASON", value:"", select: [{value: "0", option: "0"}, {value: "1", option: "1"}, {value: "2", option: "2"}, {value: "3", option: "3"}, {value: "4", option: "4"}, {value: "5", option: "5"}, {value: "6", option: "6"}, {value: "7", option: "7"}, {value: "8", option: "8"}, {value: "9", option: "9"}], message: ""}]},
            th_arm,
            arm_mode,
            arm_scenario
        ]}
    ]}
);
