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

if(info.PHASE >= 2) {
	var moh1  = {value: "0",  option: langs.getText("common","first")};
	var moh2  = {value: "1",  option: langs.getText("common","second")};
	var moh3  = {value: "2",  option: langs.getText("common","third")};
	var moh4  = {value: "3",  option: langs.getText("common","fourth")};
	var moh5  = {value: "4",  option: langs.getText("common","fifth")};
	var moh6  = {value: "5",  option: langs.getText("common","sixth")};
	var moh7  = {value: "6",  option: langs.getText("common","seventh")};
	var moh8  = {value: "7",  option: langs.getText("common","eighth")};
	var moh9  = {value: "8",  option: langs.getText("common","nineth")};
	var moh10 = {value: "9",  option: langs.getText("common","tenth")};
	var moh11 = {value: "10", option: langs.getText("common","eleventh")};
	var moh12 = {value: "11", option: langs.getText("common","twelvth")};
	var moh13 = {value: "12", option: langs.getText("common","thirteenth")};
} else {
	var moh1  = {value: "0",  option: langs.getText("common","opt_melody0")};
	var moh2  = {value: "1",  option: langs.getText("common","opt_melody1")};
	var moh3  = {value: "2",  option: langs.getText("common","opt_melody2")};
	var moh4  = {value: "3",  option: langs.getText("common","opt_melody3")};
	var moh5  = {value: "4",  option: langs.getText("common","opt_melody4")};
	var moh6  = {value: "5",  option: langs.getText("common","opt_melody5")};
	var moh7  = {value: "6",  option: langs.getText("common","opt_melody6")};
	var moh8  = {value: "7",  option: langs.getText("common","opt_melody7")};
	var moh9  = {value: "8",  option: langs.getText("common","opt_melody8")};
	var moh10 = {value: "9",  option: langs.getText("common","opt_melody9")};
	var moh11 = {value: "10", option: langs.getText("common","opt_melody10")};
	var moh12 = {value: "11", option: langs.getText("common","opt_melody11")};
	var moh13 = {value: "12", option: langs.getText("common","opt_melody12")};
}
if(info.PHASE >= 2.1) {
	var v_alm_str1 = {key: "pgm335_tnetatt_almstring1", title: langs.getText("p163","alm_string1"), tr:[{order: 1}, {label: langs.getText("p163","alm_string1")}, {name: "TNETATT_ALMSTRING1", value: "", textfield: [{max: 24, size: 24}], message: "", cont: 0}]};
	var v_alm_str2 = {key: "pgm163_tnetatt_almstring2", title: langs.getText("p163","alm_string2"), tr:[{order: 1}, {label: langs.getText("p163","alm_string2")}, {name: "TNETATT_ALMSTRING2", value: "", textfield: [{max: 24, size: 24}], message: "", cont: 0},{label: " (UCP 600/2400 only)", cont: 1}]};
} else {
	var v_alm_str1 = {};
	var v_alm_str2 = {};
}
define(
    {elements:[
        {name:"tab1", tab: [
            {key: "pgm335_button", button: [{btn: langs.getText("common","btn_save"), btn_type: "btn_save auth_write"}]},
            {key: "pgm335_preload", preload: [{name: "RANGE_TYPE_1", range_type: 2}, {text: langs.getText("common","enter_tnetrange")+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","tnet_range")+" "}, {name: "RANGE_VIEW_1", value: "", text: 1}]},
            {key: "pgm335_mktbl", title: langs.getText("common","mktbl"), table: [{label: langs.getText("common","order"), sort: "num"}, {label: langs.getText("common","attr")}, {label: langs.getText("common","val")}]},
            {key: "pgm335_tnet_music_assign", title: langs.getText("p335","tnet_music_assign"), th: [{label: langs.getText("p335","tnet_music_assign"), colspan: 3}]},
            {key: "pgm335_tnetatt_bgm", title: langs.getText("common","bgm_type"), tr:[{order: 1}, {label: langs.getText("common","bgm_type")}, {name:"TNETATT_BGM", value:"", 
																					       select:[{value: "0", option: langs.getText("common","no_bgm")},
																						           {value: "1", option: langs.getText("common","intext_music")+" 1"}, 
													                                               {value: "2", option: langs.getText("common","extmusic")+" 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}]},
            {key: "pgm335_tnetatt_moh", title: langs.getText("common","moh_type"), tr:[{order: 1}, {label: langs.getText("common","moh_type")}, {name:"TNETATT_MOH", value:"", 
																					       select:[{value: "0", option: langs.getText("common","hold_tone")},
																							       {value: "1", option: langs.getText("common","intext_music")+" 1"}, 
													                                               {value: "2", option: langs.getText("common","extmusic")+" 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}]},
            {key: "pgm335_tnetatt_intext", title: langs.getText("common","intext_music"), tr:[{order: 1}, {label: langs.getText("common","intext_music")}, {name:"TNETATT_INTEXT", value:"", 
																					             select:[{value: "0", option: langs.getText("common","internal_music")},
													                                                     {value: "1", option: langs.getText("common","extmusic")}], message: "", cont: 0}]},
				{key: "pgm335_music_melody", title: langs.getText("common","melody"), tr:[{order: 1}, {label: langs.getText("common","melody")}, {name: "TNETATT_MELODY", value: "", select: [moh1, moh2, moh3, moh4, moh5, moh6, moh7, moh8, moh9, moh10, moh11, moh12, moh13], message: "", cont: 0}]},
            {key: "pgm335_tnet_alm_attr", title: langs.getText("p335","tnet_alm_attr"), th: [{label: langs.getText("p335","tnet_alm_attr"), colspan: 3}]},
            {key: "pgm335_tnetatt_almenable", title: langs.getText("common","alm_enable"), tr:[{order: 1}, {label: langs.getText("common","alm_enable")}, {name:"TNETATT_ALMENABLE", value:"", 
																					                    select:[{value: "0", option: langs.getText("common","opt_off")},
													                                                            {value: "1", option: langs.getText("common","opt_on")}], message: "", cont: 0}]},
            {key: "pgm335_tnetatt_almctype", title: langs.getText("common","alm_ctype"), tr:[{order: 1}, {label: langs.getText("common","alm_ctype")}, {name:"TNETATT_ALMCTYPE", value:"", 
																					                 select:[{value: "0", option: langs.getText("common","open")},
													                                                         {value: "1", option: langs.getText("common","opt_alm_ctype_close")}], message: "", cont: 0}]},
            {key: "pgm335_tnetatt_almmode", title: langs.getText("common","alm_mode"), tr:[{order: 1},  {label: langs.getText("common","alm_mode")}, {name:"TNETATT_ALMMODE", value:"", 
																					                select:[{value: "0", option: langs.getText("common","doorbell")},
													                                                        {value: "1", option: langs.getText("common","opt_almmode")}], message: "", cont: 0}]},
            {key: "pgm335_tnetatt_almsigmode", title: langs.getText("p335","tnetatt_almsigmode"), tr:[{order: 1}, {label: langs.getText("p335","tnetatt_almsigmode")}, {name:"TNETATT_ALMSIGMODE", value:"", 
																					                     select:[{value: "0", option: langs.getText("common","once")},
													                                                             {value: "1", option: langs.getText("common","repeat")}], message: "", cont: 0}]},
				v_alm_str1,
				v_alm_str2,
		]}
    ]}
);
