var p1272_security_source = [langs.getText("common","no_security"), "SSL", "TLS"];
var p1272_attach_msg_source = [langs.getText("common","opt_off"), langs.getText("common","opt_on")];
var p1272_del_msg_source = [langs.getText("common","opt_off"), langs.getText("common","opt_on")];

if(info.PHASE >= 4.1) {
	var umsmailenable_th = {label: langs.getText("p127","umsmailenable")};
	var umsmailenable_td = {name:"UMSMAILENABLE", value: "", select: g_onoff, message: "", cont: 0};
	
	var smtpid_remark = {label: "("+langs.getText("common","max64ch")+")", cont: 1};
	var senderaddr_remark = {label: "("+langs.getText("common","max64ch")+")", cont: 1};
	var mailaddr_remark = {label: "("+langs.getText("common","max64ch")+")", cont: 1};
	var smtpid_td = {name:"UMSSMTPID", value: "", textfield: [{max: 64, size: 40}], message: "", cont: 0};
	var smtppwd_td = {name:"UMSSMTPPWD", value: "", textfield: [{max: 64, size: 40}], message: "", cont: 0};		
	var senderaddr_td = {name:"VSFSENDERADDR", value: "", textfield: [{max: 64, size: 40}], message: "", cont: 0};
	var mailaddr_td = {name:"UMSMAILADDR", value: "", textfield: [{max: 64, size: 40}], message: "", cont: 0};
	
	var p1272_ums_enable_source = [langs.getText("common","opt_off"), langs.getText("common","opt_on")];

	column_config["pgm1272"] = [{readOnly: true}, {type: 'dropdown', source: p1272_ums_enable_source}, {maxLength:64}, {maxLength:5}, {type: 'dropdown', source: p1272_security_source}, {maxLength:64}, {maxLength:64}, {maxLength:64}, {maxLength:64}, {type: 'dropdown', source: p1272_attach_msg_source}, {type: 'dropdown', source: p1272_del_msg_source}, {type: "html"}];
} else if(info.PHASE >= 2.2) {
	var umsmailenable_th = {label: langs.getText("p127","umsmailenable")};
	var umsmailenable_td = {name:"UMSMAILENABLE", value: "", select: g_onoff, message: "", cont: 0};
	
	var smtpid_remark = {label: "("+langs.getText("common","max64ch")+")", cont: 1};
	var senderaddr_remark = {label: "("+langs.getText("common","max64ch")+")", cont: 1};
	var mailaddr_remark = {label: "("+langs.getText("common","max64ch")+")", cont: 1};
	var smtpid_td = {name:"UMSSMTPID", value: "", textfield: [{max: 64, size: 40}], message: "", cont: 0};
	var smtppwd_td = {name:"UMSSMTPPWD", value: "", textfield: [{max: 30, size: 30}], message: "", cont: 0};		
	var senderaddr_td = {name:"VSFSENDERADDR", value: "", textfield: [{max: 64, size: 40}], message: "", cont: 0};
	var mailaddr_td = {name:"UMSMAILADDR", value: "", textfield: [{max: 64, size: 40}], message: "", cont: 0};
	
	var p1272_ums_enable_source = [langs.getText("common","opt_off"), langs.getText("common","opt_on")];

	column_config["pgm1272"] = [{readOnly: true}, {type: 'dropdown', source: p1272_ums_enable_source}, {maxLength:64}, {maxLength:5}, {type: 'dropdown', source: p1272_security_source}, {maxLength:64}, {maxLength:30}, {maxLength:64}, {maxLength:64}, {type: 'dropdown', source: p1272_attach_msg_source}, {type: 'dropdown', source: p1272_del_msg_source}, {type: "html"}];
} else if (info.PHASE >= 2.1) {
	var umsmailenable_th = {label: langs.getText("p127","umsmailenable")};
	var umsmailenable_td = {name:"UMSMAILENABLE", value: "", select: g_onoff, message: "", cont: 0};
	
	var smtpid_remark = {label: " ", cont: 1};
	var senderaddr_remark = {label: " ", cont: 1};
	var mailaddr_remark = {label: " ", cont: 1};
	var smtpid_td = {name:"UMSSMTPID", value: "", textfield: [{max: 40}], message: "", cont: 0};
	var smtppwd_td = {name:"UMSSMTPPWD", value: "", textfield: [{max: 30, size: 30}], message: "", cont: 0};	
	var senderaddr_td = {name:"VSFSENDERADDR", value: "", textfield: [{max: 44}], message: "", cont: 0};
	var mailaddr_td = {name:"UMSMAILADDR", value: "", textfield: [{max: 44}], message: "", cont: 0};
	
	column_config["pgm1272"] = [{readOnly: true}, {maxLength:64}, {maxLength:5}, {type: 'dropdown', source: p1272_security_source}, {maxLength:40}, {maxLength:30}, {maxLength:44}, {maxLength:44}, {type: 'dropdown', source: p1272_attach_msg_source}, {type: 'dropdown', source: p1272_del_msg_source}, {type: "html"}];
} else {
	var umsmailenable_th = {};
	var umsmailenable_td = {};
	
	var smtpid_remark = {label: " ", cont: 1};
	var senderaddr_remark = {label: " ", cont: 1};
	var mailaddr_remark = {label: " ", cont: 1};
	var smtpid_td = {name:"UMSSMTPID", value: "", textfield: [{max: 40}], message: "", cont: 0};
	var smtppwd_td = {name:"UMSSMTPPWD", value: "", textfield: [{max: 30, size: 30}], message: "", cont: 0};
	var senderaddr_td = {name:"VSFSENDERADDR", value: "", textfield: [{max: 44}], message: "", cont: 0};
	var mailaddr_td = {name:"UMSMAILADDR", value: "", textfield: [{max: 44}], message: "", cont: 0};
	
	column_config["pgm1272"] = [{readOnly: true}, {maxLength:64}, {maxLength:5}, {type: 'dropdown', source: p1272_security_source}, {maxLength:40}, {maxLength:30}, {maxLength:44}, {maxLength:44}, {type: 'dropdown', source: p1272_attach_msg_source}, {type: 'dropdown', source: p1272_del_msg_source}, {type: "html"}];
}

