if (info.SYSTEM_ID == "iPECS eMG80" || info.SYSTEM_ID == "iPECS eMG800") {
	var init_dip_number = "2";
}
else {
	var init_dip_number = "4";
}

info.NO_OF_ZONE = "32";

info.START_OF_SYS_ANNC = "1";

if(info.PHASE >= 2) {
	info.MAX_DISA_HUNT_ANNC_ALL = "200";
	info.END_OF_SYS_ANNC = "200";
} else {
	info.MAX_DISA_HUNT_ANNC_ALL = "70";
	info.END_OF_SYS_ANNC = "70";
}

if(info.PHASE >= 2.1) {
  if (info.SPD_TYPE == 0) {
 	info.MAX_STN_SPD_BIN = "99";
  } else if (info.SPD_TYPE == 1) {
	info.MAX_STN_SPD_BIN = "99";
  } else if (info.SPD_TYPE == 2) {
	info.MAX_STN_SPD_BIN = "99";
  } else if (info.SPD_TYPE == 3) {
	info.MAX_STN_SPD_BIN = "19";
  } else if (info.SPD_TYPE == 4) {
	info.MAX_STN_SPD_BIN = "19";
  } else if (info.SPD_TYPE == 5) {
	info.MAX_STN_SPD_BIN = "99";
  } else if (info.SPD_TYPE == 6) {
	info.MAX_STN_SPD_BIN = "99";
  } else if (info.SPD_TYPE == 7) {
	info.MAX_STN_SPD_BIN = "9";
  } else if (info.SPD_TYPE == 8) {
	info.MAX_STN_SPD_BIN = "9";
  } else if (info.SPD_TYPE == 9) {
	info.MAX_STN_SPD_BIN = "0";
  } else {
	info.MAX_STN_SPD_BIN = "99";
  }
} else {
  if (info.SPD_TYPE == 0) {
 	info.MAX_STN_SPD_BIN = "99";
  } else if (info.SPD_TYPE == 1) {
	info.MAX_STN_SPD_BIN = "99";
  } else if (info.SPD_TYPE == 2) {
	info.MAX_STN_SPD_BIN = "99";
  } else if (info.SPD_TYPE == 3) {
	info.MAX_STN_SPD_BIN = "99";
  } else if (info.SPD_TYPE == 4) {
	info.MAX_STN_SPD_BIN = "19";
  } else if (info.SPD_TYPE == 5) {
	info.MAX_STN_SPD_BIN = "19";
  } else if (info.SPD_TYPE == 6) {
	info.MAX_STN_SPD_BIN = "9";
  } else if (info.SPD_TYPE == 7) {
	info.MAX_STN_SPD_BIN = "0";
  } else {
	info.MAX_STN_SPD_BIN = "99";
  }
}

