if(info.NO_OF_COLS) {
    var range_guide = " (1 - "+info.NO_OF_COLS+")";
} else {
    var range_guide = "";
}

if(info.MAX_TDM_GAIN_TBL) {
	var cmt_gaintbl = "1-"+info.MAX_TDM_GAIN_TBL;
}

if(info.MAX_TONE_TABLE) {
	var cmt_tonetbl = "1-"+info.MAX_TONE_TABLE;
}

if(info.MAX_DITRANCLASS_NO) {
	var cmt_dtranstbl = "1-"+info.MAX_DITRANCLASS_NO;
}


if(info.NO_OF_ICM_GRPS) {
	var v_4 = {label: "0-"+info.NO_OF_ICM_GRPS};
} else {
   var v_4 = {label: ""};
}

if (info.SYSTEM_ID == "iPECS eMG80" || info.SYSTEM_ID == "iPECS eMG800") {
	var v_1 = {value: "1", option: langs.getText("common","internal_music")};
	var v_2 = {value: "2", option: langs.getText("common","extmusic")};
	if (info.SYSTEM_ID == "iPECS eMG80") {
	var v_3 = {label: "0-21 (0:"+langs.getText("common","txt_private")+", 21:"+langs.getText("common","unused")+")"};
	} else {
	var v_3 =  {label: "0-201 (0:"+langs.getText("common","txt_private")+", 201:"+langs.getText("common","unused")+")"};
	}
} else {
	var v_1 = {value: "1", option: langs.getText("common","intext_music")+"1"};
	var v_2 = {value: "2", option: langs.getText("common","extmusic")+"2"};
	var v_3 = {label: "0-201 (0:"+langs.getText("common","txt_private")+", 201:"+langs.getText("common","unused")+")"};
}
var v_5 = {label:"0-"+info.LCR_MAX_LDT_TBL+" (0:"+langs.getText("common","unused")+")"};

