//<script>
function getMsg(sMsg)
{
	var re = new RegExp();
	//var arrAccent = new Array ("&#224;", "&#232;", "&#233;", "&#234;", "&#238;"); //fr
	//225 - á, 233 - é, 237 - í, 241 - ñ, 243 - ó, 250 - ú
	var arrAccent = new Array ("&#225;", "&#233;", "&#237;", "&#241;", "&#243;", "&#250;");  //es
	var arrCode = new Array ("%E1", "%E9", "%ED", "%F1", "%F3", "%FA");
	for(var i = 0; i < arrAccent.length; i++)
	{
		re.compile(arrAccent[i], "g");
		sMsg = sMsg.replace(re, arrCode[i] )
	}
	sMsg = unescape(sMsg);
	return sMsg;
}

function getFieldTitle(sTitle)
{
	switch(sTitle)
	{
		case "Implementation Date":	return getMsg("Implementation Date");
		case "Title":				return getMsg("Title");
		case "Number": return getMsg("Number");
		case "Date":  return getMsg("Date");
		case "Opening Text":		return getMsg("Opening Text");
		default:				return sTitle;
	}
}
/////////////////////////////////////////////////////////////////
// Used in file [clntutil_query.js]
var MSG_LOGIN_FIRST = getMsg("Please login first");
var MSG_NO_RESULTS = getMsg("Query produced no results.");
var MSG_INVALID_PROX = getMsg("Proximity symbols ^,/ are not allowed in this search term: ");
var MSG_INVALID_WLDCRDS = getMsg("Wildcard symbols *,!,? are not allowed in this search term: ");
var MSG_INVALID_NUMERIC = getMsg("This search term is not valid for numeric field: ");
var MSG_INVALID_SYMBOLS = getMsg("The symbols <,> are not allowed in this search term: ");
var MSG_INVALID_NONWILD = getMsg("Search term must contain at least 2 non-wildcard characters: ");
var MSG_SORTED_DESC = getMsg("Sorted in descending order");
var MSG_SORTED_ASC = getMsg("Sorted in ascending order");
//var MSG_NO_RESULTS = "No results.";

/////////////////////////////////////////////////////////////////
// Used in file [clntutil_Safeview.js]
var MSG_PROTECT_PRINT = getMsg("This document is protected with NetIS DRM tools.\n	        Printing will not be performed through the default print window that will display after this message.\nTo print this document, cancel the print dialog and use the right-click menu instead.");
var MSG_SAFEVIEW_NOT_INSTALL = getMsg("Safeview Navigator is not installed");
var MSG_FIRST_DOC_REACHED = getMsg("First document reached");
var MSG_LAST_DOC_REACHED = getMsg("Last document reached");
var MSG_FIRST_HIGHLIGHT_REACHED = getMsg("First highlight reached");
var MSG_LAST_HIGHLIGHT_REACHED = getMsg("Last highlight reached");
var MSG_INVALID_LINK = getMsg("Error: invalid link, navigation aborted");
var MSG_PREVIEW_ENDED = getMsg("Preview time has expired");
var MSG_VIEW_ENDED = getMsg("Viewing time has expired");
var MSG_SIZE_LIMITED = getMsg("Your current permissions allow you to view documents up to a size of $balance.\n\nClick 'OK' to browse a list of products for purchase that include this title.\nClick 'Cancel' to return to result list");
var MSG_DOCUMENT_PROTECTED = getMsg("This document is protected with NetIS DRM tools.\n\nUse right-click menu to print, copy, or save it, subject to your access rights");
var MSG_DISCONECT_DEBUGGER = getMsg("This document is protected with NetIS DRM tools.\n\nPlease disconnect the debugger before viewing protected content.");
var MSG_HAS_NO_RIGHT_NUM = getMsg("Sorry, your profile does not include access right number ");
var MSG_HAS_NO_RIGHT_TO_1 = getMsg("Sorry, your profile does not include the access right to ");
var MSG_HAS_NO_RIGHT_TO_2 = getMsg(" this document");
var MSG_RIGHT_VIEW = getMsg("View");
var MSG_RIGHT_COPY = getMsg("Copy");
var MSG_RIGHT_PRINT = getMsg("Print");
var MSG_RIGHT_SAVE = getMsg("Save");
var MSG_RIGHT_PREVIEW = getMsg("Preview");
var MSG_CAPTURER_DETECTED = getMsg("Please close all active screen capture tools in order to view content.");
var MSG_DISPLAY_FAILED = getMsg(" The document you requested is protected by NetIS DRM technology. \n\nYour current permissions allow you access to a limited display of this\ndocument on IE versions 5.5 and above.\n\nIf you would like to view the document in its utmost quality on\nall browsers, please go to our purchase page.");
var MSG_TICKET_REVOKED = getMsg("Permission has expired. Would you like to reload the document?");

