/*
** Error Messages send to the end user
**
** Serge Dacic MarketTrend 09/29/2005
*/

ns6 = (document.getElementById)? true:false	//Netscape 6+
ie4 = (document.all)? true:false			//IE 4+
win = (navigator.userAgent.toLowerCase().indexOf("win") != -1)? true:false	//Windows platform

boldTag = ((ns6 || ie4) && win) ? '<b>' : ''
notboldTag = ((ns6 || ie4) && win) ? '</b>' : ''
colorTag = ((ns6 || ie4) && win) ? '<font color="#cc0000">' : ''
notcolorTag = ((ns6 || ie4) && win) ? '</font>' : ''

/* 
** Client error messages
*/
ILLEGAL				= ' is not a valid character. Please don\'t use it.'
USERID_FORMAT		= boldTag+colorTag+'User ID'+notcolorTag+notboldTag+' should have between 6 and 10 characters.'
NEW_PASSWORD_MATCH	= boldTag+colorTag+'New Password'+notcolorTag+notboldTag+' and '+boldTag+colorTag+'New Password Confirmation'+notcolorTag+notboldTag+' do not match.'
PASSWORD_MATCH		= boldTag+colorTag+'Password'+notcolorTag+notboldTag+' and '+boldTag+colorTag+'Password Confirmation'+notcolorTag+notboldTag+' do not match.'
PASSWORD_FORMAT		= boldTag+colorTag+'Password'+notcolorTag+notboldTag+' should have between 6 and 10 characters.'
CUR_PASSWORD_FORMAT	= boldTag+colorTag+'Current Password'+notcolorTag+notboldTag+' should have between 6 and 10 characters.'
NEW_PASSWORD_FORMAT	= boldTag+colorTag+'New Password'+notcolorTag+notboldTag+' should have between 6 and 10 characters.'
EMAIL_FORMAT		= 'Invalid '+boldTag+colorTag+'Primary E-mail'+notcolorTag+notboldTag+'. Make sure your address includes a \'@\' and \'.\' character and does not include \'[\', \']\' or space characters.'
EMAIL_MATCH			= boldTag+colorTag+'Primary E-mail'+notcolorTag+notboldTag+' and '+boldTag+colorTag+'Primary E-mail Confirmation'+notcolorTag+notboldTag+' do not match.'
EMAIL2_VALUE		= boldTag+colorTag+'Primary E-mail'+notcolorTag+notboldTag+' and '+boldTag+colorTag+'Alternate E-mail '+notcolorTag+notboldTag+' must be different.'
EMAIL2_FORMAT		= 'Invalid '+boldTag+colorTag+'Alternate E-mail'+notcolorTag+notboldTag+'. Make sure your address includes a \'@\' and \'.\' character and does not include \'[\', \']\' or space characters.'
EMAIL2_MATCH		= boldTag+colorTag+'Alternate E-mail'+notcolorTag+notboldTag+' and '+boldTag+colorTag+'Alternate E-mail Confirmation'+notcolorTag+notboldTag+' do not match.'
UNKN_EMAIL_FORMAT	= 'Invalid '+boldTag+colorTag+'E-mail'+notcolorTag+notboldTag+'. Make sure your address includes a \'@\' and \'.\' character and does not include \'[\', \']\' or space characters.'
UNKN_EMAIL_MATCH	= boldTag+colorTag+'E-mail'+notcolorTag+notboldTag+' and '+boldTag+colorTag+'E-mail Confirmation'+notcolorTag+notboldTag+' do not match.'
PASSWORD_DIFF		= boldTag+colorTag+'Current Password'+notcolorTag+notboldTag+' and '+boldTag+colorTag+'New Password'+notcolorTag+notboldTag+' should be different.'
FIELD_EMPTY			= 'Please specify '+boldTag+colorTag
MAX_CHAR			= 'Answer to '+boldTag+colorTag+'Question 15'+notcolorTag+notboldTag+' should not exceed 255 characters.'
UNKN_TYPE			= 'Unknown Account type.'
WRONG_TYPE			= 'Current Account type and Requested type don\'t match.'