if (info.SYSTEM_ID == "iPECS eMG80") {
   info.NO_OF_STNS = "140";
   info.NO_OF_COLS = "74";
   info.NO_OF_ICM_GRPS = "15";
   info.NO_OF_SLOTS = "300";
   info.NO_OF_PICKUP_GRP = "49";
   info.NO_OF_MSN_TBL = "500";
   info.LCR_MAX_LDT_TBL = "10";
   info.MAX_SYS_AUTH_CODE_BIN = "360";
   info.NO_OF_DID_CONV_TBL = "9999";
   info.NO_SCR_TBL = "159";
   info.NO_CRR_TBL = "169";
   info.NO_OF_PERSONAL_GRP = "70";
   info.NO_OF_COMPANY_NAME_TBL = "16";
if(info.PHASE >= 2.1) {
   if (info.SPD_TYPE == 0) {
   	info.SYS_SPD_RANGE = "2000 - 4999";
   } else if (info.SPD_TYPE == 1) {
   	info.SYS_SPD_RANGE = "2000 - 4999";
   } else if (info.SPD_TYPE == 2) {
   	info.SYS_SPD_RANGE = "200 - 999";
   } else if (info.SPD_TYPE == 3) {
   	info.SYS_SPD_RANGE = "200 - 999";
   } else if (info.SPD_TYPE == 4) {
   	info.SYS_SPD_RANGE = "20 - 99";
   } else if (info.SPD_TYPE == 5) {
   	info.SYS_SPD_RANGE = "1000 - 3999";
   } else if (info.SPD_TYPE == 6) {
   	info.SYS_SPD_RANGE = "100 - 999";
   } else if (info.SPD_TYPE == 7) {
   	info.SYS_SPD_RANGE = "100 - 999";
   } else if (info.SPD_TYPE == 8) {
   	info.SYS_SPD_RANGE = "10 - 99";
   } else if (info.SPD_TYPE == 9) {
   	info.SYS_SPD_RANGE = "1 - 9";
   } else {
   	info.SYS_SPD_RANGE = "2000 - 4999";
   }
} else {
   if (info.SPD_TYPE == 0) {
   	info.SYS_SPD_RANGE = "2000 - 4999";
   } else if (info.SPD_TYPE == 1) {
   	info.SYS_SPD_RANGE = "2000 - 4999";
   } else if (info.SPD_TYPE == 2) {
   	info.SYS_SPD_RANGE = "2000 - 4999";
   } else if (info.SPD_TYPE == 3) {
   	info.SYS_SPD_RANGE = "2000 - 4999";
   } else if (info.SPD_TYPE == 4) {
   	info.SYS_SPD_RANGE = "200 - 999";
   } else if (info.SPD_TYPE == 5) {
   	info.SYS_SPD_RANGE = "20 - 99";
   } else if (info.SPD_TYPE == 6) {
   	info.SYS_SPD_RANGE = "10 - 99";
   } else if (info.SPD_TYPE == 7) {
   	info.SYS_SPD_RANGE = "1 - 9";
   } else {
   	info.SYS_SPD_RANGE = "2000 - 4999";
   }
}
   info.TNET_NO_OF_LM = "15";
   info.NO_OF_RSGM = "70";
   info.STN_CONF_GROUP_RANGE = "0 - 19";
   info.SYS_CONF_GROUP_RANGE = "100 - 139";
   info.MAX_TDM_GAIN_TBL = "3";
   info.MAX_TONE_TABLE = "5";
   info.NO_OF_UCS = "32";
   info.NO_OF_UCS_SERVER_ID = "2"
   info.REAL_NO_OF_FOP_TBL = "29";
   info.NO_OF_FOP_TBL = "199";
   info.MAX_DITRANCLASS_NO = info.NO_OF_ICM_GRPS;
   info.NO_OF_CO_GRP = "20";
   info.NO_OF_TNET = "15";
   info.MAX_NUM_OF_SERVER = "2";
}
else if (info.SYSTEM_ID == "iPECS eMG800") {
   info.NO_OF_STNS = "1200";
   info.NO_OF_COLS = "600";
   info.NO_OF_ICM_GRPS = "32";
   info.NO_OF_SLOTS = "2890";
   info.NO_OF_PICKUP_GRP = "199";
   info.NO_OF_MSN_TBL = "1500";
   info.LCR_MAX_LDT_TBL = "32";
   info.MAX_SYS_AUTH_CODE_BIN = "1200";
   info.NO_OF_DID_CONV_TBL = "9999";
   info.NO_SCR_TBL = "329";
   info.NO_CRR_TBL = "169";
   info.NO_OF_PERSONAL_GRP = "600";
   info.NO_OF_COMPANY_NAME_TBL = "100";
if(info.PHASE >= 2.1) {
   if (info.SPD_TYPE == 0) {
   	info.SYS_SPD_RANGE = "2000 - 9999";
   } else if (info.SPD_TYPE == 1) {
   	info.SYS_SPD_RANGE = "2000 - 9999";
   } else if (info.SPD_TYPE == 2) {
   	info.SYS_SPD_RANGE = "200 - 999";
   } else if (info.SPD_TYPE == 3) {
   	info.SYS_SPD_RANGE = "200 - 999";
   } else if (info.SPD_TYPE == 4) {
   	info.SYS_SPD_RANGE = "20 - 99";
   } else if (info.SPD_TYPE == 5) {
   	info.SYS_SPD_RANGE = "1000 - 8999";
   } else if (info.SPD_TYPE == 6) {
   	info.SYS_SPD_RANGE = "100 - 999";
   } else if (info.SPD_TYPE == 7) {
   	info.SYS_SPD_RANGE = "100 - 999";
   } else if (info.SPD_TYPE == 8) {
   	info.SYS_SPD_RANGE = "10 - 99";
   } else if (info.SPD_TYPE == 9) {
   	info.SYS_SPD_RANGE = "1 - 9";
   } else {
   	info.SYS_SPD_RANGE = "2000 - 4999";
   }
} else {
   if (info.SPD_TYPE == 0) {
   	info.SYS_SPD_RANGE = "2000 - 9999";
   } else if (info.SPD_TYPE == 1) {
   	info.SYS_SPD_RANGE = "2000 - 4999";
   } else if (info.SPD_TYPE == 2) {
   	info.SYS_SPD_RANGE = "2000 - 9999";
   } else if (info.SPD_TYPE == 3) {
   	info.SYS_SPD_RANGE = "2000 - 7999";
   } else if (info.SPD_TYPE == 4) {
   	info.SYS_SPD_RANGE = "200 - 999";
   } else if (info.SPD_TYPE == 5) {
   	info.SYS_SPD_RANGE = "20 - 99";
   } else if (info.SPD_TYPE == 6) {
   	info.SYS_SPD_RANGE = "10 - 99";
   } else if (info.SPD_TYPE == 7) {
   	info.SYS_SPD_RANGE = "1 - 9";
   } else {
   	info.SYS_SPD_RANGE = "2000 - 9999";
   }
}
   info.TNET_NO_OF_LM = "32";
   info.NO_OF_RSGM = "70";
   info.STN_CONF_GROUP_RANGE = "0 - 99";
   info.SYS_CONF_GROUP_RANGE = "100 - 259";
   info.MAX_TDM_GAIN_TBL = "3";
   info.MAX_TONE_TABLE = "5";
   info.NO_OF_UCS = "200";
   info.NO_OF_UCS_SERVER_ID = "5"
   info.REAL_NO_OF_FOP_TBL = "29";
   info.NO_OF_FOP_TBL = "199";
   info.MAX_DITRANCLASS_NO = info.NO_OF_ICM_GRPS;
   info.NO_OF_CO_GRP = "200";
   info.NO_OF_TNET = "32";
   info.MAX_NUM_OF_SERVER = "5";
}
else {	/* info.SYSTEM_ID == "UCP100" || info.SYSTEM_ID == "UCP600" || info.SYSTEM_ID == "UCP2400" */
   info.NO_OF_STNS = "2400";
   info.NO_OF_COLS = "998";
   info.NO_OF_ICM_GRPS = "100";
   info.NO_OF_SLOTS = "3688";
   info.NO_OF_PICKUP_GRP = "199";
   info.NO_OF_MSN_TBL = "2400";
   info.LCR_MAX_LDT_TBL = "32";
   info.MAX_SYS_AUTH_CODE_BIN = "2800";
   info.NO_OF_DID_CONV_TBL = "9999";
   info.NO_SCR_TBL = "1009";
   info.NO_CRR_TBL = "499";
   info.NO_OF_PERSONAL_GRP = "1200";
   info.NO_OF_COMPANY_NAME_TBL = "100";
if(info.PHASE >= 2.1) {
   if (info.SPD_TYPE == 0) {
   	info.SYS_SPD_RANGE = "20000 - 31999";
   } else if (info.SPD_TYPE == 1) {
   	info.SYS_SPD_RANGE = "2000 - 9999";
   } else if (info.SPD_TYPE == 2) {
   	info.SYS_SPD_RANGE = "200 - 999";
   } else if (info.SPD_TYPE == 3) {
   	info.SYS_SPD_RANGE = "200 - 999";
   } else if (info.SPD_TYPE == 4) {
   	info.SYS_SPD_RANGE = "20 - 99";
   } else if (info.SPD_TYPE == 5) {
   	info.SYS_SPD_RANGE = "1000 - 9999";
   } else if (info.SPD_TYPE == 6) {
   	info.SYS_SPD_RANGE = "100 - 999";
   } else if (info.SPD_TYPE == 7) {
   	info.SYS_SPD_RANGE = "100 - 999";
   } else if (info.SPD_TYPE == 8) {
   	info.SYS_SPD_RANGE = "10 - 99";
   } else if (info.SPD_TYPE == 9) {
   	info.SYS_SPD_RANGE = "1 - 9";
   } else {
   	info.SYS_SPD_RANGE = "2000 - 4999";
   }
} else {
   if (info.SPD_TYPE == 0) {
   	info.SYS_SPD_RANGE = "20000 - 31999";
   } else if (info.SPD_TYPE == 1) {
   	info.SYS_SPD_RANGE = "2000 - 4999";
   } else if (info.SPD_TYPE == 2) {
   	info.SYS_SPD_RANGE = "2000 - 9999";
   } else if (info.SPD_TYPE == 3) {
   	info.SYS_SPD_RANGE = "2000 - 7999";
   } else if (info.SPD_TYPE == 4) {
   	info.SYS_SPD_RANGE = "200 - 999";
   } else if (info.SPD_TYPE == 5) {
   	info.SYS_SPD_RANGE = "20 - 99";
   } else if (info.SPD_TYPE == 6) {
   	info.SYS_SPD_RANGE = "10 - 99";
   } else if (info.SPD_TYPE == 7) {
   	info.SYS_SPD_RANGE = "1 - 9";
   } else {
   	info.SYS_SPD_RANGE = "20000 - 31999";
   }
}
   info.TNET_NO_OF_LM = "100";
   info.NO_OF_RSGM = "70";
   info.STN_CONF_GROUP_RANGE = "0 - 99";
   info.SYS_CONF_GROUP_RANGE = "100 - 259";
   info.MAX_TDM_GAIN_TBL = "3";
   info.MAX_TONE_TABLE = "5";
   if (info.SYSTEM_ID == "UCP100") {
		info.NO_OF_UCS = "100";
   } else if (info.SYSTEM_ID == "UCP600") {
		info.NO_OF_UCS = "200";
   } else if (info.SYSTEM_ID == "UCP2400" || info.SYSTEM_ID == "vUCP") {
		info.NO_OF_UCS = "400";
   }
   info.NO_OF_UCS_SERVER_ID = "16"
   info.REAL_NO_OF_FOP_TBL = "99";
   info.NO_OF_FOP_TBL = "599";
   info.MAX_DITRANCLASS_NO = "32";
   info.NO_OF_CO_GRP = "200";
   info.NO_OF_TNET = "100";
   info.MAX_NUM_OF_SERVER = "10";
}