define(
    {elements:[
        {name:"tab1", tab: [
            {key: "pgm1272_button", button: [{btn: langs.getText("common","btn_save"), btn_type: "btn_save auth_write"}]},
            {key: "pgm1272_preload", preload: [{name: "RANGE_TYPE_1", range_type: 1}, {text: langs.getText("common","enter_stnrange")+" : "}, {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","stnrange")+" "}, {name: "RANGE_VIEW_1", value: "", text: 1}]},
            {key: "pgm1272_mktbl", edit_table: [{label: langs.getText("common","sta_num")}, 
												umsmailenable_th, 
												{label: langs.getText("common","umsmailsv")}, {br: 1, cont: 1}, {label: "("+langs.getText("common","max64ch")+")", cont: 1}, 
												{label: langs.getText("p127","vsfport")}, {br: 1, cont: 1}, {label: "(00001-65535)", cont: 1}, 
												{label: langs.getText("p127","vsfsecurity")}, 
												{label: langs.getText("p127","umssmtpid")}, {br: 1, cont: 1}, smtpid_remark, 
												{label: langs.getText("p127","umssmtppwd")}, {br: 1, cont: 1}, smtpid_remark, 												
												{label: langs.getText("common","vsfsenderaddr")}, {br: 1, cont: 1}, senderaddr_remark, 
												{label: langs.getText("p127","umsmailaddr")}, {br: 1, cont: 1}, mailaddr_remark, 
												{label: langs.getText("p127","umsattachmsg")}, 
												{label: langs.getText("p127","umsdelmsg")},
												{label: " "}],
									data_form: [{key: "", tr: [ {name: "UMSSTNNUM", value: "", label: 1}, 
																  umsmailenable_td,
																  {name:"UMSMAILSV", value: "", textfield: [{max: 64, size: 40}], message: "", cont: 0},
																  {name:"VSFPORT", value: "", textfield: [{max: 5}], message: "", cont: 0},
																  {name:"VSFSECURITY", value: "", select: g_pgm1272_sel_security, message: "", cont: 0},
																  smtpid_td,
																  smtppwd_td,
																  senderaddr_td,
																  mailaddr_td,
																  {name:"UMSATTACHMSG", value: "", select: g_onoff, message: "", cont: 0},
																  {name:"UMSDELMSG", value: "", select: g_onoff, message: "", cont: 0},
																  {btn: langs.getText("common","btn_sendmail"), btn_type: "btn_sendmail btn_emailnoti auth_write"}]}],
								variable_data: [{}]}
		]}
	]}
);
