var msg = new Array("Quit setup wizard and discard settings?",		// QUIT_WIZARD
				    "The Confirmed password does not match the New password.",	// MATCH_PWD_ERROR
				    "SSID can not be empty.",						// SSID_EMPTY_ERROR
				    "The Wep can not be disabled when the Authentication is in the Shared Key mode.",	// AUTH_TYPE_ERROR
				    "The selected wep key can not be empty.",		// WEP_KEY_EMPTY
				    "The length of Passphrase must be at least 8 characters.",	// PSK_LENGTH_ERROR
				    "The Confirmed Passphrase does not match the Passphrase.",	// PSK_MATCH_ERROR
				    "The IP address and the Gateway address are not in the same domain.",	// NOT_SAME_DOMAIN
				    "The Ending IP address must be greater than the Starting IP address.",	// IP_RANGE_ERROR
				    "Are you sure that you want to delete this MAC address?",			// DEL_MAC_FILTER
				    "This MAC address has already been in the filter list.",			// SAME_MAC_FILTER
				    "The legal characters of MAC address must be 0~9, A~F, or a~f.",	// MAC_ADDRESS_ERROR
				    "Please enter another MAC address.",				// EMPTY_MAC_FILTER
				    "Load Settings from file?",						// LOAD_SETTING
				    "Please select a file to upload.",				// LOAD_FILE_ERROR
				    "Restore To Factory Default Settings?",			// RESTORE_DEFAULT
				    "Please choose a firmware to upgrade.",			// FIRMWARE_UPGRADE_ERROR
				    "The length of Passphrase is over 63 characters." // PSK_OVER_LEN
				   );
					   
var QUIT_WIZARD = 0;
var MATCH_PWD_ERROR = 1;
var SSID_EMPTY_ERROR = 2;
var AUTH_TYPE_ERROR = 3;
var WEP_KEY_EMPTY = 4;
var PSK_LENGTH_ERROR = 5;
var PSK_MATCH_ERROR = 6;
var NOT_SAME_DOMAIN = 7;
var IP_RANGE_ERROR = 8;
var DEL_MAC_FILTER = 9;
var SAME_MAC_FILTER = 10;
var MAC_ADDRESS_ERROR = 11;
var EMPTY_MAC_FILTER = 12;
var LOAD_SETTING = 13;
var LOAD_FILE_ERROR = 14;
var RESTORE_DEFAULT = 15;
var FIRMWARE_UPGRADE_ERROR = 16;
var PSK_OVER_LEN = 17;

/** for check_address() using **/
var radius1_msg = new Array("The Radius Server 1 IP address is an invalid address.",	// INVALID_IP
						    "The Radius Server 1 IP address can not be zero.",	// ZERO_IP
						    "The 1st address of Radius Server 1 IP address must be an integer.",	// FIRST_IP_ERROR
						    "The 2nd address of Radius Server 1 IP address must be an integer.",	// SECOND_IP_ERROR
						    "The 3rd address of Radius Server 1 IP address must be an integer.",	// THIRD_IP_ERROR
						    "The 4th address of Radius Server 1 IP address must be an integer.",	// FOURTH_IP_ERROR
						    "The 1st range of Radius Server 1 IP address must be between 1 to 254.",			// FIRST_RANGE_ERROR
						    "The 2nd range of Radius Server 1 IP address must be between 0 to 254.",			// SECOND_RANGE_ERROR
						    "The 3rd range of Radius Server 1 IP address must be between 0 to 254.",			// THIRD_RANGE_ERROR
						    "The 4th range of Radius Server 1 IP address must be between 1 to 254.",			// FOURTH_RANGE_ERROR
						    "The port of Radius Server 1 is invalid.",	// RADIUS_SERVER_PORT_ERROR
						    "The Shared Secret of Radius Server 1 can not be empty." // RADIUS_SERVER_SECRET_ERROR
						    );						   
var radius2_msg = new Array("The Radius Server 2 IP address is an invalid address.",	// INVALID_IP
						    "The Radius Server 2 IP address can not be zero.",	// ZERO_IP
						    "The 1st address of Radius Server 2 IP address must be an integer.",	// FIRST_IP_ERROR
						    "The 2nd address of Radius Server 2 IP address must be an integer.",	// SECOND_IP_ERROR
						    "The 3rd address of Radius Server 2 IP address must be an integer.",	// THIRD_IP_ERROR
						    "The 4th address of Radius Server 2 IP address must be an integer.",	// FOURTH_IP_ERROR
						    "The 1st range of Radius Server 2 IP address must be between 1 to 254.",			// FIRST_RANGE_ERROR
						    "The 2nd range of Radius Server 2 IP address must be between 0 to 254.",			// SECOND_RANGE_ERROR
						    "The 3rd range of Radius Server 2 IP address must be between 0 to 254.",			// THIRD_RANGE_ERROR
						    "The 4th range of Radius Server 2 IP address must be between 1 to 254.",			// FOURTH_RANGE_ERROR
						    "The port of Radius Server 2 is invalid.",	// RADIUS_SERVER_PORT_ERROR
						    "The Shared Secret of Radius Server 2 can not be empty." // RADIUS_SERVER_SECRET_ERROR
						    );