langs.getText = function (category, name) {
	try {
		var mlan_text = langs[category][name];
	} catch(e) {
		return "Error : Can't find this string. Please check your multi language file";
	}

	if(mlan_text) {
		var str = "";

		if(mlan_text[lang] == "") {
			str = mlan_text[0];
		} else if((lang == 0) || (lang == 1)) {
			str = mlan_text[lang];
		} else {
			str = mlan_text[0];
		}

		if(info.SYSTEM_ID == "iPECS eMG80" || info.SYSTEM_ID == "iPECS eMG800") {
			if(str.match('MFIM')) {
				str = str.replace('MFIM','MPB');
			}

			if(str.match('UCP')) {
				str = str.replace('UCP','MPB');
			}

			//if(str.match('BRIM')) {
				//str = str.replace('BRIM','BRIB');
			//}

			if(str.match('STIM')) {
				str = str.replace('STIM','SOIB');
			}

			//if(str.match('PRIM')) {
			//	str = str.replace('PRIM','PRIB');
			//}

			//if(str.match('T1IM')) {
			//	str = str.replace('T1IM','T1IB');
			//}

			if(str.match('E1IM')) {
				str = str.replace('E1IM','E1IB');
			}

			//if(str.match('VOIM')) {
			//	str = str.replace('VOIM','VOIB');
			//}

			//if(str.match('LGCM')) {
			//	str = str.replace('LGCM','LCOB');
			//}

			//if(str.match('SLTM')) {
			//	str = str.replace('SLTM','SLIB');
			//}

			//if(str.match('VMIM')) {
			//	str = str.replace('VMIM','VMIB');
			//}

			if(str.match('UVM')) {
				str = str.replace('UVM','VMIB');
			}

			if(str.match('UVMU')) {
				str = str.replace('UVMU','VMIU');
			}

			if(str.match('WTIM')) {
				str = str.replace('WTIM','WTIB');
			}

			if(str.match('VOIP')) {
				str = str.replace('VOIP','VOIU');
			}

			if(str.match('MISC')) {
				str = str.replace('MISC','MISU');
			}

			if(str.match('MCIM')) {
				str = str.replace('MCIM','MCIB');
			}

			if(str.match('DVU')) {
				str = str.replace('DVU','VSF');
			}
		} else {
			if(str.match('MPB')) {
				str = str.replace('MPB','UCP');
			}

			if(str.match('MFIM')) {
				str = str.replace('MFIM','UCP');
			}

			if(str.match('BRIB')) {
				str = str.replace('BRIB','BRIM');
			}

			if(str.match('SOIB')) {
				str = str.replace('SOIB','STIM');
			}

			if(str.match('PRIB')) {
				str = str.replace('PRIB','PRIM');
			}

			if(str.match('T1IB')) {
				str = str.replace('T1IB','T1IM');
			}

			if(str.match('E1IB')) {
				str = str.replace('E1IB','E1IM');
			}

			if(str.match('VOIB')) {
				str = str.replace('VOIB','VOIM');
			}

			if(str.match('LCOB')) {
				str = str.replace('LCOB','LGCM');
			}

			if(str.match('SLIB')) {
				str = str.replace('SLIB','SLTM');
			}
			
			if(str.match('VMIB')) {
				str = str.replace('VMIB','UVM');
			}

			if(str.match('VMIM')) {
				str = str.replace('VMIM','UVM');
			}
			
			if(str.match('VMIU')) {
				str = str.replace('VMIU','UVMU');
			}

			if(str.match('WTIB')) {
				str = str.replace('WTIB','WTIM');
			}

			if(str.match('MISU')) {
				str = str.replace('MISU','MISC');
			}

			if(str.match('MCIB')) {
				str = str.replace('MCIB','MCIM');
			}

			if(str.match('DVU')) {
				str = str.replace('DVU','VSF');
			}
		}
		return str;
	} else {
		return "Error : Can't find this string. Please check your multi language file";
	}
}

