var v_alm_select = [{value: "0", option: langs.getText("common","opt_off")}, {value: "1", option: langs.getText("p163","alarm_email")}, {value: "2", option: langs.getText("p163","email_only")}, {value: "3", option: langs.getText("p163","alarm_only")}];

if(info.PHASE >= 2.1) {
	if(info.SYSTEM_ID == "UCP2400" || info.SYSTEM_ID == "UCP600" || info.SYSTEM_ID == "iPECS eMG100") {
		var v_alm_str1 = {key: "pgm163_alm_string1", title: langs.getText("p163","alm_string1"), tr:[{order: 1}, {label: langs.getText("p163","alm_string1")}, {name: "ALM_STRING1", value: "", textfield: [{max: 24, size: 24}], message: "", cont: 0,enable_mullang:1}]};
		var v_alm_str2 = {key: "pgm163_alm_string2", title: langs.getText("p163","alm_string2"), tr:[{order: 1}, {label: langs.getText("p163","alm_string2")}, {name: "ALM_STRING2", value: "", textfield: [{max: 24, size: 24}], message: "", cont: 0,enable_mullang:1}]};
	} else if (info.SYSTEM_ID == "vUCP"){
		var v_alm_str1 = {};
		var v_alm_str2 = {};
	} else {
		var v_alm_str1 = {key: "pgm163_alm_string1", title: langs.getText("p163","alm_string"), tr:[{order: 1}, {label: langs.getText("p163","alm_string")}, {name: "ALM_STRING1", value: "", textfield: [{max: 24, size: 24}], message: "", cont: 0,enable_mullang:1}]};
		var v_alm_str2 = {};
	}
} else {
	var v_alm_str1 = {};
	var v_alm_str2 = {};
}

if(info.SYSTEM_ID == "vUCP"){
	var v_alm_enable = {};
	var v_alm_ctype = {};
	var v_alm_mode = {};
	var v_alm_sigmode = {};
} else {
	var v_alm_enable = {key: "pgm163_alm_enable", title: langs.getText("common","alm_enable"), tr: [{order: 1}, {label: langs.getText("common","alm_enable")}, {name: "ALM_ENABLE", value: "", select: [{value: "0", option: langs.getText("common","opt_off")}, {value: "1", option: langs.getText("common","opt_on")}], message: "", cont: 0}]};
	var v_alm_ctype = {key: "pgm163_alm_ctype", title: langs.getText("common","alm_ctype"), tr: [{order: 1}, {label: langs.getText("common","alm_ctype")}, {name: "ALM_CTYPE", value: "", select: [{value: "0", option: langs.getText("common","open")}, {value: "1", option: langs.getText("common","opt_alm_ctype_close")}], message: "", cont: 0}]};
	var v_alm_mode = {key: "pgm163_alm_mode", title: langs.getText("common","alm_mode"), tr: [{order: 1}, {label: langs.getText("common","alm_mode")}, {name: "ALM_MODE", value: "", select: [{value: "0", option: langs.getText("common","doorbell")}, {value: "1", option: langs.getText("common","opt_almmode")}], message: "", cont: 0}]};
	var v_alm_sigmode = {key: "pgm163_alm_sigmode", title: langs.getText("common","alm_sigmode"), tr: [{order: 1}, {label: langs.getText("common","alm_sigmode")}, {name: "ALM_SIGMODE", value: "", select: [{value: "0", option: langs.getText("common","once")}, {value: "1", option: langs.getText("common","repeat")}], message: "", cont: 0}]};
}

if (info.SYSTEM_ID == "iPECS eMG80" || info.SYSTEM_ID == "iPECS eMG100" || info.SYSTEM_ID == "iPECS eMG800")
{
	var v_ipwatch = {};
}
else
{
   if(info.PHASE>=3)
   {
      var v_ipwatch = {};
   }
   else
   {
      var v_ipwatch = {key: "pgm163_ipwatch_alarm", title: langs.getText("p163","ipwatch_alarm"), tr: [{order: 1}, {label: langs.getText("p163","ipwatch_alarm")}, {name: "IPWATCH_ALARM", value: "", select: v_alm_select, message: "", cont: 0}]};
   }
}