/* 
** Server error messages
*/
REGISTER_CARD_LEASE_TYPE	= 'MarketTrend only offers monthly or yearly subscriptions. Please indicate your selection again.'
REGISTER_CARD_RESPONSE		= 'Your credit card information was not successfully processed'
REGISTER_CARD_EXCEPTION		= 'Your credit card information cannot be processed at this time. Please try again later.'
REGISTER_CARD_EXISTS		= 'Your User ID must be unique. The one you specified already exists in our database. Please choose another one.'
REGISTER_CARD_SQL_INSERT	= 'Your Registration did not complete successfully. Please try again.'
REGISTER_CARD_SQL_DELETE	= 'User ID deletion was not successfully completed. Please try again.'
SERVER_RESPONSE_GATEWAY		= 'The credit card processing engine is down. Please try again later.'
//SERVER_RESPONSE_AVS		= 'Address verification failed.'
SERVER_RESPONSE_PARAMETER	= 'There was a parameter error.'
SERVER_RESPONSE_DECLINED	= 'The credit card was declined.'
SERVER_RESPONSE_EXPIRED		= 'The credit card has expired.'
SERVER_RESPONSE_CVV2		= 'Credit card verification failed.'
SERVER_RESPONSE_CARDHOLDER	= 'The cardholder could not be found.'
SERVER_RESPONSE_BALANCE		= 'The transaction request exceeds the card balance.'
SERVER_RESPONSE_AMOUNT		= 'There was a transaction amount error.'
SERVER_RESPONSE_CALL		= 'Please call the card issuer.'
SERVER_RESPONSE_PICK		= 'The credit card should be picked up.'
REGISTER_ACCOUNT_PAYMENT	= 'You first need to submit your Personal and Payment Information before you can register.'
REGISTER_ACCOUNT_EXISTS		= REGISTER_CARD_EXISTS
REGISTER_ACCOUNT_SQL_INSERT	= REGISTER_CARD_SQL_INSERT
DEL_SQL_DELETE				= REGISTER_CARD_SQL_DELETE
UPDATE_PROFILE_LEVEL		= 'You need to log in to perform this action.'
UPDATE_PROFILE_PASSWORD		= 'Invalid '+boldTag+colorTag+'Password'+notcolorTag+notboldTag+'.'
UPDATE_PROFILE_SQL_UPDATE	= 'Update of your Profile did not complete successfully. Please try again.'
UPDATE_CARD_LEVEL			= 'You need to log in to perform this action.'
UPDATE_CARD_SQL_UPDATE		= 'Update of your Card Information did not complete successfully. Please try again.'
UPDATE_USER_LEVEL			= 'You need to have administrator rights to perform this action.'
UPDATE_USER_SQL_UPDATE		= 'User update did not complete successfully. Please try again.'
UPDATE_KEY_ERROR			= 'Your information cannot be updated at this time. Please try again later.'
LOGIN_UNKNOWN				= 'Invalid '+boldTag+colorTag+'User ID'+notcolorTag+notboldTag+'.'
LOGIN_INACTIVE				= 'The account corresponding to this '+boldTag+colorTag+'User ID'+notcolorTag+notboldTag+' is inactive.'
LOGIN_FAILED_TRIES			= 'Due to 5 unsuccessful attemps to log in, the account corresponding to this '+boldTag+colorTag+'User ID'+notcolorTag+notboldTag+' is blocked.'
LOGIN_EXPIRED				= 'The account corresponding to this '+boldTag+colorTag+'User ID'+notcolorTag+notboldTag+' is expired.'
LOGIN_PASSWORD				= 'Invalid '+boldTag+colorTag+'Password'+notcolorTag+notboldTag+'.'
GET_PASSWORD_UNKNOWN		= 'Invalid '+boldTag+colorTag+'User ID'+notcolorTag+notboldTag+' or '+boldTag+colorTag+'Primary E-mail'+notcolorTag+notboldTag+'.'
GET_USERID_UNKNOWN			= 'Invalid '+boldTag+colorTag+'Primary E-mail'+notcolorTag+notboldTag+'.'
CHECK_ANSWER_ANSWER			= 'Invalid '+boldTag+colorTag+'Answer'+notcolorTag+notboldTag+'.'
CHECK_ANSWER_SQL_UPDATE		= 'Password retrieval did not complete successfully. Please try again.'
SIGNAL_EMAIL_SQL_SELECT		= 'Signal E-mails were not sent successfully.'
SPECIFIC_EMAIL_SQL_SELECT   = 'E-mail was not sent successfully.'
TICKER_UNKNOWN				= 'Invalid '+boldTag+colorTag+'Ticker'+notcolorTag+notboldTag+' or the requested data are temporarily unavailable.'
BULL_UNKNOWN				= 'Invalid '+boldTag+colorTag+'Bull Fund'+notcolorTag+notboldTag+' or the requested data are temporarily unavailable.'
BEAR_UNKNOWN				= 'Invalid '+boldTag+colorTag+'Bear Fund'+notcolorTag+notboldTag+' or the requested data are temporarily unavailable.'
NO_DATA						= 'Requested Data could not be found.'
TICKER_TOONEW				= 'Requested '+boldTag+colorTag+'Ticker'+notcolorTag+notboldTag+' did not exist the first trading day of the current year.'
BULL_TOONEW					= 'Requested '+boldTag+colorTag+'Bull Fund'+notcolorTag+notboldTag+' did not exist the first trading day of the current year.'
BEAR_TOONEW					= 'Requested '+boldTag+colorTag+'Bear Fund'+notcolorTag+notboldTag+' did not exist the first trading day of the current year.'
TIMEOUT						= 'Sorry. Your session has timed out. Please enter your '+boldTag+colorTag+'User ID'+notcolorTag+notboldTag+' and '+boldTag+colorTag+'Password'+notcolorTag+notboldTag+' below to Log in again.'
ORDERID_UNKNOWN				= 'No Record was found for this orderid.'
NON_ACTIVE					= 'This Record is non active.'
PERIOD_UNKNOWN				= 'The requested period extension is not valid.'
SQL_INSERT_ERROR			= 'The Database transaction failed.'
NO_EMAIL					= 'The given e-mail address was not found (or is not active) in MTA database.'
