﻿// JavaScript Document
function NotifyError(errorID)
{
	switch (eval(errorID)) {
		case 0: break;
		//	ConfigLib errors
		case -1: alert("Error: the data entered is in the wrong format."); break;
		case -2: alert("Error: incorrect configuration file."); break;
		case -3: alert("Error: incorrect syntax file."); break;
		case -4: alert("Error: router memory full."); break;
		case -5: alert("Error: incorrect property syntax."); break;
		case -6: alert("Error: configuration object does not exist."); break;
		case -7: alert("Error: the added configuration element already exists."); break;
		case -8: alert("Error: property cannot be changed."); break;
		case -9: alert("Error: mandatory property not provided."); break;
		case -10: alert("Error: a system comment failed."); break;
		case -11: alert("Error: not all mandatory properties have been provided."); break;
		case -12: alert("Error: property incompatible with the current configuration."); break;
		case -13: alert("Error: property missing to define the configuration element."); break;
		case -14: alert("Error: illegal operation."); break;
		case -15: alert("Error: the configuration is being updated – please try again later."); break;
		//	Firmware update
		case -128: alert("Error: firmware update cancelled."); break;
		case -129: alert("Error: no firmware update."); break;
		case -130: alert("Error: firmware file not specified."); break;
		case -132: alert("Error: firmware file does not exist."); break;
		case -133: alert("Error: firmware file not compatible."); break;
		case -134: alert("Error: firmware file truncated."); break;
		case -135: alert("Error: cannot delete the flash memory."); break;
		case -136: alert("Error: cannot write to flash memory."); break;
		case -137: alert("Error: the firmware is already being updated."); break;
		//	Unknown error
		default: if (!IsSimulVar(errorID)) alert("Error: unknown error code (" + errorID + ")."); break;
	}
}

