if(info.NO_SCR_TBL) {
   var range_guide = " (0 - "+info.NO_SCR_TBL+")";
	if(info.NO_SCR_TBL < 100) {
		var maxInputRange = info.NO_SCR_TBL;
	} else {
		var maxInputRange = "100";
	}
} else {
   var range_guide = "";
}
var max_sc_grp = info.NO_OF_ICM_GRPS;

if(info.NO_OF_ZONE) {
	var range_zone = " (0-"+info.NO_OF_ZONE+")";
} else {
	var range_zone = " (0-32)";
}
if(info.NO_OF_ICM_GRPS) {
	var range_icmgrp = "0-"+info.NO_OF_ICM_GRPS;
} else {
	var range_icmgrp = "";
}
if(info.NO_OF_COLS) {
    var range_col = " (0 - "+info.NO_OF_COLS+")";
} else {
    var range_col = "";
}

define(
    {elements:[
        {name:"tab1", tab: [
            {key: "pgm251_button", button: [{btn: langs.getText("common","btn_save"), btn_type: "btn_save auth_write"}]},
				{key: "pgm251_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: "pgm251_input_tbl", table: [{label: langs.getText("common","simple_del")}, {label: langs.getText("common","order")}, {label: langs.getText("common","attr")}, {label: langs.getText("common","val")}, {label: langs.getText("common","range")}]},
			{key: "pgm251_input_info", struct: [{tr: [{name: "SYSONDMD_DEL", value: "", chk_type: "chk_selectall", chk: 1, rowspan: 15}, {order: 1}, {label: langs.getText("common","caller_id")}, {name:"SYSONDMD_CIDTYPE", value: "", select: [{value: "255", option: langs.getText("common","not_assigned")}, {value: "2", option: langs.getText("common","opt_cocid")}, {value: "3", option: langs.getText("common","opt_allco")}, {value: "4", option: langs.getText("common","opt_all_call")}, {value: "5", option: langs.getText("p251","opt_sysondmd_cidtype_atdcall")}], message: "", cont: 0}, {label: " : ", cont: 1}, {name: "SYSONDMD_CIDVALUE", value: "", textfield: [{max: 23, size: 23}], message: "", cont: 1}, {label: langs.getText("common","max23digit")}]},
                                             {tr: [{order: 1}, {label: langs.getText("common","cpnvalue")}, {name: "SYSONDMD_CPNVALUE", value: "", textfield: [{max: 23, size: 23}], message: "", cont: 0}, {label: langs.getText("common","max23digit")}]},
                                             {tr: [{order: 1}, {label: langs.getText("common","time_condition")}, {label: langs.getText("common","start_date")+" "}, {name: "SYSONDMD_SDATE", value: "", date: 1, message: "", cont: 1}, {label: " - ", cont: 1}, {label: langs.getText("common","edate")+" ", cont: 1}, {name: "SYSONDMD_EDATE", value: "", date: 1, message: "", cont: 1}, {br: 1, cont: 1}, 
                                                   {name: "SYSONDMD_DAY_MON", value: "", chk_type: "chk_selectall", chk: 1, cont: 1}, {label: " "+langs.getText("common","simple_monday")+" ", cont: 1}, {name: "SYSONDMD_DAY_TUE", value: "", chk_type: "chk_selectall", chk: 1, cont: 1}, {label: langs.getText("common","simple_tuesday")+" ", cont: 1}, {name: "SYSONDMD_DAY_WED", value: "", chk_type: "chk_selectall", chk: 1, cont: 1}, {label: langs.getText("common","simple_wed")+" ", cont: 1}, {name: "SYSONDMD_DAY_THU", value: "", chk_type: "chk_selectall", chk: 1, cont: 1}, {label: langs.getText("common","simple_thu")+" ", cont: 1}, {name: "SYSONDMD_DAY_FRI", value: "", chk_type: "chk_selectall", chk: 1, cont: 1}, {label: langs.getText("common","simple_friday")+" ", cont: 1}, {name: "SYSONDMD_DAY_SAT", value: "", chk_type: "chk_selectall", chk: 1, cont: 1}, {label: langs.getText("common","simple_saturday")+" ", cont: 1}, {name: "SYSONDMD_DAY_SUN", value: "", chk_type: "chk_selectall", chk: 1, cont: 1}, {label: langs.getText("common","simple_sun")+" ", cont: 1}, {name: "SYSONDMD_DAY_ALL", value: "", chk_type: "chk_selectall", chk: 1, cont: 1}, {label: langs.getText("common","day_all")+" ", cont: 1}, {name: "SYSONDMD_DAY_HOL", value: "", chk_type: "chk_selectall", chk: 1, cont: 1}, {label: langs.getText("common","holiday"), cont: 1}, {br: 1, cont: 1}, 
                                                   {label: langs.getText("common","start_time")+" ", cont: 1}, {name: "SYSONDMD_STIME", value: "", textfield: [{max: 4, size: 10}], message: "", cont: 1}, {label: " - ", cont: 1}, {label: langs.getText("common","etime")+" ", cont: 1}, {name: "SYSONDMD_ETIME", value: "", textfield: [{max: 4, size: 10}], message: "", cont: 1}, 
                                                   {label: langs.getText("common","simple_yyyymmdd")}, {br: 3, cont: 1}, {label: langs.getText("common","cmt_simpletime")+" 0000-2359", cont: 1}]},
                                             {tr: [{order: 1}, {label: langs.getText("common","dest")}, {name:"SYSONDMD_DESTTYPE", value: "", select: [{value: "0", option: langs.getText("common","not_assigned")}, 
                                                                                                                                           {value: "1", option: langs.getText("common","info_stn")}, 
                                                                                                                                           {value: "2", option: langs.getText("common","station_group")}, 
                                                                                                                                           {value: "3", option: langs.getText("common","system_speed")}, 
                                                                                                                                           {value: "4", option: langs.getText("common","pabx_trans_sysspd")}, 
                                                                                                                                           {value: "5", option: langs.getText("common","vsf_annc")}, 
                                                                                                                                           {value: "6", option: langs.getText("common","vsf_annc_and_dis")}, 
                                                                                                                                           {value: "7", option: langs.getText("common","networking")}, 
                                                                                                                                           {value: "8", option: langs.getText("common","opt_confroom")}, 
                                                                                                                                           {value: "9", option: langs.getText("common","internal_page")}, 
                                                                                                                                           {value: "10", option: langs.getText("common","ext_page")}, 
                                                                                                                                           {value: "11", option: langs.getText("common","all_call_page")}, 
                                                                                                                                           {value: "12", option: langs.getText("common","vm_stagrp")}, 
                                                                                                                                           {value: "13", option: langs.getText("common","iclid_tbl")}], message: "", cont: 0}, 
                                                   {label: " : "+langs.getText("p251","sysondmd_destvalue")+" ", cont: 1}, {name: "SYSONDMD_DESTVALUE", value: "", textfield: [{max: 8, size: 5}], message: "", cont: 1}, {label: langs.getText("p251","cmt_sysondmd_dest")}]},
                                             {tr: [{order: 1}, {label: langs.getText("common","sc_priority")}, {name: "SYSONDMD_PRIORITY", value: "", textfield: [{max: 1}], message: "", cont: 0}, {label: "0~9 (0:"+langs.getText("common","high_priority")+")"}]},
                                             {tr: [{order: 1}, {label: langs.getText("p251","sysondmd_active")}, {name: "SYSONDMD_ACTIVE", value: "", select: [{value: "0", option: langs.getText("common","opt_off")}, {value: "1", option: langs.getText("common","opt_on")}], message: "", cont: 0}, {label: langs.getText("p251","cmt_sysondmd_active")}]},
                                             {tr: [{order: 1}, {label: langs.getText("p251","sysondmd_vmid")}, {name: "SYSONDMD_VMID", value: "", textfield: [{max: 8}], message: "", cont: 0}, {label: langs.getText("p251","cmt_sysondmd_vmid")}]},
                                             {tr: [{order: 1}, {label: langs.getText("p251","sysondmd_cos")}, {name: "SYSONDMD_COS", value: "", textfield: [{max: 2}], message: "", cont: 0}, {label: langs.getText("p251","cmt_sysondmd_cos")+" (0~11)"}]},
                                             {tr: [{order: 1}, {label: langs.getText("p251","sysondmd_disaactive")}, {name: "SYSONDMD_DISACTIVE", value: "", select: [{value: "0", option: langs.getText("common","opt_off")}, {value: "1", option: langs.getText("common","opt_on")}], message: "", cont: 0}, {label: langs.getText("p251","cmt_sysondmd_disaactive")}]},
                                             {tr: [{order: 1}, {label: langs.getText("p251","sysondmd_icmgrp")}, {name: "SYSONDMD_ICMGRP", value: "", textfield: [{max: 3}], message: "", cont: 0}, {label: range_icmgrp}]},
                                             {tr: [{order: 1}, {label: langs.getText("p251","sysondmd_zoneno")}, {name: "SYSONDMD_ZONENO", value: "", textfield: [{max: 2}], message: "", cont: 0}, {label: langs.getText("common","zone_number")+range_zone}]},
                                             {tr: [{order: 1}, {label: langs.getText("p251","sysondmd_startco")}, {name: "SYSONDMD_STARTCO", value: "", textfield: [{max: 3}], message: "", cont: 0}, {label: langs.getText("p251","cmt_sysondmd_startco")+range_col}]},
                                             {tr: [{order: 1}, {label: langs.getText("p251","sysondmd_endco")}, {name: "SYSONDMD_ENDCO", value: "", textfield: [{max: 3}], message: "", cont: 0}, {label: langs.getText("p251","cmt_sysondmd_endco")+range_col}]},
                                             {tr: [{order: 1}, {label: langs.getText("p251","sysondmd_scgroup")}, {name: "SYSONDMD_SCGROUP", value: "", textfield: [{max: 3}], message: "", cont: 0}, {label: langs.getText("common","grp_num")+" (01~"+max_sc_grp+")"}, {br: 1, cont: 1}, {label: "00 : "+langs.getText("common","unused"), cont: 1}]},
                                             {tr: [{order: 1}, {label: langs.getText("p251","rcv_zoneholiday")}, {name: "SYSONDMD_ZONEHOLIDAY", value: "", textfield: [{max: 2}], message: "", cont: 0}, {label: langs.getText("common","zone_number")+range_zone}]}]},
            {key: "pgm251_output_tbl", table:[{label: langs.getText("common","index"), sort: "num"}, {label: langs.getText("common","caller_id")}, {label: langs.getText("common","cpnvalue")}, {label: langs.getText("common","time")}, {label: langs.getText("common","dest")},
														    {label: langs.getText("common","priority"), sort: "num"}, {label: langs.getText("p251","rcv_active")}, {label: langs.getText("common","vmid")}, {label: langs.getText("common","cos")}, {label: langs.getText("p251","rcv_disaactive")}, 
														    {label: langs.getText("p251","rcv_icmgrp"), sort: "num"}, {label: langs.getText("common","zone")}, {label: langs.getText("common","co_line")}, {label: langs.getText("common","txt_group"), sort: "num"}, {label: langs.getText("p251","rcv_zoneholiday")+range_zone}], 
											  data_form:[{key: "", tr: [{name:"RCV_INDEX", value:"", label: 1}, 
																			    {name:"RCV_CID", value:"", label: 1}, 
																			    {name:"RCV_CPNVALUE", value:"", label: 1}, 
																			    {name:"RCV_TIME", value:"", label: 1}, 
																			    {name:"RCV_DEST", value:"", label: 1}, 
																			    {name:"RCV_PRIORITY", value:"", label: 1}, 
																			    {name:"RCV_ACTIVE", value:"", label: 1}, 
																			    {name:"RCV_VMID", value:"", label: 1}, 
																			    {name:"RCV_COS", value:"", label: 1}, 
																			    {name:"RCV_DISAACTIVE", value:"", label: 1}, 
																			    {name:"RCV_ICMGRP", value:"", label: 1}, 
																			    {name:"RCV_ZONENO", value:"", label: 1}, 
																			    {name:"RCV_COL", value:"", label: 1}, 
																			    {name:"RCV_SCGROUP", value:"", label: 1}, 
																			    {name:"RCV_ZONEHOLIDAY", value:"", label: 1}]}],
									    variable_data:[]}
        ]}
    ]}
);
