if(offline_mode) {
	var smdr_disable = "DA";
} else {
	var smdr_disable = ""
}

if(info.PHASE >= 3.5) {
	var v_restapi1 = {key: "pgm58_tbl_smdr_restdown", title: langs.getText("common","mktbl")+" ("+langs.getText("p58","smdr_restdown")+")", table:[{label: langs.getText("p58","smdr_restdown"), colspan: 2}/*, {btn: langs.getText("common","download"), btn_type: "btn_smdr_restapidownload", cont: 1}*/]};
	var v_restapi2 = {key: "pgm58_smdr_restview", title: langs.getText("p58","smdr_restview"), tr:[{label: langs.getText("p58","smdr_restview")}, {btn: langs.getText("common","btn_view"), btn_type: "btn_smdr_restview"}]};
	var v_restapi3 = {key: "pgm58_smdr_restdel", title: langs.getText("p58","smdr_restdel"), tr:[{label: langs.getText("p58","smdr_restdel")}, {btn: langs.getText("common","btn_del"), btn_type: "btn_smdr_restdel auth_write", error: smdr_disable}]};
} else {
	var v_restapi1 = {};
	var v_restapi2 = {};
	var v_restapi3 = {};
}

define(
    {elements:[
        {name:"tab1", tab: [
            {key: "pgm58_tbl_smdr_alldown", title: langs.getText("common","mktbl")+" ("+langs.getText("p58","smdr_alldown")+")", table:[{label: langs.getText("p58","smdr_alldown"), colspan: 4}, {btn: langs.getText("common","download"), btn_type: "btn_smdr_alldownload", cont: 1}]},
            {key: "pgm58_smdr_stn_range", title: langs.getText("common","stnrange"), tr:[{label: langs.getText("common","stnrange")}, {name:"SMDR_STN_START", value: "", textfield: [{max: 8, size: 10}], message: "", cont: 0}, {label: " - ", cont: 1}, {name:"SMDR_STN_END", value: "", textfield: [{max: 8, size: 10}], message: "", cont: 1}, {name: "RANGE_ERROR", value: "", select: [{value: "1", option: langs.getText("error_msg","opt_range_error_case1")}, {value: "2", option: langs.getText("error_msg","opt_range_error_case2")}, {value: "3", option: langs.getText("error_msg","opt_range_error_case3")}, {value: "4", option: langs.getText("error_msg","opt_range_error_case4")}], message: "", show: 0, cont: 1}, {name: "SMDR_STN_VIEW", btn: langs.getText("common","btn_view"), btn_type: "btn_smdr_stnview"}, {name: "SMDR_STN_DEL", btn: langs.getText("common","btn_del"), btn_type: "btn_smdr_stndel auth_write", error: smdr_disable}]},
            {key: "pgm58_tbl_smdr_intdown", title: langs.getText("common","mktbl")+" ("+langs.getText("p58","smdr_intdown")+")", table:[{label: langs.getText("p58","smdr_intdown"), colspan: 2}, {btn: langs.getText("common","download"), btn_type: "btn_smdr_intdownload", cont: 1}]},
            {key: "pgm58_smdr_intview", title: langs.getText("p58","smdr_intview"), tr:[{label: langs.getText("p58","smdr_intview")}, {btn: langs.getText("common","btn_view"), btn_type: "btn_smdr_intview"}]},
            {key: "pgm58_smdr_intdel", title: langs.getText("p58","smdr_intdel"), tr:[{label: langs.getText("p58","smdr_intdel")}, {btn: langs.getText("common","btn_del"), btn_type: "btn_smdr_intdel auth_write", error: smdr_disable}]},
            v_restapi1,v_restapi2,v_restapi3,
			{key: "pgm58_smdr_total", table: [{name: "SMDR_TBL_SHOW", value: "", tbl_show_flag: 1}, {name: "SMDR_TOTAL", value: "", label: 1}]}
        ]}
    ]}
);