if (info.SYSTEM_ID == "iPECS eMG80" || info.SYSTEM_ID == "iPECS eMG100")
{
	var v_cabinet = {};
}
else
{
   if(info.PHASE>=3)
   {
      var v_cabinet = {};
   }
   else
   {
      var v_cabinet = {key: "pgm163_cabinetfault_alarm", title: langs.getText("p163","cabinetfault_alarm"), tr: [{order: 1}, {label: langs.getText("p163","cabinetfault_alarm")}, {name: "CABINETFAULT_ALARM", value: "", select: v_alm_select, message: "", cont: 0}]};
   }
}

if(info.HOTEL) {
   if(info.PHASE>=3)
   {
		var v_hotel = {};
   }
   else
   {
		var v_hotel = {key: "pgm163_barfull_alarm", title: langs.getText("p163","barfull_alarm"), tr: [{order: 1}, {label: langs.getText("p163","barfull_alarm")}, {name: "BARFULL_ALARM", value: "", select: v_alm_select, message: "", cont: 0}]};
   }
} else {
	var v_hotel = {};
}

if(info.PHASE>=2)
{
   if(info.PHASE>=3)
   {
		var v_stafull = {};
		var v_cofull = {};
		var v_smdrfull = {};
		var v_vmfull = {};
		var v_wtimb = {};
		var v_wtimc = {};
		var v_ismdrfull = {};
		var v_ipcr = {};
		var v_bath = {};
		var v_licex = {};
		var v_licov = {};
		var v_tnetlcm = {};
		var v_tapi = {};
   }
   else
   {
		var v_stafull = {key: "pgm163_stafull_alarm", title: langs.getText("p163","stafull_alarm"), tr: [{order: 1}, {label: langs.getText("p163","stafull_alarm")}, {name: "STAFULL_ALARM", value: "", select: v_alm_select, message: "", cont: 0}]};
		var v_cofull = {key: "pgm163_cofull_alarm", title: langs.getText("p163","cofull_alarm"), tr: [{order: 1}, {label: langs.getText("p163","cofull_alarm")}, {name: "COFULL_ALARM", value: "", select: v_alm_select, message: "", cont: 0}]};
		var v_smdrfull = {key: "pgm163_smdrfull_alarm", title: langs.getText("p163","smdrfull_alarm"), tr: [{order: 1}, {label: langs.getText("p163","smdrfull_alarm")}, {name: "SMDRFULL_ALARM", value: "", select: v_alm_select, message: "", cont: 0}]};
		var v_vmfull = {key: "pgm163_vmfull_alarm", title: langs.getText("p163","vmfull_alarm"), tr: [{order: 1}, {label: langs.getText("p163","vmfull_alarm")}, {name: "VMFULL_ALARM", value: "", select: v_alm_select, message: "", cont: 0}]};
		var v_wtimb = {key: "pgm163_wtimbasefault_alarm", title: langs.getText("p163","wtimbasefault_alarm"), tr: [{order: 1}, {label: langs.getText("p163","wtimbasefault_alarm")}, {name: "WTIMBASEFAULT_ALARM", value: "", select: v_alm_select, message: "", cont: 0}]};
		var v_wtimc = {key: "pgm163_wtimchainfault_alarm", title: langs.getText("p163","wtimchainfault_alarm"), tr: [{order: 1}, {label: langs.getText("p163","wtimchainfault_alarm")}, {name: "WTIMCHAINFAULT_ALARM", value: "", select: v_alm_select, message: "", cont: 0}]};
		var v_ismdrfull = {key: "pgm163_ismdr_full_alarm", title: langs.getText("p163","ismdr_full_alarm"), tr: [{order: 1}, {label: langs.getText("p163","ismdr_full_alarm")}, {name: "ISMDR_FULL_ALARM", value: "", select: v_alm_select, message: "", cont: 0}]};
		var v_ipcr = {key: "pgm163_ipcrfault_alarm", title: langs.getText("p163","ipcrfault_alarm"), tr: [{order: 1}, {label: langs.getText("p163","ipcrfault_alarm")}, {name: "IPCRFAULT_ALARM", value: "", select: v_alm_select, message: "", cont: 0}]};
		var v_bath = {key: "pgm163_ebath_alarm", title: langs.getText("p163","ebath_alarm"), tr: [{order: 1}, {label: langs.getText("p163","ebath_alarm")}, {name: "EBATH_ALARM", value: "", select: v_alm_select, message: "", cont: 0}]};
		var v_licex = {key: "pgm163_licexpire_alarm", title: langs.getText("p163","licexpire_alarm"), tr: [{order: 1}, {label: langs.getText("p163","licexpire_alarm")}, {name: "LICEXPIRE_ALARM", value: "", select: v_alm_select, message: "", cont: 0}]};
		var v_licov = {key: "pgm163_licover_alarm", title: langs.getText("p163","licover_alarm"), tr: [{order: 1}, {label: langs.getText("p163","licover_alarm")}, {name: "LICOVER_ALARM", value: "", select: v_alm_select, message: "", cont: 0}]};
		var v_tnetlcm = {key: "pgm163_tnetlcm_alarm", title: langs.getText("p163","tnetlcm_alarm"), tr: [{order: 1}, {label: langs.getText("p163","tnetlcm_alarm")}, {name: "TNETLCM_ALARM", value: "", select: v_alm_select, message: "", cont: 0}]};
		var v_tapi = {key: "pgm163_tapidisc_alarm", title: langs.getText("p163","tapidisc_alarm"), tr: [{order: 1}, {label: langs.getText("p163","tapidisc_alarm")}, {name: "TAPIDISC_ALARM", value: "", select: v_alm_select, message: "", cont: 0}]};
   }
}
else
{
	var v_stafull = {};
	var v_cofull = {};
	var v_smdrfull= {};
	var v_vmfull = {};
	var v_wtimb = {};
	var v_wtimc = {};
	var v_ismdrfull = {};
	var v_ipcr = {};
	var v_bath = {};
	var v_licex = {};
	var v_licov = {};
	var v_tnetlcm = {};
	var v_tapi = {};
	var v_ipwatch = {};
	var v_cabinet = {};
	var v_hotel = {};
}