/////////////////////////////////////////////////////////////////
// Used in file [clntutil_dictionary.js]
var MSG_ENTER_TERMS = getMsg("Please enter search term");
var MSG_ERROR_XML = getMsg("Cannot create XML request");
var MSG_INVALID_CHAR = getMsg("Invalid characters in dictionary entry:");
var MSG_EMPTY_DICT = getMsg("Empty dictionary");
var MSG_BOTTOM_REACHED = getMsg("Bottom of list reached");
var MSG_TOP_REACHED = getMsg("Top of list reached");

/////////////////////////////////////////////////////////////////
// Used in customer login/registration
var MSG_PLEASE_INSERT = getMsg("Please insert");
var MSG_INVALID_LOGIN = getMsg("Invalid login\nUse English characters and/or numerals without blanks");
var MSG_INVALID_EMAIL = getMsg("Invalid e-mail address");
var MSG_PASSWORD_MISMATCH = getMsg("Your password entries do not match. Please retype them.");

var MSG_PASSWORD_MIN = "Password must be at least $min characters long.";
var MSG_PASSWORD_MAX = "Password may be at most $max characters long.";
var MSG_PASSWORD_RANGE = "Password length must be between $min and $max characters.";
var MSG_PASSWORD_DIGITS = "Password must contain at least one digit.";
var MSG_PASSWORD_INVALID_BLANKS = "Password must not contain blanks";
var MSG_USERNAME_INVALID_BLANKS = "User name must not contain blanks";
var MSG_USERNAME_INVALID_CHARACTERS = "User name must not contain the characters # ( ) :";

var MSG_PASSWORD_TOOLONG = getMsg("Password must be 1 to 30 characters long.");
var MSG_PASSWORD_INVALID_BLANKS = getMsg("Password must not contain blanks");
var MSG_USERNAME_INVALID_BLANKS = getMsg("User name must not contain blanks");
var MSG_USERNAME_INVALID_CHARACTERS = getMsg("User name must not the characters # ( ) :");
var MSG_PASSWORDEMAILED = getMsg("Your password has been emailed. Please check your mailbox");
var MSG_DETAILSUPDATED = getMsg("Your details were updated successfully");

/////////////////////////////////////////////////////////////////
// Customer object error messages
var MSG_CUSTOMER_ALREADY_EXISTS = getMsg("Customer already exists");
var MSG_CUSTOMER_DOES_NOT_EXIST = getMsg("Customer does not exist");
var MSG_CUSTOMER_INVALID_PASSWORD = getMsg("Invalid password");
var MSG_CUSTOMER_LOGIN_FAILED = getMsg("Login failed");

/////////////////////////////////////////////////////////////////
// Client component installation messages
var MSG_UPGRADE_SAFEVIEW = getMsg(" In order to proceed, the latest version of SafeView plugin must be installed.\nPress OK to install the plugin, or Cancel to log on as a different user.");

/////////////////////////////////////////////////////////////////
// Used in clntutil_nosafeview.js
var MSG_TOOLBAR_PDF = getMsg("Please use the Acrobat toolbar for this function.");
var MSG_TOOLBAR_NOTAVAIL = getMsg("This function is only available for HTML documents.");
var MSG_BEFORE_SAVE = getMsg("The document will open in a new window.\n" +
	"Please use your browser's menu to save it.");

var MSG_ISOBLIGATORY = getMsg(" is obligatory");
var MSG_FIRSTNAME = getMsg("first name");
var MSG_LASTNAME = getMsg("last name");
var MSG_STREET = getMsg("Street");
var MSG_CITY = getMsg("city");
var MSG_ZIP = getMsg("Zip code");
var MSG_PHONE = getMsg("phone");
var MSG_COUNTRY = getMsg("country");
var MSG_PASSWORD = getMsg("password");
var MSG_EMAIL = getMsg("email");
