//public message
var msg_blank = "%s can not be blank.\n";
var msg_space = "Blanks or spaces are not allowed in %s\n";
var msg_blank_in = "Blanks are not allowed in %s\n";
var msg_mis_len = "%s must be at least %s characters\n";
var msg_invalid = "Invalid character or characters in %s\nValid characters are: \n%s\n\n";
var msg_check_invalid = "%s contains an invalid number\n";
var msg_greater = "%s must be greater than %s \n";
var msg_less = "%s must be less than %s \n";
var msg_first = "First";  // eg. First field of GW must match device IP
var msg_second = "Second";
var msg_third = "Third";
var msg_fourth = "Fourth";
var msg_invalidMAC = "%s must be 12 Hex chars (0~9 and A~F) with optional delimiters (: or -)\n";
var msg_invalidOUI = "%s must be 6 Hex chars (0~9 and A~F) with optional delimiters (: or -)\n";
var msg_validIP = "%s is invalid. Valid range is 1.0.0.1 to 254.255.255.254\n";
var msg_validMask = "%s is invalid. Valid range is 0.0.0.0 to 255.255.255.255\n";
var na_var = "n/a";
var wmode_msg = "This screen is not available while in Bridge mode";


// backup/config
var msg_cfDefault = "Warning!\nLoading the Factory Default Settings will erase all the current settings.\nAre you sure you wish to do this?\n\nClick OK to continue, Cancel to abort.";
var msg_restoreCfg = "Warning!\nRestoring settings from a config file will erase all the current settings.\nAre you sure you wish to do this?\n\nClick OK to continue, Cancel to abort.";
var msg_nocfg_file = "Filename can not be blank";
var msg_invalidcfgfile = "Invalid filename provided. please enter again:(*.cfg)";

//lan
var msg_remoteAP = "Remote AP MAC address";
var msg_noremoteAP = "Remote AP address is not required for this mode, and cannot be specified";
var msg_apname = "Invalid Access Point Name.\nThe name can be up to 15 characters long but should only contain the numbers 0-9, the letters A-Z and a-z, and hyphens.\n";
var msg_ip_field = "%s field of IP address";
var msg_ip_address = "IP Address";
var msg_netmask = "Network Mask";
var msg_gatewayip = "Gateway IP Address";
var msg_DNS_ip = "DSN Server IP Address";
var msg_wins_name = "Name";
var msg_wins_server_address = "WINS Server Address is invalid";
var msg_not_work24g = "WARNING!\nBecause both AP mode and Bridge mode are disabled,\nthe 2.4 GHz wireless band is effectively disabled.";
var msg_not_work5g = "WARNING!\nBecause both AP mode and Bridge mode are disabled,\nthe 5 GHz band is effectively disabled.";

// password
var msg_pw_nomatch = "The passwords entries do not match, please enter again\n";
var msg_user_name = "User name";

//status
var msg_restart = "This operation will restart your device.\nAny existing connections will be broken.";

// Security
var msg_noac = "Access Control is disabled";
var msg_noencypt  = "Data Encryption is disabled";
var msg_ssid = "SSID";

var msg_radius_password = "Radius password";
var msg_radius_domain = "Radius Domain Name";
var msg_key_lifetime = "Key Lifetime";
var msg_wpa_ptk_lifetime	= "Pairwise Key Lifetime";
var msg_wpa_gtk_lifetime	= "Group Key Lifetime";
var msg_radius_server  = "Radius Server address is invalid\n";

var msg_radius_server1 = "Primary Authentication Server IP address";
var msg_radius_server2 = "Secondary Authentication Server IP address";
var msg_radius_port1 = "Primary Authentication Server Port number";
var msg_radius_port2 = "Secondary Authentication Server Port number";
var msg_r_login_key1 = "Primary Authentication Server Shared Secret";
var msg_r_login_key2 = "Secondary Authentication Server Shared Secret";

var msg_reauthentication_time = "Reauthentication Time";

var msg_acct_server1 = "Primary Accounting Server IP address";
var msg_acct_server2 = "Secondary Accounting Server IP address";
var msg_acct_port1 = "Primary Accounting Server Port number";
var msg_acct_port2 = "Secondary Accounting Server Port number";
var msg_a_login_key1 = "Primary Accounting Server Shared Secret";
var msg_a_login_key2 = "Secondary Accounting Server Shared Secret";


var msg_wep_pass = "Passphrase must be at least %s characters";
var msg_key64_hex = "Invalid WEP Key. Keys must be 10 Hex chars (0~9 and A~F)\nDefault key is required, other keys are optional.";
var msg_key64_ascii = "Invalid WEP Key. Keys must be 5 ASCII chars.\nDefault key is required, other keys are optional.";
var msg_key128_hex = "Invalid WEP Key. Keys must be 26 Hex chars (0~9 and A~F)\nDefault key is required, other keys are optional.";
var msg_key128_ascii = "Invalid WEP Key. Keys must be 13 ASCII chars.\nDefault key is required, other keys are optional.";
var msg_key152_hex = "Invalid WEP Key. Keys must be 32 Hex chars (0~9 and A~F)\nDefault key is required, other keys are optional.";
var msg_key152_ascii = "Invalid WEP Key. Keys must be 16 ASCII chars.\nDefault key is required, other keys are optional.";
var msg_keypsk =  "Invalid Key.\nKey length is 8~63 ASCII chars.";
var msg_noradiusmac = "Radius-based MAC authentication is not available with the current settings";
var msg_nouam = "UAM is not available with the current settings";
//SNMP
var msg_snmp_ip = "SNMP Manager IP";
var msg_trap_ip = "Trap IP";
//syslog
var msg_syslog_ip = "Syslog Server IP Address"
var msg_syslog_port = "Syslog Server Port Number"

//http redirect
var msg_http_redirect_url = "Redirect URL";

// Wireless Access Control
var msg_wire_list = "No Wireless station selected";
var msg_mac_addr = "Station Address";

// adv wireless
var msg_datimeout = "Disassociated Timeout";
var msg_rts = "RTS/CTS Threshold";
var msg_frag = "Fragmentation";
var msg_beacon = "Beacon Interval";


// upgrade FW
var msg_upgradefw = "Continue?\nAll existing Internet connections will be terminated.";
var msg_nofile = "No filename provided. Please select the correct file.";
var msg_invalidfile = "Invalid filename provided. please enter again:(*.img)";
var finish_msg = "\Firmware Upgrade completed. \Access Point will now restart." +
"\nPlease check the LEDs to see if the Access Point is ready,\nthen re-connect.";


// Radius User database
var msg_nouser = "No user selected. Please select a user in the list";
var msg_dupe_name = "This name already exists. Please use a different name";
var msg_user_name = "User name";
var msg_user_passwd = "User password";
var msg_user_domain = "Domain";
var msg_user_mac = "MAC address";
var msg_delUser = "Delete user: %s ?";
var msg_delallusers = "Delete ALL users ? ";

function addstr(input_msg)
{
	var last_msg = "";
	var str_location;
	var temp_str_1 = "";
	var temp_str_2 = "";
	var str_num = 0;
	temp_str_1 = addstr.arguments[0];
	while(1)
	{
		str_location = temp_str_1.indexOf("%s");
		if(str_location >= 0)
		{
			str_num++;
			temp_str_2 = temp_str_1.substring(0,str_location);
			last_msg += temp_str_2 + addstr.arguments[str_num];
			temp_str_1 = temp_str_1.substring(str_location+2,temp_str_1.length);
			continue;
		}
		if(str_location < 0)
		{
			last_msg += temp_str_1;
			break;
		}
	}
	return last_msg;
}