if (info.PHASE>=3) {
	var basic_header = {};
	var sys_noti_header = {};
	var v_e911_use = {};
	var v_dcob_use = {};
	var v_sip_use = {};
	var v_templcs_use = {};
} else {
	var basic_header = {key: "pgm163_basic_attr", title: langs.getText("common2","basic_attr"), th: [{order_alphabet: 1}, {label: langs.getText("common2","basic_attr"), colspan: 2}]};
	var sys_noti_header = {key: "pgm163_noti_attr", title: langs.getText("common","system")+" "+langs.getText("common","notification"), th: [{order_alphabet: 1}, {label: langs.getText("common","system")+" "+langs.getText("common","notification"), colspan: 2}]};
	var v_e911_use = {key: "pgm163_e911_use", title: langs.getText("p163","e911_use"), tr: [{order: 1}, {label: langs.getText("p163","e911_use")}, {name: "E911_USE", value: "", select: v_alm_select, message: "", cont: 0}]};
	var v_dcob_use = {key: "pgm163_dcob_use", title: langs.getText("p163","dcob_use"), tr: [{order: 1}, {label: langs.getText("p163","dcob_use")}, {name: "DCOB_USE", value: "", select: v_alm_select, message: "", cont: 0}]};
	var v_sip_use = {key: "pgm163_sip_use", title: langs.getText("p163","sip_use"), tr: [{order: 1}, {label: langs.getText("p163","sip_use")}, {name: "SIP_USE", value: "", select: v_alm_select, message: "", cont: 0}]};
	var v_templcs_use = {key: "pgm163_templcs_use", title: langs.getText("p163","templcs_use"), tr: [{order: 1}, {label: langs.getText("p163","templcs_use")}, {name: "TEMPLCS_USE", value: "", select: v_alm_select, message: "", cont: 0}]};
}

define(
	{elements:[
		{name:"tab1", tab: [
			{key: "pgm163_button", button: [{btn: langs.getText("common","btn_save"), btn_type: "btn_save auth_write"}]},
			{key: "pgm163_mktbl", title: langs.getText("common","mktbl"), table: [{label: langs.getText("common","order"), sort: "num"}, {label: langs.getText("common","attr")}, {label: langs.getText("common","val")}]},
			basic_header,
			v_alm_enable,
			v_alm_ctype,
			v_alm_mode,
			v_alm_sigmode,
			v_alm_str1,
			v_alm_str2,
			sys_noti_header,
			v_e911_use,
			v_dcob_use,
			v_sip_use,
			v_stafull,
			v_cofull,
			v_smdrfull,
			v_vmfull,
			v_wtimb,
			v_wtimc,
			v_ismdrfull,
			v_cabinet,
			v_hotel,
			v_ipcr,
			v_ipwatch,
			v_bath,
			v_templcs_use,
			v_licex,
			v_licov,
			v_tnetlcm,
			v_tapi
		]}
	]}
);