define(
    {elements:[
        {name:"tab1", tab: [
            {key: "pgm140_button", button: [{btn: langs.getText("common","btn_save"), btn_type: "btn_save auth_write"}]},
            {key: "pgm140_preload", preload: [{name: "RANGE_TYPE_1", range_type: 2}, {text: langs.getText("common","enter_corange")+range_guide+" : "}, {name: "RANGE_1_1", value: "", textfield: [{max: 40, size: 50}], message: "", help: langs.re_toolTip()}, {btn: langs.getText("common","load"), btn_type: "btn_load"}, langs.Range_Error_Table(), {endload: 1}, {br: 2}, {text: langs.getText("common","corange")+" "}, {name: "RANGE_VIEW_1", value: "", text: 1}]},
            {key: "pgm140_mktbl", title: langs.getText("common","mktbl"), table: [{name: "CHKFLAG", value: "", check_flag: 1}, {label: langs.getText("common","order")}, {btn: langs.getText("common","btn_chkall"), btn_type: "btn_checkall"}, {label: langs.getText("common","attr"), sort: "str"}, {label: langs.getText("common","val")}, {label: langs.getText("common","range")}]},
            {key: "pgm140_col_type", title: langs.getText("common","co_type"), tr:[{label: "1"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("common","co_type")}, {name: "COL_TYPE", value: "", select: [{value: "1", option: langs.getText("common","normal")}, {value: "2", option: langs.getText("common","did")}, {value: "3", option: "TIE"}, {value: "4", option: langs.getText("common","unused")}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm140_col_linegroup", title: langs.getText("common","coipgrp"), tr:[{label: "2"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("common","coipgrp")}, {name: "COL_LINEGROUP", value: "", textfield: [{max: 3}], message: "", cont: 0}, v_3]},
            {key: "pgm140_col_cos", title: langs.getText("p140","col_cos"), tr:[{label: "3"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("p140","col_cos")}, {name: "COL_COS", value: "", select: [{value: "1", option: langs.getText("common","cos")+" 1"}, {value: "2", option: langs.getText("common","cos")+" 2"}, {value: "3", option: langs.getText("common","cos")+" 3"}, {value: "4", option: langs.getText("common","cos")+" 4"}, {value: "5", option: langs.getText("common","cos")+" 5"}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm140_col_ltype", title: langs.getText("p140","col_ltype"), tr:[{label: "4"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("p140","col_ltype")}, {name: "COL_LTYPE", value: "", select: [{value: "0", option: langs.getText("common","co")}, {value: "1", option: "PBX"}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm140_col_una", title: langs.getText("p140","col_una"), tr:[{label: "5"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("p140","col_una")}, {name: "COL_UNA", value: "", select: [{value: "0", option: langs.getText("common","opt_off")}, {value: "1", option: langs.getText("common","opt_on")}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm140_col_gacnt", title: langs.getText("p140","col_gacnt"), tr:[{label: "6"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("p140","col_gacnt")}, {name: "COL_GACNT", value: "", select: [{value: "0", option: langs.getText("common","opt_off")}, {value: "1", option: langs.getText("common","opt_on")}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm140_col_tenancy", title: langs.getText("p140","col_tenancy"), tr:[{label: "7"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("p140","col_tenancy")}, {name: "COL_TENANCY", value: "", textfield: [{max: 3}], message: "", cont: 0}, v_4]},
            {key: "pgm140_col_namedisp", title: langs.getText("p140","col_namedisp"), tr:[{label: "8"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("p140","col_namedisp")}, {name: "COL_NAMEDISP", value: "", select: [{value: "0", option: langs.getText("common","opt_off")}, {value: "1", option: langs.getText("common","opt_on")}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm140_col_name", title: langs.getText("p140","col_name"), tr:[{label: "9"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("p140","col_name")}, {name: "COL_NAME", value: "", textfield: [{max: 12}], message: "", enable_mullang: 1}, {label: langs.getText("common","max12ch")}]},
            {key: "pgm140_col_disaacnt", title: langs.getText("p140","col_disaacnt"), tr:[{label: "10"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("p140","col_disaacnt")}, {name: "COL_DISAACNT", value: "", select: [{value: "0", option: langs.getText("common","opt_off")}, {value: "1", option: langs.getText("common","opt_on")}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm140_col_disaipa", title: langs.getText("p140","col_disaipa"), tr:[{label: "11"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("p140","col_disaipa")}, {name: "COL_DISAIPA", value: "", select: [{value: "0", option: langs.getText("common","opt_off")}, {value: "1", option: langs.getText("common","opt_on")}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm140_col_ccrbusyr", title: langs.getText("p140","col_ccrbusyr"), tr:[{label: "12"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("p140","col_ccrbusyr")}, {name: "COL_CCRBUSYR", value: "", select: [{value: "0", option: langs.getText("common","opt_off")}, {value: "1", option: langs.getText("common","opt_on")}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm140_col_smsout", title: langs.getText("p140","col_smsout"), tr:[{label: "13"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("p140","col_smsout")}, {name: "COL_SMSOUT", value: "", select: [{value: "0", option: langs.getText("common","opt_disable")}, {value: "1", option: langs.getText("common","opt_enable")}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm140_col_smsstn", title: langs.getText("p140","col_smsstn"), tr:[{label: "14"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("p140","col_smsstn")}, {name: "COL_SMSSTN", value: "", textfield: [{max: 8}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm140_col_blkanony", title: langs.getText("p140","col_blkanony"), tr:[{label: "15"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("p140","col_blkanony")}, {name: "COL_BLKANONY", value: "", select: [{value: "0", option: langs.getText("common","opt_off")}, {value: "1", option: langs.getText("common","opt_on")}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm140_col_prefixid", title: langs.getText("p140","col_prefixid"), tr:[{label: "16"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("p140","col_prefixid")}, {name: "COL_PREFIXID", value: "", textfield: [{max: 1}], message: "", cont: 0}, {label: "0-6"}]},
            {key: "pgm140_col_ldttbl", title: langs.getText("common","ldt_tbl_index"), tr:[{label: "17"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("common","ldt_tbl_index")}, {name: "COL_LDTTBL", value: "", textfield: [{max: 2}], message: "", cont: 0}, v_5]},
			{key: "pgm140_col_ldtzone", title: langs.getText("common","ldt_zone_no"), tr:[{label: "18"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("common","ldt_zone_no")}, {name: "COL_LDTZONE", value: "", textfield: [{max: 3}], message: "", cont: 0}, {label: "1-100"}]},
			{key: "pgm140_col_enblocsd", title: langs.getText("p140","col_enblocsd"), tr:[{label: "19"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("p140","col_enblocsd")}, {name: "COL_ENBLOCSD", value: "", select: [{value: "0", option: langs.getText("common","opt_off")}, {value: "1", option: langs.getText("common","opt_on")}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm140_col_didname", title: langs.getText("p140","col_didname"), tr:[{label: "20"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("p140","col_didname")}, {name: "COL_DIDNAME", value: "", select: [{value: "0", option: langs.getText("common","opt_off")}, {value: "1", option: langs.getText("common","opt_on")}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm140_col_btcaller", title: langs.getText("p140","col_btcaller"), tr:[{label: "21"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("p140","col_btcaller")}, {name: "COL_BTCALLER", value: "", select: [{value: "0", option: langs.getText("common","opt_off")}, {value: "1", option: langs.getText("common","opt_on")}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm140_col_ccblk", title: langs.getText("p140","col_ccblk"), tr:[{label: "22"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("p140","col_ccblk")}, {name: "COL_CCBLK", value: "", select: [{value: "0", option: langs.getText("common","opt_disable")}, {value: "1", option: langs.getText("p140","opt_ccblk_da")}, {value: "2", option: langs.getText("p140","opt_ccblk_wi")}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm140_col_ccanstmr", title: langs.getText("p140","col_ccanstmr"), tr:[{label: "23"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("p140","col_ccanstmr")}, {name: "COL_CCANSTMR", value: "", textfield: [{max: 3}], message: "", cont: 0}, {label: "*100"+langs.getText("common","cmt_msec"), cont: 1}, {label: "1-250"}]},
            {key: "pgm140_col_ccidltmr", title: langs.getText("p140","col_ccidltmr"), tr:[{label: "24"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("p140","col_ccidltmr")}, {name: "COL_CCIDLTMR", value: "", textfield: [{max: 3}], message: "", cont: 0}, {label: "*100"+langs.getText("common","cmt_msec"), cont: 1}, {label: "1-250"}]},
				{key: "pgm140_col_gaintbl", title: langs.getText("common","gaintbl_index"), tr:[{label: "25"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("common","gaintbl_index")}, {name: "COL_GAINTBL", value: "", textfield: [{max: 1}], message: "", cont: 0}, {label: cmt_gaintbl}]},
            {key: "pgm140_col_tonetbl", title: langs.getText("common","tonetbl_index"), tr:[{label: "26"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("common","tonetbl_index")}, {name: "COL_TONETBL", value: "", textfield: [{max: 1}], message: "", cont: 0}, {label: cmt_tonetbl}]},
            {key: "pgm140_col_dtranstbl", title: langs.getText("common","dtranstbl"), tr:[{label: "27"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("common","dtranstbl")}, {name:"COL_DTRANSTBL", value:"", textfield:[{max: 2}], message: "", cont: 0}, {label: cmt_dtranstbl}]},
            {key: "pgm140_col_prepaid", title: langs.getText("common","prepaid"), tr:[{label: "28"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("common","prepaid")}, {name:"COL_PREPAID", value: "", select: [{value: "0", option: langs.getText("common","opt_off")}, {value: "1", option: langs.getText("common","opt_on")}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm140_col_prepaid2", title: langs.getText("common","prepaid2"), tr:[{label: "29"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("common","prepaid2")}, {name:"COL_PREPAID2", value: "", textfield: [{max: 6}], message: "", cont: 0}, {name:"COL_PREPAID3", value: "", textfield: [{max: 6}], message: "", cont: 1}, {label: ""}]},
	    {key: "pgm140_col_autorecdest", title: langs.getText("p140","col_autorecdest"), tr:[{label: "30"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("p140","col_autorecdest")}, {name: "COL_AUTORECDEST", value: "", textfield: [{max: 8}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm140_col_iclidmode", title: langs.getText("p140","col_iclidmode"), tr:[{label: "31"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("p140","col_iclidmode")}, {name: "COL_ICLIDMODE", value: "", select: [{value: "0", option: langs.getText("common","opt_disable")}, {value: "1", option: langs.getText("p140","opt_iclid_cli")}, {value: "2", option: langs.getText("p140","opt_iclid_name")}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm140_col_epbxcode", title: langs.getText("p140","col_epbxcode"), tr:[{label: "32"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("p140","col_epbxcode")}, {name: "COL_EPBXCODE", value: "", select: [{value: "0", option: langs.getText("common","opt_disable")}, {value: "1", option: langs.getText("p140","opt_epbx_idx")+"1"}, {value: "2", option: langs.getText("p140","opt_epbx_idx")+"2"}, {value: "3", option: langs.getText("p140","opt_epbx_idx")+"3"}, {value: "4", option: langs.getText("p140","opt_epbx_idx")+"4"}], message: "", cont: 0}, {label: ""}]},

            {key: "pgm140_timer_attr", title: langs.getText("p140","timer_attr"), th: [{label: langs.getText("p140","timer_attr"), colspan: 5}]},
            {key: "pgm140_col_cutofftmr", title: langs.getText("common","cutofftmr"), tr:[{label: "1"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("common","cutofftmr")}, {name: "COL_CUTOFFTMR", value: "", textfield: [{max: 2}], message: "", cont: 0}, {label: "(*"+langs.getText("common","simple_minute")+")", cont: 1}, {label: "00-99"}]},
            {key: "pgm140_col_disadelay", title: langs.getText("p140","col_disadelay"), tr:[{label: "2"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("p140","col_disadelay")}, {name: "COL_DISADELAY", value: "", textfield: [{max: 1}], message: "", cont: 0}, {label: "(*"+langs.getText("common","cmt_second")+")", cont: 1}, {label: "0-9"}]},
            {key: "pgm140_col_disaanswer", title: langs.getText("p140","col_disaanswer"), tr:[{label: "3"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("p140","col_disaanswer")}, {name: "COL_DISAANSWER", value: "", textfield: [{max: 1}], message: "", cont: 0}, {label: "(*"+langs.getText("common","cmt_second")+")", cont: 1}, {label: "0-9"}]},
            {key: "pgm140_tone_attr", title: langs.getText("p140","tone_attr"), th: [{label: langs.getText("p140","tone_attr"), colspan: 5}]},
            {key: "pgm140_col_lmoh", title: langs.getText("p140","col_lmoh"), tr:[{label: "1"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("p140","col_lmoh")}, {name: "COL_LMOH", value: "", select: [{value: "0", option: langs.getText("common","refer_syshold")}, v_1, v_2, {value: "3", option: langs.getText("common","vsf_moh")}, {value: "4", option: langs.getText("common","slt_moh")+"1"}, {value: "5", option: langs.getText("common","slt_moh")+"2"}, {value: "6", option: langs.getText("common","slt_moh")+"3"}, {value: "7", option: langs.getText("common","slt_moh")+"4"}, {value: "8", option: langs.getText("common","slt_moh")+"5"}, {value: "9", option: langs.getText("common","vsf_moh")+"2"}, {value: "10", option: langs.getText("common","vsf_moh")+"3"}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm140_col_pstndt", title: langs.getText("common","co_dial_tone"), tr:[{label: "2"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("common","co_dial_tone")}, {name: "COL_PSTNDT", value: "", select: [{value: "0", option: langs.getText("common","opt_off")}, {value: "1", option: langs.getText("common","opt_on")}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm140_col_pstnrbt", title: langs.getText("common","co_ringback_tone"), tr:[{label: "3"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("common","co_ringback_tone")}, {name: "COL_PSTNRBT", value: "", select: [{value: "0", option: langs.getText("common","opt_off")}, {value: "1", option: langs.getText("common","opt_on")}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm140_col_pstnet", title: langs.getText("common","co_err_tone"), tr:[{label: "4"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("common","co_err_tone")}, {name: "COL_PSTNET", value: "", select: [{value: "0", option: langs.getText("common","opt_off")}, {value: "1", option: langs.getText("common","opt_on")}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm140_col_pstnbt", title: langs.getText("common","co_busy_tone"), tr:[{label: "5"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("common","co_busy_tone")}, {name: "COL_PSTNBT", value: "", select: [{value: "0", option: langs.getText("common","opt_off")}, {value: "1", option: langs.getText("common","opt_on")}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm140_col_dltnsrc", title: langs.getText("p140","col_dltnsrc"), tr:[{label: "6"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("p140","col_dltnsrc")}, {name: "COL_DLTNSRC", value: "", select: [{value: "0", option: langs.getText("common","dial_tone")}, v_1, v_2, {value: "3", option: langs.getText("common","vsf_moh")}, {value: "4", option: langs.getText("common","slt_moh")+"1"}, {value: "5", option: langs.getText("common","slt_moh")+"2"}, {value: "6", option: langs.getText("common","slt_moh")+"3"}, {value: "7", option: langs.getText("common","slt_moh")+"4"}, {value: "8", option: langs.getText("common","slt_moh")+"5"}, {value: "9", option: langs.getText("common","vsf_moh")+"2"}, {value: "10", option: langs.getText("common","vsf_moh")+"3"}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm140_col_rbtnsrc", title: langs.getText("p140","col_rbtnsrc"), tr:[{label: "7"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("p140","col_rbtnsrc")}, {name: "COL_RBTNSRC", value: "", select: [{value: "0", option: langs.getText("common","ringback_tone")}, v_1, v_2, {value: "3", option: langs.getText("common","vsf_moh")}, {value: "4", option: langs.getText("common","slt_moh")+"1"}, {value: "5", option: langs.getText("common","slt_moh")+"2"}, {value: "6", option: langs.getText("common","slt_moh")+"3"}, {value: "7", option: langs.getText("common","slt_moh")+"4"}, {value: "8", option: langs.getText("common","slt_moh")+"5"}, {value: "9", option: langs.getText("common","vsf_moh")+"2"}, {value: "10", option: langs.getText("common","vsf_moh")+"3"}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm140_col_ringtone", title: langs.getText("p140","col_ringtone"), tr:[{label: "8"}, {chk_type: "chk_checkall", chk: 1}, {label: langs.getText("p140","col_ringtone")}, {name: "COL_RINGTONE", value: "", textfield: [{max: 2}], message: "", cont: 0}, {label: langs.getText("p140","cmt_crt")}]}
		]}
	]}
);
