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

define(
    {elements:[
        {name:"tab1", tab: [
            {key: "pgm130_button", button: [{btn: langs.getText("common","btn_save"), btn_type: "btn_save auth_write"}]},
            {key: "pgm130_preload", preload: [{name: "RANGE_TYPE_1", range_type: 2}, {text: langs.getText("common","enter_devnum")+range_guide+" : "}, {name: "RANGE_1_0", value: "", textfield: [{size: 5, max: 4}], message: ""}, {btn: langs.getText("common","load"), btn_type: "btn_load"}, langs.Range_Error_Table(), {endload: 1}, {br: 2}, {text: langs.getText("common","dev_num")+" "}, {name: "RANGE_VIEW_1", value: "", text: 1}]},
            {key: "pgm130_mktbl", title: langs.getText("common","mktbl"), table: [{label: langs.getText("common","order"), sort: "num"}, {label: langs.getText("common","attr")}, {label: langs.getText("common","val")}, {label: langs.getText("common","range")}]},
            {key: "pgm130_gw_ipsetup", title: langs.getText("p130","gw_ipsetup"), tr:[{order: 1}, {label: langs.getText("p130","gw_ipsetup")}, {name:"GW_IPSETUP", value:"", select:[{value: "0", option: langs.getText("common","normal")}, {value: "1", option: langs.getText("p130","opt_gw_ipsetup_fast")}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm130_gw_iptunn", title: langs.getText("p130","gw_iptunn"), tr:[{order: 1}, {label: langs.getText("p130","gw_iptunn")}, {name:"GW_IPTUNN", value:"", select:[{value: "0", option: langs.getText("common","opt_off")}, {value: "1", option: langs.getText("common","opt_on")}], message: "", cont: 0}, {label: ""}]},
				{key: "pgm130_early_media", title: langs.getText("p130","early_media"), tr:[{order: 1}, {label: langs.getText("p130","early_media")},{name: "GW_EMSETUP", value: "", chk_type: "chk_selectall", chk: 1},{label: langs.getText("p130","setup"), cont: 1},{name: "GW_EMPROCEEDING", value: "", chk_type: "chk_selectall", chk: 1, cont: 1},{label: langs.getText("p130","proceeding"),cont:1},{name: "GW_EMALERTING", value: "", chk_type: "chk_selectall", chk: 1, cont: 1},{label: langs.getText("p130","alerting"),cont:1}, {label: ""}]},
            {key: "pgm130_gw_dtmf", title: langs.getText("p130","gw_dtmf"), tr:[{order: 1}, {label: langs.getText("p130","gw_dtmf")}, {name:"GW_DTMF", value:"", select:[{value: "0", option: langs.getText("p130","opt_gw_dtmf_in")}, {value: "1", option: langs.getText("p130","opt_gw_dtmf_out")}, {value: "2", option: "2833"}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm130_gw_diffserv", title: langs.getText("p130","gw_diffserv"), tr:[{order: 1}, {label: langs.getText("p130","gw_diffserv")}, {name:"GW_DIFFSERV", value:"", textfield: [{max: 2}], message: "", cont: 0}, {label: "0-63"}]},
            {key: "pgm130_gw_tcpkeep", title: langs.getText("p130","gw_tcpkeep"), tr:[{order: 1}, {label: langs.getText("p130","gw_tcpkeep")}, {name:"GW_TCPKEEP", value:"", select:[{value: "0", option: langs.getText("common","opt_off")}, {value: "1", option: langs.getText("common","opt_on")}], message: "", cont: 0}, {label: ""}]},
				{key: "pgm130_gw_gatekeeper", title: langs.getText("p130","gatekeeper"), th:[{label: langs.getText("p130","gatekeeper"), colspan: 4}]},
            {key: "pgm130_gw_rasusage", title: langs.getText("p130","gw_rasusage"), tr:[{order: 1}, {label: langs.getText("p130","gw_rasusage")}, {name:"GW_RASUSAGE", value:"", select:[{value: "0", option: langs.getText("common","opt_off")}, {value: "1", option: langs.getText("common","opt_on")}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm130_gw_multiport", title: langs.getText("p130","gw_multiport"), tr:[{order: 1}, {label: langs.getText("p130","gw_multiport")}, {name:"GW_MULTIPORT", value:"", textfield: [{max: 5}], message: "", cont: 0}, {label: "1-65535"}]},
            {key: "pgm130_gw_multiip", title: langs.getText("p130","gw_multiip"), tr:[{order: 1}, {label: langs.getText("p130","gw_multiip")}, {name:"GW_MULTIIP", value:"", textfield: [{size: 20, max: 15}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm130_gw_uniport", title: langs.getText("p130","gw_uniport"), tr:[{order: 1}, {label: langs.getText("p130","gw_uniport")}, {name:"GW_UNIPORT", value:"", textfield: [{max: 5}], message: "", cont: 0}, {label: "1-65535"}]},
            {key: "pgm130_gw_uniip", title: langs.getText("p130","gw_uniip"), tr:[{order: 1}, {label: langs.getText("p130","gw_uniip")}, {name:"GW_UNIIP", value:"", textfield: [{size: 20, max: 15}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm130_gw_keepalive", title: langs.getText("p130","gw_keepalive"), tr:[{order: 1}, {label: langs.getText("p130","gw_keepalive")}, {name:"GW_KEEPALIVE", value:"", textfield: [{max: 3}], message: "", cont: 0}, {label: "001-999(1"+langs.getText("common","cmt_second")+")"}]},
            {key: "pgm130_gw_numprefix", title: langs.getText("p130","gw_numprefix"), tr:[{order: 1}, {label: langs.getText("p130","gw_numprefix")}, {name:"GW_NUMPREFIX", value:"", textfield: [{max: 23}], message: "", cont: 0}, {label: langs.getText("common","max23digit")}]},
            {key: "pgm130_gw_raslight", title: langs.getText("p130","gw_raslight"), tr:[{order: 1}, {label: langs.getText("p130","gw_raslight")}, {name:"GW_RASLIGHT", value:"", select:[{value: "0", option: langs.getText("common","opt_off")}, {value: "1", option: langs.getText("common","opt_on")}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm130_gw_gatewayid", title: langs.getText("p130","gw_gatewayid"), tr:[{order: 1}, {label: langs.getText("p130","gw_gatewayid")}, {name:"GW_GATEWAYID", value:"", textfield: [{size: 60, max: 128}], colspan: 2, message: "", cont: 0}]},

            {key: "pgm130_gw_failover", title: langs.getText("p130","gw_failover"), tr:[{order: 1}, {label: langs.getText("p130","gw_failover")}, {name:"GW_FAILOVER", value:"", select:[{value: "0", option: langs.getText("common","opt_off")}, {value: "1", option: langs.getText("common","opt_on")}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm130_gw_rthtimer", title: langs.getText("common","rthtimer"), tr:[{order: 1}, {label: langs.getText("common","rthtimer")}, {name:"GW_RTHTIMER", value:"", textfield: [{max: 5}], message: "", cont: 0}, {label: "0, 3 - 15 "+langs.getText("common","cmt_second")}]},
            {key: "pgm130_gw_rthgrpno", title: langs.getText("common","failover_cogrpnum"), tr:[{order: 1}, {label: langs.getText("common","failover_cogrpnum")}, {name:"GW_RTHGRPNO", value:"", textfield: [{max: 5}], message: "", cont: 0}, {label: "1 - "}, {name: "GW_GRPNO", value: "", label: 1, cont: 1}, {label: langs.getText("common","cog"), cont: 1}]},
				{key: "pgm130_gw_voip_gw_port", title: langs.getText("p130","voip_gw_port"), th:[{label: langs.getText("p130","voip_gw_port"), colspan: 4}]},
            {key: "pgm130_gw_q931t", title: langs.getText("p130","gw_q931"), tr:[{order: 1}, {label: langs.getText("p130","gw_q931")}, {name:"GW_Q931START", value:"", textfield: [{size: 6, max: 5}], message: "", cont: 0}, {label: " - ", cont: 1}, {name:"GW_Q931END", value:"", textfield: [{size: 6, max: 5}], message: "", cont: 1},{label: "TCP "+langs.getText("common","cmt_port")+"(1-65535)"}]},
            {key: "pgm130_gw_h245", title: langs.getText("p130","gw_h245"), tr:[{order: 1}, {label: langs.getText("p130","gw_h245")}, {name:"GW_H245START", value:"", textfield: [{size: 6, max: 5}], message: "", cont: 0}, {label: " - ", cont: 1}, {name:"GW_H245END", value:"", textfield: [{size: 6, max: 5}], message: "", cont: 1},{label: "TCP "+langs.getText("common","cmt_port")+"(1-65535)"}]},
            {key: "pgm130_gw_ras", title: langs.getText("p130","gw_ras"), tr:[{order: 1}, {label: langs.getText("p130","gw_ras")}, {name:"GW_RASSTART", value:"", textfield: [{size: 6, max: 5}], message: "", cont: 0}, {label: " - ", cont: 1}, {name:"GW_RASEND", value:"", textfield: [{size: 6, max: 5}], message: "", cont: 1},{label: "UDP "+langs.getText("common","cmt_port")+"(1-65535)"}]},
            {key: "pgm130_gw_media", title: langs.getText("p130","gw_media"), tr:[{order: 1}, {label: langs.getText("p130","gw_media")}, {name:"GW_MEDIASTART", value:"", textfield: [{size: 6, max: 5}], message: "", cont: 0}, {label: " - ", cont: 1}, {name:"GW_MEDIAEND", value:"", textfield: [{size: 6, max: 5}], message: "", cont: 1},{label: "UDP "+langs.getText("common","cmt_port")+"(1-65535)"}]},
            {key: "pgm130_gw_data", title: langs.getText("p130","gw_data"), tr:[{order: 1}, {label: langs.getText("p130","gw_data")}, {name:"GW_DATASTART", value:"", textfield: [{size: 6, max: 5}], message: "", cont: 0}, {label: " - ", cont: 1}, {name:"GW_DATAEND", value:"", textfield: [{size: 6, max: 5}], message: "", cont: 1},{label: "TCP "+langs.getText("common","cmt_port")+"(1-65535)"}]},
            {key: "pgm130_gw_extcdprio", title: langs.getText("common","ext_codecprio"), th:[{label: langs.getText("common","ext_codecprio"), colspan: 4}]},
            {key: "pgm130_gw_firstcdprio", title: langs.getText("common","firstcdprio"), tr:[{order: 1}, {label: langs.getText("common","firstcdprio")}, {name:"GW_FIRSTCDPRIO", value:"", select:[{value: "0", option: "g.711-u"}, {value: "1", option: "g.711-a"}, {value: "2", option: "g.723.1"}, {value: "3", option: "g.729"}, {value: "4", option: "g.729a"}, {value: "5", option: langs.getText("common","opt_none")}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm130_gw_secondcdprio", title: langs.getText("common","secondcdprio"), tr:[{order: 1}, {label: langs.getText("common","secondcdprio")}, {name:"GW_SECONDCDPRIO", value:"", select:[{value: "0", option: "g.711-u"}, {value: "1", option: "g.711-a"}, {value: "2", option: "g.723.1"}, {value: "3", option: "g.729"}, {value: "4", option: "g.729a"}, {value: "5", option: langs.getText("common","opt_none")}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm130_gw_thirdcdprio", title: langs.getText("common","thirdcdprio"), tr:[{order: 1}, {label: langs.getText("common","thirdcdprio")}, {name:"GW_THIRDCDPRIO", value:"", select:[{value: "0", option: "g.711-u"}, {value: "1", option: "g.711-a"}, {value: "2", option: "g.723.1"}, {value: "3", option: "g.729"}, {value: "4", option: "g.729a"}, {value: "5", option: langs.getText("common","opt_none")}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm130_gw_forthcdprio", title: langs.getText("common","forthcdprio"), tr:[{order: 1}, {label: langs.getText("common","forthcdprio")}, {name:"GW_FORTHCDPRIO", value:"", select:[{value: "0", option: "g.711-u"}, {value: "1", option: "g.711-a"}, {value: "2", option: "g.723.1"}, {value: "3", option: "g.729"}, {value: "4", option: "g.729a"}, {value: "5", option: langs.getText("common","opt_none")}], message: "", cont: 0}, {label: ""}]},
            {key: "pgm130_gw_fifthcdprio", title: langs.getText("common","fifthcdprio"), tr:[{order: 1}, {label: langs.getText("common","fifthcdprio")}, {name:"GW_FIFTHCDPRIO", value:"", select:[{value: "0", option: "g.711-u"}, {value: "1", option: "g.711-a"}, {value: "2", option: "g.723.1"}, {value: "3", option: "g.729"}, {value: "4", option: "g.729a"}, {value: "5", option: langs.getText("common","opt_none")}], message: "", cont: 0}, {label: ""}]}
		]}
	]}
);