langs.Range_Error_Table = function () {
	var ret = {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")}, {value: "5", option: langs.getText("error_msg","opt_range_error_case5")}, {value: "6", option: langs.getText("error_msg","opt_range_error_case6")}, {value: "7", option: langs.getText("error_msg","opt_range_error_case7")}, {value: "8", option: langs.getText("error_msg","opt_range_error_case8")}, {value: "9", option: langs.getText("error_msg","opt_range_error_case9")}, {value: "10", option: langs.getText("error_msg","opt_range_error_case10")}, {value: "11", option: langs.getText("error_msg","opt_range_error_case11")}, {value: "12", option: langs.getText("error_msg","opt_range_error_case12")}, {value: "13", option: langs.getText("error_msg","opt_range_error_case13")}, {value: "14", option: langs.getText("error_msg","opt_range_error_case14")}, {value: "15", option: langs.getText("error_msg","opt_range_error_case15")}, {value: "16", option: langs.getText("error_msg","opt_range_error_case16")}, {value: "17", option: langs.getText("error_msg","opt_range_error_case17")},{value: "18", option: langs.getText("error_msg","opt_range_error_case18")}, {value: "19", option: langs.getText("error_msg","opt_range_error_case19")},{value: "20", option: langs.getText("error_msg","opt_range_error_case20")}], message: "", show: 0};
	return ret;
}

langs.re_toolTip = function() {
	var ret = langs.getText("toolTip","re1")+"<br>"+langs.getText("toolTip","re2")+"<br>"+langs.getText("toolTip","re3")+"<br>"+langs.getText("toolTip","re4");
	return ret;
}

function getDefaultRange(range, max) {
	var start = range.split("-")[0].replace(/[()]/g,"").trim();
	
	return start + "-" + (eval(start) + eval(max) - 1).toString();
}