var ip_addr_msg = new Array("The IP address is an invalid address.",	// INVALID_IP
						    "The IP address can not be zero.",	// ZERO_IP
						    "The 1st address of IP address must be an integer.",	// FIRST_IP_ERROR
						    "The 2nd address of IP address must be an integer.",	// SECOND_IP_ERROR
						    "The 3rd address of IP address must be an integer.",	// THIRD_IP_ERROR
						    "The 4th address of IP address must be an integer.",	// FOURTH_IP_ERROR
						    "The 1st range of IP address must be between 1 to 254.",			// FIRST_RANGE_ERROR
						    "The 2nd range of IP address must be between 0 to 254.",			// SECOND_RANGE_ERROR
						    "The 3rd range of IP address must be between 0 to 254.",			// THIRD_RANGE_ERROR
						    "The 4th range of IP address must be between 1 to 254."			// FOURTH_RANGE_ERROR						    
						    );		
var subnet_mask_msg = new Array("The Subnet Mask is an invalid address.",	// INVALID_IP
						        "The Subnet Mask can not be zero.",	// ZERO_IP
						        "The 1st address of Subnet Mask must be an integer.",	// FIRST_IP_ERROR
						    	"The 2nd address of Subnet Mask must be an integer.",	// SECOND_IP_ERROR
						    	"The 3rd address of Subnet Mask must be an integer.",	// THIRD_IP_ERROR
						    	"The 4th address of Subnet Mask must be an integer.",	// FOURTH_IP_ERROR
						    	"The 1st range of Subnet Mask must be 128, 192, 224, 240, 248, 252, 254, 255.",			// FIRST_RANGE_ERROR
						    	"The 2nd range of Subnet Mask must be 0, 128, 192, 224, 240, 248, 252, 254, 255.",			// SECOND_RANGE_ERROR
						    	"The 3rd range of Subnet Mask must be 0, 128, 192, 224, 240, 248, 252, 254, 255.",			// THIRD_RANGE_ERROR
						    	"The 4th range of Subnet Mask must be 0, 128, 192, 224, 240, 248, 252, 254, 255."			// FOURTH_RANGE_ERROR						    
						    );	
var gateway_msg = new Array("The Gateway address is an invalid address.",	// INVALID_IP
						    "The Gateway address can not be zero.",	// ZERO_IP
						    "The 1st address of Gateway address must be an integer.",	// FIRST_IP_ERROR
						    "The 2nd address of Gateway address must be an integer.",	// SECOND_IP_ERROR
						    "The 3rd address of Gateway address must be an integer.",	// THIRD_IP_ERROR
						    "The 4th address of Gateway address must be an integer.",	// FOURTH_IP_ERROR
						    "The 1st range of Gateway address must be between 1 to 254.",			// FIRST_RANGE_ERROR
						    "The 2nd range of Gateway address must be between 0 to 254.",			// SECOND_RANGE_ERROR
						    "The 3rd range of Gateway address must be between 0 to 254.",			// THIRD_RANGE_ERROR
						    "The 4th range of Gateway address must be between 1 to 254."			// FOURTH_RANGE_ERROR						    
						    );
var dns_server_msg = new Array("The DNS Server is an invalid address.",	// INVALID_IP
						       "The DNS Server can not be zero.",	// ZERO_IP
						       "The 1st address of DNS Server must be an integer.",	// FIRST_IP_ERROR
						       "The 2nd address of DNS Server must be an integer.",	// SECOND_IP_ERROR
						       "The 3rd address of DNS Server must be an integer.",	// THIRD_IP_ERROR
						       "The 4th address of DNS Server must be an integer.",	// FOURTH_IP_ERROR
						       "The 1st range of DNS Server must be between 1 to 254.",			// FIRST_RANGE_ERROR
						       "The 2nd range of DNS Server must be between 0 to 254.",			// SECOND_RANGE_ERROR
						       "The 3rd range of DNS Server must be between 0 to 254.",			// THIRD_RANGE_ERROR
						       "The 4th range of DNS Server must be between 1 to 254."			// FOURTH_RANGE_ERROR						    
						       );
