function FLMessage(lang) {
	if (typeof lang != "undefined") {
		this.lang = lang;
	} else {
		this.lang = 'RU';
	}

	this.messages = {
		BadFromEmail_RU: 'E-mail адрес в поле "От кого" введен неверно.',
		BadFromEmail_EN: 'E-mail address in "From" field is incorrect.',

		PasswordsDoesNotMatch_RU: 'Вы ввели разные пароли. Введите один и тот же пароль в оба поля ввода.',
		PasswordsDoesNotMatch_EN: 'You have typed different passwords. Please type the same password in both fields.',

		BadToEmail_RU: 'E-mail адрес в поле "Кому" введен неверно.',
		BadToEmail_EN: 'E-mail address in "To" field is incorrect.',

		BadCaptcha_RU: 'Вы не ввели число на картинке, либо указали неверное значение.',
		BadCaptcha_EN: 'Please retype the security number: you entered a wrong number. You filled the wrong security number on the picture or entered wrong number.',

		NoFreeSpace_RU: 'Извините, но размер свободного пространства вашей учетной записи исчерпан. Удалите один или несколько файлов и попробуйте повторить загрузку.',
		NoFreeSpace_EN: 'Sorry, there is no free space in your account. Please delete one or more files and try to upload again.',

		SplashSendBtn_RU: ' Отправить ',
		SplashSendBtn_EN: ' Send ',

		SplashGetBtn_RU: ' Получить ссылку ',
		SplashGetBtn_EN: ' Get the link ',

		UnitsByte_RU: 'байт',
		UnitsByte_EN: 'byte',

		UnitsKB_RU: 'КБ',
		UnitsKB_EN: 'KB',

		UnitsMB_RU: 'МБ',
		UnitsMB_EN: 'MB',

		UnitsGB_RU: 'ГБ',
		UnitsGB_EN: 'GB',
		
		UnitsKBpS_RU: 'КБ/с',
		UnitsKBpS_EN: 'KB/s',
		
		UnitsHourF_RU: 'час.',
		UnitsHourF_EN: 'hrs.',

		UnitsHourS_RU: 'ч.',
		UnitsHourS_EN: 'h.',

		UnitsMinF_RU: 'мин.',
		UnitsMinF_EN: 'min.',

		UnitsMinS_RU: 'м.',
		UnitsMinS_EN: 'm.',

		UnitsSecF_RU: 'сек.',
		UnitsSecF_EN: 'sec.',

		UnitsSecS_RU: 'с.',
		UnitsSecS_EN: 's.',
		
		UnitsTimeIsOut_RU: '1 секунда',
		UnitsTimeIsOut_EN: '1 second',

		ConfEmptyTrash_RU: 'Вы действительно хотите удалить все файлы из папки \'Удаленные\' без возможности восстановления?',
		ConfEmptyTrash_EN: 'Do you really want to delete all files from \'Deleted\' folder? The files you are going to delete won\'t be restored.',

		NoFilesChecked_RU: 'Вы ещё не выбрали файлы для отправки!\nДля выбора файлов пометьте их галочками.',
		NoFilesChecked_EN: 'Files for sending are not selected!\Please check the files to select them for sending.',

		ConfHardDelete_RU: 'Вы действительно хотите удалить файл без возможности восстановления ?\n\n',
		ConfHardDelete_EN: 'Do you really want to remove this file? After you delete it you will not be able to restore it.\n\n',

		NoFilesToDelete_RU: 'Вы ещё не выбрали файлы для удаления!\nДля выбора файлов пометьте их галочками.',
		NoFilesToDelete_EN: ' Files for sending are not selected!\Please check the files to select them for sending.',

		NoFilesToRecover_RU: 'Вы ещё не выбрали файлы для восстановления!\nДля выбора файлов пометьте их галочками.',
		NoFilesToRecover_EN: ' Files for sending are not selected!\Please check the files to select them for sending.',

		TooLongMsgBody_RU: 'Сообщение не должно быть длиннее 500 символов.',
		TooLongMsgBody_EN: 'This message cannot be longer than 500 symbols.',

		CheckInet_RU: 'Пожалуйста, проверьте ваше подключение к Интернету и повторите попытку.',
		CheckInet_EN: 'Please check your internet connection and try again.',

		CheckInetAndRetry_RU: 'Пожалуйста, проверьте ваше подключение к Интернету и повторите попытку. Попробовать загрузить файл еще раз?',
		CheckInetAndRetry_EN: 'Please check your internet connection and try to upload the file again.',

		RequestFailed_RU: 'Извините, не удается выполнить действие.',
		RequestFailed_EN: 'Sorry, this action cannot be performed.',

		ConfTryItAgain_RU: 'Повторить попытку сейчас?',
		ConfTryItAgain_EN: 'Try it again now?',

		ConfTryToUpload_RU: 'Попробовать загрузить файл еще раз?',
		ConfTryToUpload_EN: 'Try to upload the file again?',

		DefUploadFailed_RU: 'Не удается загрузить файл на сервер. Пожалуйста, проверьте ваше подключение к Интернету. Попробовать загрузить файл еще раз?',
		DefUploadFailed_EN: 'The file cannot be uploaded on the server. Please check your internet connection. Try to upload the file again?',

		TtlDefUploadFailed_RU: 'Не удается загрузить файл на сервер. Пожалуйста, проверьте ваше подключение к Интернету.',
		TtlDefUploadFailed_EN: 'The file cannot be uploaded on the server. Please check your internet connection.',

		FL_JS_msg023_RU: 'Не удается загрузить файл на сервер. Пожалуйста, проверьте ваше подключение к Интернету и повторите попытку.',
		FL_JS_msg023_EN: 'The file was not uploaded on the server. Please check your internet connection and try again.',


		DeleteFailed_RU: 'Не удается удалить файл. Пожалуйста, проверьте ваше подключение к Интернету и повторите попытку.',
		DeleteFailed_EN: 'The file was not deleted. Please check your internet connection and try again.',

		FavDelFailed_RU: 'Не удается исключить файл из папки Избранное. Пожалуйста, проверьте ваше подключение к Интернету и повторите попытку.',
		FavDelFailed_EN: 'The file was not removed from "Selected" folder. Please check your internet connection and try again.',

		FavAddFailed_RU: 'Не удается добавить файл в папку Избранное. Пожалуйста, проверьте ваше подключение к Интернету и повторите попытку.',
		FavAddFailed_EN: ' The file was not added to "Selected" folder. Please check your internet connection and try again.',

		RecoveryFailed_RU: 'Не удается восстановить файл из папки Удаленные. Пожалуйста, проверьте ваше подключение к Интернету и повторите попытку.',
		RecoveryFailed_EN: 'The file was not restored from \'Deleted\' folder. Please check your internet connection and try again.',

		PasswordFailed_RU: 'Пароль с файлов снять не удалось. Пожалуйста, проверьте ваше подключение к Интернету и повторите попытку.',
		PasswordFailed_EN: 'The password protection was not cleared from the files. Please check your internet connection and try again.',

		RenameFailed_RU: 'Не удается переименовать файл. Пожалуйста, проверьте ваше подключение к Интернету и повторите попытку.',
		RenameFailed_EN: 'The file was not renamed. Please check your internet connection and try again.',

		FL_JS_msg030_RU: 'Возможно, у вас недостаточно прав на выбранный файл, либо файл не существует.',
		FL_JS_msg030_EN: 'Either you are not allowed to access this file or the file does not exist.',

		PasswordIsWrong_RU: 'Введенный пароль не подходит. Помните, заглавные и прописные буквы различаются. В латинском и кириллическом алфавитах есть буквы сходные по начертанию.\nПожалуйста, проверьте пароль и попробуйте ввести его еще раз.',
		PasswordIsWrong_EN: 'The password is incorrect. Please note that the password is case sensitive. Please check the password and try again.',

		PlzEnterCorrPassword_RU: 'Пожалуйста, введите правильный пароль.',
		PlzEnterCorrPassword_EN: 'Please enter the correct password.',

		UCanDownloadIn_RU: 'Вы сможете скачать файлы через ##0;secVP## ',
		UCanDownloadIn_EN: 'You will be able to download files in ##0;secVP## ',

		CantOpenFlash_RU: 'Не удается открыть диалог выбора файлов.\nПохоже, у вас установлена неподходящая версия надстройки Adobe Flash. Попробуйте обновить её и выполнить действие еще раз.',
		CantOpenFlash_EN: 'File dialog was not opened. Either you have an older version of Adobe Flash. Try to download a newer version and perform the action again.',

		FilesIsUploading_RU: 'Есть файлы в процессе загрузки. Вы уверены, что хотите оборвать загрузку и покинуть страницу?',
		FilesIsUploading_EN: 'Files upload is in process. Are you sure that you want to terminate upload and leave this page?',

		TooBigFileDetailed1_RU: 'Извините, но файл "##0##" не может быть загружен. Размер файла ##1;fsize## превышает максимально допустимый размер файла для загрузки',
		TooBigFileDetailed1_EN: 'Sorry, but file "##0##" cannot be uploaded. File size ##1;fsize## exceeds the maximum size of the file allowed for upload',

				TooBigFileDetailed1a_RU: 'Извините, но файл "##0##" не может быть загружен, так как его размер превышает ##1;fsize##',
				TooBigFileDetailed1a_EN: 'Sorry, but file "##0##" cannot be uploaded, it\'s size exceeds ##1;fsize##',

		TooBigFileDetailed2R_RU: '.\nПопробуйте разбить файл на части, используя, например, архиватор и загрузить файл частями.',
		TooBigFileDetailed2R_EN: '.\nTry to split the file into several parts by using an archiver then upload the different parts.',

		TooBigFileDetailed2A_RU: ' анонимным пользователем.\nЧтобы увеличить максимальный размер загружаемого файла вам необходимо пройти авторизацию либо зарегистрироваться.',
		TooBigFileDetailed2A_EN: ' by anonymous user.\nTo increase the maximum file size you need to log in or to register.',

		NoSpaceToUpload_RU: 'Извините, но файл "##0##" не может быть загружен. Вам доступно ##1;fsize##, размер файла ##2;fsize##. Удалите один или несколько файлов и попробуйте повторить загрузку.',
		NoSpaceToUpload_EN: 'Sorry, file "##0##" cannot be uploaded. Available space in your account is ##1;fsize##, and file size is ##2;fsize##. Free some space and try to upload the file again.',

		NullSizeFile_RU: 'Файл "##0##" имеет нулевой размер и не может быть загружен. Если вы уверены, что файл имеет ненулевой размер, проверьте, достаточно ли у вас прав на чтение файла и повторите попытку загрузки.',
		NullSizeFile_EN: 'File "##0##" is 0 byte size and cannot be uploaded. If you are sure, that the file contains some data, please check if you have are allowed to access the file then try to upload it again.',

		TtlFileUploaded_RU: 'Файл загружен, ##0;fsize##',
		TtlFileUploaded_EN: 'Upload is completed, ##0;fsize##',

   		TtlSttsWaiting_RU: 'Файл в ожидании загрузки...',
		TtlSttsWaiting_EN: 'File is queued  for upload',

		TtlIcDeleteFile_RU: 'Удалить файл',
		TtlIcDeleteFile_EN: 'Delete the file',

		TtlSttsDone_RU: 'Готово',
		TtlSttsDone_EN: 'Done',

		TtlIcCancelUpload_RU: 'Отменить загрузку',
		TtlIcCancelUpload_EN: 'Cancel upload',

		TtlIcRetryUpload_RU: 'Перезапустить загрузку',
		TtlIcRetryUpload_EN: 'Restart upload',

		TtlAvgSpeed_RU: ', средняя скорость ##0## KБ/c',
		TtlAvgSpeed_EN: ', average upload speed ##0## KБ/c',

		TtlUploadedBytes_RU: 'Загружено ##0;byte##',
		TtlUploadedBytes_EN: 'Uploaded ##0;byte##',

		TtlUploadedPcnts_RU: 'Загружено ##0## %',
		TtlUploadedPcnts_EN: 'Uploaded ##0## %',

		LblSttsFailed_RU: 'Ошибка',
		LblSttsFailed_EN: 'Error',

		LblSttsStopped_RU: 'Остановлено',
		LblSttsStopped_EN: 'Stopped',

		LblSttsWaiting_RU: 'В ожидании',
		LblSttsWaiting_EN: 'Waiting',

		LblSttsUploading_RU: 'Загружается',
		LblSttsUploading_EN: 'Uploading',

		LblSttsCanceled_RU: 'Отменено',
		LblSttsCanceled_EN: 'Canceled',

		TtlErrorDetails_RU: 'Подробнее об ошибке...',
		TtlErrorDetails_EN: 'Error details...',

		TtlFileUploaded1_RU: 'Файл загружен, ##0;fsize##',
		TtlFileUploaded1_EN: 'Upload is completed, ##0;fsize##',

		TtlFileIsUploading_RU: 'Файл загружается...',
		TtlFileIsUploading_EN: 'File is uploading...',

		TtlFileIsDeleting_RU: 'Файл удаляется...',
		TtlFileIsDeleting_EN: 'File is being deleted...',

		ErrNoFreeSpaceA_RU: 'Файл не удалось загрузить. На момент загрузки файла размер сводобного пространства для загрузки был слишком мал. Попробуйте освободить место, удалив ненужные файлы из отправки, и повторите попытку.',
		ErrNoFreeSpaceA_EN: 'File upload failed, there is not enough space in your account. Please remove unnecessary files to free some space then try to upload the file again.',

		ErrNoFreeSpaceR_RU: 'Файл не удалось загрузить. На момент загрузки размер свободного пространства вашей учетной записи был слишком мал. Попробуйте освободить место, удалив ненужные файлы из папки "Загруженные", и повторите попытку.',
		ErrNoFreeSpaceR_EN: ' File upload failed, there is not enough space in your account. Please delete unnecessary files from \'Uploaded\' folder and try to upload the file again.',

		ErrUploadFailed_RU: 'Файл не удалось загрузить. Во время загрузки файла произошла ошибка. Пожалуйста, подождите несколько минут и повторите попытку.',
		ErrUploadFailed_EN: 'File upload failed. There was an error during the upload. Please wait a few minutes then try to upload the file again.',

		ErrTooManySendFiles_RU: 'Файл не загружен. На момент загрузки файла в отправке было ##0;files##, это максимальное количество файлов, которое вы можете отправить за один раз. Попробуйте удалить ненужные файлы из отправки и повторите попытку.',
		ErrTooManySendFiles_EN: 'File is not uploaded. The file contained ##0;files##, the number of files exceeds the maximum number of files allowed for upload. Please remove unnecessary files from the message then try to upload the file again.',

		ErrTooBigFile_RU: 'Файл не удалось загрузить. Размер файла превышает максимальный размер файла для загрузки ##0;fsize##.',
		ErrTooBigFile_EN: 'File upload failed. Size of the file exceeds the maximum size of the file allowed for upload (##0;fsize##).',

		ErrCantReadFile_RU: 'Файл не удалось загрузить. Возможно, у вас недостаточно прав на выбранный файл, либо файл имеет нулевой размер.',
		ErrCantReadFile_EN: 'File upload failed. Either you are not allowed to access the file, or it does not contain any data.',

		TooManyFilesToSend_RU: 'Вы можете отправлять за раз не более ##0;files##. Чтобы добавить новые файлы в отправку, удалите один или несколько загруженных файлов и повторить попытку.',
		TooManyFilesToSend_EN: 'You can send not more than ##0;files## at once. To add new files into the message please remove unnecessary files from the message first then try to add a file again.',
		
		TooManyFilesToUpload_RU: 'Вы можете загружать не более ##0;files##. Будут загружены первые из выбранных.',
		TooManyFilesToUpload_EN: 'You can upload not more than ##0;files## at once. Only the first ones will be uploaded.',

		TooManyFilesToSendPlz1_RU: 'Вы можете отправить не более ##0;files## за раз.\nПожалуйста, снимите галочку ',
		TooManyFilesToSendPlz1_EN: 'You can send not more than ##0;files## at once. \nPlease uncheck ',
		TooManyFilesToSendPlz2s_RU: 'отметку с любого файла',
		TooManyFilesToSendPlz2s_EN: 'any file',
		TooManyFilesToSendPlz2m_RU: 'отметку с любых ##0## файлов',
		TooManyFilesToSendPlz2m_EN: '##0## any files',
		TooManyFilesToSendPlz3_RU: ' и повторите попытку.',
		TooManyFilesToSendPlz3_EN: ' and try again.',

		OneUploadIsActive_RU: 'Один из файлов в данный момент ещё загружается.',
		OneUploadIsActive_EN: 'One file is still uploading.',

		SomeUploadsAreActive_RU: 'Несколько файлов в данный момент ещё загружаются.',
		SomeUploadsAreActive_EN: 'Some files are still uploading.',

		WantToGetLinkAtLast_RU: ' Вы хотите автоматически получить ссылку на файлы после окончания загрузки последнего?',
		WantToGetLinkAtLast_EN: ' Do you want to get link after all files are uploaded?',
		
		WantToInsertLinkAtLast_RU: ' Вы хотите автоматически вставить ссылку на файлы в сообщение после окончания загрузки последнего?',
		WantToInsertLinkAtLast_EN: ' Do you want to insert the link into the message after all files are uploaded?',		

		WantToSendFilesAtLast_RU: ' Вы хотите автоматически отправить файлы после окончания загрузки последнего?',
		WantToSendFilesAtLast_EN: ' Do you want to send the files after all files are uploaded?',

		DelayedPostingIsOn_RU: 'Отложенная отправка включена',
		DelayedPostingIsOn_EN: 'Delayed posting is active',

		DelayedPostingNow_RU: 'Выполняется автоматическая отложенная отправка...',
		DelayedPostingNow_EN: 'Processing delayed posting...',

		WantToGetLinkNow_RU: ' Вы хотите получить ссылку на уже загруженные файлы, не дожидаясь загрузки остальных?',
		WantToGetLinkNow_EN: ' Do you want to terminate remaining uploads, and get link to uploaded files now?',
		
		WantToInsertLinkNow_RU: ' Вы хотите вставить ссылку в сообщение на уже загруженные файлы, не дожидаясь загрузки остальных?',
		WantToInsertLinkNow_EN: ' Do you want to terminate remaining uploads, and insert link to uploaded files into the message now?',		

		WantToSendFilesNow_RU: ' Вы хотите отправить уже загруженные файлы, не дожидаясь загрузки остальных?',
		WantToSendFilesNow_EN: ' Do you want to terminate remaining uploads and send uploaded files now?',

		TtlUploadedFilesTake_RU: 'Загруженные файлы в оправке занимают ##0##',
		TtlUploadedFilesTake_EN: 'Size of uploaded files in the message is ##0##',

		TtlFree_RU: 'Свободно ##0##',
		TtlFree_EN: '##0## free',

		TtlAfterUploadWillBe_RU: ', по окончанию загрузки ожидается ##0##',
		TtlAfterUploadWillBe_EN: ', expecting ##0## free after the files are uploaded',

		TtpNoFlashPlayer_RU: 'Вы можете воспользоваться преимуществами флэш-загрузки, установив свежую версию флэш-плеера <a target="_blank" href="http://www.adobe.com/go/getflashplayer">здесь.</a><br />Если вы уверены, что у Вас установлена 9-ая или более поздняя версия плеера, нажмите <a href="##0##">сюда</a>',
		TtpNoFlashPlayer_EN: 'You can try our improved flash uploader (select multiple files at once, upload progress). To be able to use it please install the latest Adobe Flash plugin <a target="_blank" href="http://www.adobe.com/go/getflashplayer">here.</a><br />If you already have 9.x or newer version of this plugin, click <a href="##0##">here</a>.',

		SMSContextContainer_RU: '<h3 class="mb10">##0##</h3><table cellspacing="0" class="w100"><tr><td><b>Отправьте код</b></td><td class="taR cBlue"><b>##1##+##2##</b></td></tr><tr><td colspan="2" class="cOrange vaT"><span class="fs90">Стоимость услуги</span> <b>##3##</b> <span class="fs90">у.е.</span></td></tr><tr><td colspan="2" class="pt10">##4##<br><a target="_balnk" id="smscontextlink" href="##5##">Условия предоставления услуги</a></td></tr></table>',
		SMSContextContainer_EN: '<h3 class="mb10">##0##</h3><table cellspacing="0" class="w100"><tr><td><b>Send Code</b></td><td class="taR cBlue"><b>##1##+##2##</b></td></tr><tr><td colspan="2" class="cOrange vaT"><span class="fs90">The SMS price is</span> <b>##3##</b> <span class="fs90">u.e.</span></td></tr><tr><td colspan="2" class="pt10">##4##<br><a target="_balnk" id="smscontextlink" href="##5##">Terms of service</a></td></tr></table>',

		SMSContextDisabled_RU: 'Извините, сервис временно недоступен.',
		SMSContextDisabled_EN: 'The service is temporary unavailable. Sorry for the inconvenience.',

        SMSMsg11_RU: "Чтобы сохранить файл на 1 ГОД",
        SMSMsg11_EN: "To keep the file safe for 1 year",

        SMSMsg12_RU: "Чтобы восстановить файл из Удаленных",
		SMSMsg12_EN: "To restore file from Deleted",

        SMSMsg1_RU: "Чтобы стать VIP пользователем",
		SMSMsg1_EN: "To became VIP user",

        SMSMsg2_RU: "Чтобы продлить VIP статус",
		SMSMsg2_EN: "To prolong your VIP status",

        SMSGeoId1_RU: "Россия",
		SMSGeoId1_EN: "Russia",

        SMSGeoId2_RU: "Украина",
		SMSGeoId2_EN: "Ukrain",

        SMSGeoId3_RU: "Казахстан",
		SMSGeoId3_EN: "Kazakhstan",
		
	    SMSGeoId4_RU: "Азербайджан",
		SMSGeoId4_EN: "Azerbaijan",

        SMSGeoId5_RU: "Армения",
		SMSGeoId5_EN: "Armenia",

		SMSGeoId6_RU: "Грузия",
		SMSGeoId6_EN: "Georgia",
		
		SMSGeoId7_RU: "Германия",
		SMSGeoId7_EN: "Germany",

        SMSGeoId8_RU: "Израиль",
		SMSGeoId8_EN: "Israel",

        SMSGeoId9_RU: "Латвия",
		SMSGeoId9_EN: "Latvia",

        SMSGeoId10_RU: "Литва",
		SMSGeoId10_EN: "Lithuania",

        SMSGeoId11_RU: "Таджикистан",
		SMSGeoId11_EN: "Tadjikistan",

        SMSGeoId12_RU: "Эстония",
		SMSGeoId12_EN: "Estonia",
		
		SMSGeoId13_RU: "Узбекистан",
		SMSGeoId13_EN: "Uzbekistan",

		SMSGeoId14_RU: "Беларусь",
		SMSGeoId14_EN: "Belarus",

		TriggerGeoListLbl_RU: "Показать все страны",
		TriggerGeoListLbl_EN: "Show all countries",

		SMSGeoLineRub_RU: "##0## – <span class='cBlue'>##1##</span> (##2## руб. без НДС)",
		SMSGeoLineRub_EN: "##0## – <span class='cBlue'>##1##</span> (##2## rub. w/o VAT)",

		SMSGeoLineYE_RU: '<tr><td>##0##</td><td class="cLightGrey taR"><span class="fs90">на номер</span> <span class="cBlue"><b>##1##</b></span></td></tr>',
		SMSGeoLineYE_EN: '<tr><td>##0##</td><td class="cLightGrey taR"><span class="fs90">to number</span> <span class="cBlue"><b>##1##</b></span></td></tr>',

        BrowseText_RU: "Загрузить файлы",
		BrowseText_EN: "Upload files",

		FL_notSuperFileTitle_RU: 'Сделать файл Суперфайлом',
		FL_notSuperFileTitle_EN: 'Make this file Superfile',

		TtlClose_RU: 'Закрыть',
		TtlClose_EN: 'Close',

        listStubIE: ''
	}
	
	//common formatter functions for mapping
	this.GetSeconds_EN = function (val) { return val += " " + GetUnitTextEng(val, ['second', 'seconds']); }
	this.GetSecondsIP_RU = function (val) { return val += " " + TimeToStringImP (val, ['секунда', 'секунды', 'секунд']); }
	this.GetSecondsVP_RU = function (val) { return val += " " + TimeToStringViP (val, ['секунду', 'секунды', 'секунд']); }
	this.GetFileSize = function (val) {	return val = formatFsize(val); }

	this.formatters = {
		fsize_RU: this.GetFileSize,
		fsize_EN: this.GetFileSize,

		sec_RU: this.GetSecondsIP_RU,
		sec_EN: this.GetSeconds_EN,
		secVP_RU: this.GetSecondsVP_RU,
		secVP_EN: this.GetSeconds_EN,
		secIP_RU: this.GetSecondsIP_RU,
		secIP_EN: this.GetSeconds_EN,

		min_RU: function (val) { return val += " " + TimeToStringImP (val, ['минута', 'минуты', 'минут']); },
		min_EN: function (val) { return val += " " + GetUnitTextEng(val, ['minute', 'minutes']); },

		files_RU: function (val) { return val += " " + TimeToStringViP (val, ['файл', 'файла', 'файлов']); },
		files_EN: function (val) { return val += " " + GetUnitTextEng(val, ['file', 'files']); },

		byte_RU: function (val) { return val += " " + TimeToStringViP (val, ['байт', 'байта', 'байт']); },
		byte_EN: function (val) { return val += " " + GetUnitTextEng(val, ['bute', 'bytes']); },

		listStubIE: ''
	}


	this.expandString = function () {
		var num = arguments.length;
		var wording = arguments[0];

		for (var i = 1; i < num; i++) {
			var pattern = "##" + (i-1) + "(;\\w+)?##";
			var re = new RegExp(pattern, "g");
			var m = wording.match(re);
			if (! (m === null)) {
				var params = m[0].match('[a-zA-Z]+');
				if ( !(params === null)) {
					arguments[i] = this.formatters[params[0] + "_" + this.lang].apply(this, [arguments[i]]);
				}
				wording = wording.replace(re, arguments[i]);
			}
		}
		return wording + '';
	}
	
	this.getMessage = function (messageId) {
        return this.messages[messageId + '_' + this.lang];
	}
}

var gFLMessage = new FLMessage(window.gLanguageCode);

function t(text) {
	var newTemplate = gFLMessage.getMessage(text)
	if (newTemplate == undefined) {jswarn('WordingNotFound!: ' + text); return ""; }
	return newTemplate;
}

function ts() {
	var txt = arguments[0];
	arguments[0] = t(arguments[0]);
	return gFLMessage.expandString.apply(gFLMessage, arguments);
}

function te() {
	return gFLMessage.expandString.apply(gFLMessage, arguments);
}

var gjsLangIsReady = 1;

try {
	gJsReady({'name': 'lang'});
} catch (e) {};
