var LCR_MAX_DMT_TBL_RANGE = "99";

if(LCR_MAX_DMT_TBL_RANGE) {
	var range_guide = " (0 - "+LCR_MAX_DMT_TBL_RANGE+")";
	if(LCR_MAX_DMT_TBL_RANGE < 99) {
		var maxInputRange = LCR_MAX_DMT_TBL_RANGE;
	} else {
		var maxInputRange = "100";
	}
}

if (info.SYSTEM_ID == "iPECS eMG80") {
	var cmt_dmtcog = {label: "01-21"};
} else {
	var cmt_dmtcog = {label: "01-201"};
}

define(
    {elements:[
        {name:"tab1", tab: [
            {key: "pgm222_button", button: [{btn: langs.getText("common","btn_save"), btn_type: "btn_save auth_write"}]},
            {key: "pgm222_preload", preload: [{name: "RANGE_TYPE_1", range_type: 2}, {text: langs.getText("common","enter_indexrange")+range_guide+" : "}, {name: "RANGE_1_1", value: "", textfield: [{max: 40, size: 50}], message: "", help: langs.re_toolTip()+"<br><br>"+langs.getText("toolTip","maxinputrange")+" - "+maxInputRange}, {btn: langs.getText("common","load"), btn_type: "btn_load"},
				langs.Range_Error_Table(),
				{endload: 1}, {br: 2}, {text: langs.getText("common","index_range")+" "}, {name: "RANGE_VIEW_1", value: "", text: 1}]},
            {key: "pgm222_mktbl", table: [{label: langs.getText("common","index")}, {label: langs.getText("common","val"), colspan: 2}, {label: langs.getText("common","range")}],
                              data_form: [{key: "", struct: [{tr: [{name: "DMT_INDEX", value: "", rowspan: 8, label: 1}, {label: langs.getText("p222","dmt_ads")}, {name:"DMT_ADS", value: "", textfield: [{max: 25, size: 30}], message: "", cont: 0}, {label: langs.getText("p222","cmt_max25digit")}, {br: 1, cont: 1}, {label: langs.getText("p222","cmt_dmt_ads"), cont: 1}]},
                                                             {tr: [{label: langs.getText("p222","dmt_rp")}, {name:"DMT_RP", value: "", textfield: [{max: 2, size: 5}], message: "", cont: 0}, {label: "01-12"}]},
                                                             {tr: [{label: langs.getText("p222","dmt_nod")}, {name:"DMT_NOD", value: "", textfield: [{max: 2, size: 5}], message: "", cont: 0}, {label: "00-12"}]},
                                                             {tr: [{label: langs.getText("p222","dmt_ap")}, {name:"DMT_AP", value: "", textfield: [{max: 2, size: 5}], message: "", cont: 0}, {label: "01-13"}]},
                                                             {tr: [{label: langs.getText("common","coipgrp")}, {name:"DMT_COG", value: "", textfield: [{max: 3, size: 5}], message: "", cont: 0}, cmt_dmtcog]},
                                                             {tr: [{label: langs.getText("common","dmt_alt")}, {name:"DMT_ALT", value: "", textfield: [{max: 2, size: 5}], message: "", cont: 0}, {label: "00-99"}]},
                                                             {tr: [{label: langs.getText("p222","dmt_net")}, {name:"DMT_NET", value: "", textfield: [{max: 3, size: 5}], message: "", cont: 0}, {label: "001-251"}]},
                                                             {tr: [{label: langs.getText("p222","dmt_smdr")}, {name:"DMT_SMDR", value: "", textfield: [{max: 4, size: 4}], message: "", cont: 0}, {label: langs.getText("p222","cmt_max4digit")}]}]}],
                          variable_data: []}
		]}
	]}
);