var log_server_msg = new Array("The Syslog Server is an invalid address.",	// INVALID_IP
						       "The Syslog Server can not be zero.",	// ZERO_IP
						       "The 1st address of Syslog Server must be an integer.",	// FIRST_IP_ERROR
						       "The 2nd address of Syslog Server must be an integer.",	// SECOND_IP_ERROR
						       "The 3rd address of Syslog Server must be an integer.",	// THIRD_IP_ERROR
						       "The 4th address of Syslog Server must be an integer.",	// FOURTH_IP_ERROR
						       "The 1st range of Syslog Server must be between 1 to 254.",			// FIRST_RANGE_ERROR
						       "The 2nd range of Syslog Server must be between 0 to 254.",			// SECOND_RANGE_ERROR
						       "The 3rd range of Syslog Server must be between 0 to 254.",			// THIRD_RANGE_ERROR
						       "The 4th range of Syslog Server must be between 1 to 254."			// FOURTH_RANGE_ERROR						    
						       );							       								    	
var start_ip4_msg = new Array("The Starting IP address is invalid.(IP Range: 1~254)",
							  "Please enter another Starting IP address."
							  );
var end_ip4_msg = new Array("The Enging IP address is invalid.(IP Range: 1~254)",
							"Please enter another Enging IP address."
						    );			    					    					    				   

var INVALID_IP = 0;
var ZERO_IP = 1;
var FIRST_IP_ERROR = 2;
var SECOND_IP_ERROR = 3;
var THIRD_IP_ERROR = 4;
var FOURTH_IP_ERROR = 5;
var FIRST_RANGE_ERROR = 6;
var SECOND_RANGE_ERROR = 7;
var THIRD_RANGE_ERROR = 8;
var FOURTH_RANGE_ERROR = 9;

var RADIUS_SERVER_PORT_ERROR = 10;	// for radius server 1
var RADIUS_SERVER_SECRET_ERROR = 11; // for radius server 2
/** the end of for check_address() using **/

/** for check_varible() using **/								  
var beacon_msg = new Array("Please enter another Beacon interval value.",
						   "The value of Beacon interval must be an integer.",
						   "The range of Beacon interval is 1 ~ 1000."
						   );

var rts_msg = new Array("Please enter another RTS Threshold value.",
						"The value of RTS Threshold must be an integer.",
						"The range of RTS Threshold is 256 ~ 2432."
						);
						   
var frag_msg = new Array("Please enter another Fragmentation value.",
						 "The value of Fragmentation must be an integer.",
						 "The range of Fragmentation is 256 ~ 2346.",
						 "The value of Fragmentation is even number only."
						 );
						 
var dtim_msg = new Array("Please enter another DTIM interval value.",
						 "The value of DTIM interval must be an integer.",
						 "The range of DTIM interval is 1 ~ 255."
						 );	

var EMPTY_VARIBLE_ERROR = 0;
var INVALID_VARIBLE_ERROR = 1;
var VARIBLE_RANGE_ERROR = 2;
var EVEN_NUMBER_ERROR = 3;
/** the end of check_varible() using **/

/** for get_key_len_msg() using **/
var key1_len_error = new Array("The length of Key1 must be 5 characters.",
							   "The length of Key1 must be 13 characters.",
							   "The length of Key1 must be 10 characters.",
							   "The length of Key1 must be 26 characters."
							   );
							   
var key2_len_error = new Array("The length of Key2 must be 5 characters.",
							   "The length of Key2 must be 13 characters.",
							   "The length of Key2 must be 10 characters.",
							   "The length of Key2 must be 26 characters."
							   );	
							   
var key3_len_error = new Array("The length of Key3 must be 5 characters.",
							   "The length of Key3 must be 13 characters.",
							   "The length of Key3 must be 10 characters.",
							   "The length of Key3 must be 26 characters."
							   );
							   
var key4_len_error = new Array("The length of Key4 must be 5 characters.",
							   "The length of Key4 must be 13 characters.",
							   "The length of Key4 must be 10 characters.",
							   "The length of Key4 must be 26 characters."
							   );	
							   						  							  						
var illegal_key_error = new Array("Key1 is wrong, the legal characters are 0~9, A~F, or a~f.",
								  "Key2 is wrong, the legal characters are 0~9, A~F, or a~f.",
								  "Key3 is wrong, the legal characters are 0~9, A~F, or a~f.",
								  "Key4 is wrong, the legal characters are 0~9, A~F, or a~f."								 
								  );
/** the end of get_key_len_msg() using **/								 
