var localization = {
	global:{
		serviceName: "webmail",
		domain: "webmail.forpsi.com"
	},
	bo:{
		missing_login: "Atención! No se ha insertado la dirección e-mail.",
		missing_password: "Atención! No se ha insertado el Password.",
		requesting_data: "Autenticación en curso",
		welcome: "Bienvenido en",
		features_desc: "Gracias al nuevo Webmail de ${serviceName} desde hoy podrá:",
		feature_1: "Comprobar su cuenta de correo electronico por cualquier postación en internet;",
		feature_2: "Gestionar y organizar todos los mensajes;",
		feature_3: "Activar y configurar el filtro AntiSpam;",
		feature_4: "Añadir y configurar las reglas de correo;",
		feature_5: "Gestionar las rúbricas y organizar sus contactos;",
		feature_6: "Organizar sus citas gracias al nuevo Calendario puesto a su disposición;",
		feature_7: "Utilizar AdminMail para gestionar las cuentas del dominio en la cuenta postmaster.",
		email: "Dirección E-mail:",
		password: "Password:",
		button: "ACCEDER",
		language: "Idioma:",
		theme: "Estilo:",
		help: "Ayuda",
		https_access: "HTTPS access",
		old_webmail: "Previous webmail version",
		warning_msg: "<b>WARNING:</b> This is only the beta version, some features are still limited (forwarding, anti-spam - information on these functions)",
		lost_password: "Password lost?",
		order: "<a href=\"https://admin.forpsi.com/webhosting/adds_order.php?add=4\" target=\"_blank\" class=\"right_red\">NUEVO: GIGAMail - orden</a>",
		advert: "<a href=\"https://adv.forpsi.com/adv.php?id=2778&ak=click\" target=\"_blank\"><img src=\"http://adv.forpsi.com/adv.php?id=2778\" border=\"0\" style=\"width: 468px; height: 60px;\" alt=\"\" title=\"\" /></a>",
		previous: "Versión Precedente",
		manuals: "<a href=\"http://support.forpsi.com/KB/c79\" target=\"_blank\" class=\"right\">Guías</a>"
	},
	cz:{
		missing_login: "Jejda, zapomněli jste vyplnit emailovou adresu!",
		missing_password: "Jejda, zapomněli jste vyplnit heslo!",
		requesting_data: "Probíhá přihlášení, vyčkejte prosím!",
		welcome: "Vítejte na",
		features_desc: "Nový ${serviceName} umožňuje:",
		feature_1: "Pracovat s Vaší poštou z jakéhoholiv počítače připojeného k Internetu;",
		feature_2: "Organizovat doručené a odeslané zprávy;",
		feature_3: "Aktivovat antispam a nastavovat pravidla;",
		feature_4: "Definovat filtrovací pravidla;",
		feature_5: "Spravovat kontakty v adresáři;",
		feature_6: "Plánovat a spravovat události v kalendáři;",
		feature_7: "V účtu postmaster použít MailAdmin pro správu emailových schránek domény.",
		email: "Emailová adresa:",
		password: "Heslo:",
		button: "Přihlásit",
		language: "Jazyk:",
		theme: "Vzhled:",
		help: "Nápověda",
		https_access: "Zabezpečené HTTPS spojení",
		old_webmail: "Původní verze webmailu",
		warning_msg: "<b>UPOZORNĚNÍ:</b> Jedná se pouze o betaverzi, některé funkce jsou zatím omezené (přesměrování, antispam - informace u těchto funkcí)",
		lost_password: "Zapomněli jste heslo?",
		order: "<a href=\"https://admin.forpsi.com/webhosting/adds_order.php?add=4\" target=\"_blank\" class=\"right_red\">NOVÉ: GIGAMail - objednat</a>",
		advert: "<a href=\"https://adv.forpsi.com/adv.php?id=2777&ak=click\" target=\"_blank\"><img src=\"http://adv.forpsi.com/adv.php?id=2777\" border=\"0\" style=\"width: 468px; height: 60px;\" alt=\"\" title=\"\" /></a>",
		previous: "Předchozí verze",
		manuals: "<a href=\"http://support.forpsi.com/KB/c79\" target=\"_blank\" class=\"right\">Návody</a>"
	},
	de:{
		missing_login: "Fehler: Vergessen Sie nicht, Ihre Email-Adresse einzufüllen.",
		missing_password: "Fehler: Vergessen Sie nicht, Ihr Kennwort einzufüllen.",
		requesting_data: "Authentisierung in Vorbereitung.",
		welcome: "Willkommen in",
		features_desc: "Durch die neue ${serviceName} können Sie jetzt:",
		feature_1: "Auf Ihre Mailbox von jedem Computer mit einem Internet-Anschluss zugreifen;",
		feature_2: "Alle Ihre Nachrichten verwalten und einteilen;",
		feature_3: "Den Antispam-Filter aktivieren und konfigurieren;",
		feature_4: "Filterregeln definieren;",
		feature_5: "Das Adressbuch verwalten und Ihre Kontakte organisieren;",
		feature_6: "Ihre Termine durch den neuen Kalender plannen;",
		feature_7: "Im Postmaster-Konto bitte zur Verwaltung der Domänen-E-mails MailAdmin benutzen.",
		email: "Email:",
		password: "Kennwort:",
		button: "LOGIN",
		language: "Sprache:",
		theme: "Thema:",
		help: "Hilfe",
		https_access: "Gesicherte HTTPS-Verbindung",
		old_webmail: "Originalversion der Webmail",
		warning_msg: "<b>ZUR BEACHTUNG:</b> Es handelt sich nur um die Betaversion, einige Funktionen sind bisher eingeschränkt (Umleitung, Antispam - Informationen bei diesen Funktionen)",
		lost_password: "Kennwort vergessen?",
		order: "<a href=\"https://admin.forpsi.com/webhosting/adds_order.php?add=4\" target=\"_blank\" class=\"right_red\">NEU: GIGAMail - Bestellen</a>",
		advert: "<a href=\"https://adv.forpsi.com/adv.php?id=2778&ak=click\" target=\"_blank\"><img src=\"http://adv.forpsi.com/adv.php?id=2778\" border=\"0\" style=\"width: 468px; height: 60px;\" alt=\"\" title=\"\" /></a>",
		previous: "Vorherige Version",
		manuals: "<a href=\"http://support.forpsi.com/KB/c79\" target=\"_blank\" class=\"right\">Anleitungen</a>"
	},
	en:{
		missing_login: "Error: don't forget to fill in your email address.",
		missing_password: "Error: don't forget to fill in your password.",
		requesting_data: "Authentication in progress.",
		welcome: "Welcome to",
		features_desc: "Thanks to new ${serviceName} you can now:",
		feature_1: "Access your mailbox from any computer connected to the Internet;",
		feature_2: "Manage and organize all your messages;",
		feature_3: "Enable and configure AntiSpam filter;",
		feature_4: "Define filtering rules;",
		feature_5: "Manage your address book and organize your contacts;",
		feature_6: "Organize your schedule thanks to the new calendar;",
		feature_7: "Use MailAdmin for managing the domain's email accounts in the postmaster account.",
		email: "Email:",
		password: "Password:",
		button: "LOGIN",
		language: "Language:",
		theme: "Theme:",
		help: "Help",
		https_access: "HTTPS access",
		old_webmail: "Previous webmail version",
		warning_msg: "<b>WARNING:</b> This is only the beta version, some features are still limited (forwarding, anti-spam - information on these functions)",
		lost_password: "Password lost?",
		order: "<a href=\"https://admin.forpsi.com/webhosting/adds_order.php?add=4\" target=\"_blank\" class=\"right_red\">NEW: GIGAMail - order</a>",
		advert: "<a href=\"https://adv.forpsi.com/adv.php?id=2778&ak=click\" target=\"_blank\"><img src=\"http://adv.forpsi.com/adv.php?id=2778\" border=\"0\" style=\"width: 468px; height: 60px;\" alt=\"\" title=\"\" /></a>",
		previous: "Previous version",
		manuals: "<a href=\"http://support.forpsi.com/KB/c79\" target=\"_blank\" class=\"right\">Manuals</a>"
	},
	es:{
		missing_login: "Atención! No se ha insertado la dirección e-mail.",
		missing_password: "Atención! No se ha insertado el Password.",
		requesting_data: "Autenticación en curso",
		welcome: "Bienvenido en",
		features_desc: "Gracias al nuevo Webmail de ${serviceName} desde hoy podrá:",
		feature_1: "Comprobar su cuenta de correo electronico por cualquier postación en internet;",
		feature_2: "Gestionar y organizar todos los mensajes;",
		feature_3: "Activar y configurar el filtro AntiSpam;",
		feature_4: "Añadir y configurar las reglas de correo;",
		feature_5: "Gestionar las rúbricas y organizar sus contactos;",
		feature_6: "Organizar sus citas gracias al nuevo Calendario puesto a su disposición;",
		feature_7: "Utilizar AdminMail para gestionar las cuentas del dominio en la cuenta postmaster.",
		email: "Dirección E-mail:",
		password: "Password:",
		button: "ACCEDER",
		language: "Idioma:",
		theme: "Estilo:",
		help: "Ayuda",
		https_access: "HTTPS access",
		old_webmail: "Previous webmail version",
		warning_msg: "<b>WARNING:</b> This is only the beta version, some features are still limited (forwarding, anti-spam - information on these functions)",
		lost_password: "Password lost?",
		order: "<a href=\"https://admin.forpsi.com/webhosting/adds_order.php?add=4\" target=\"_blank\" class=\"right_red\">NUEVO: GIGAMail - orden</a>",
		advert: "<a href=\"https://adv.forpsi.com/adv.php?id=2778&ak=click\" target=\"_blank\"><img src=\"http://adv.forpsi.com/adv.php?id=2778\" border=\"0\" style=\"width: 468px; height: 60px;\" alt=\"\" title=\"\" /></a>",
		previous: "Versión Precedente",
		manuals: "<a href=\"http://support.forpsi.com/KB/c79\" target=\"_blank\" class=\"right\">Guías</a>"
	},
	fr:{
		missing_login: "Erreur: n'oubliez pas de saisir votre adresse email.",
		missing_password: "Erreur: n'oubliez pas de saisir votre mot de passe.",
		requesting_data: "Authentification en cours.",
		welcome: "Bienvenue à",
		features_desc: "Grâce au nouveau ${serviceName} vous pouvez maintenant:",
		feature_1: "Consulter votre boîte aux lettres depuis n'importe quel ordinateur connecté à Internet;",
		feature_2: "Gérer et organiser tous vos messages;",
		feature_3: "Activer et configurer le filtre AntiSpam;",
		feature_4: "Définir des règles de filtrage;",
		feature_5: "Gérer vos carnets d'adresses et organiser vos contacts;",
		feature_6: "Organiser votre emploi du temps grâce au nouvel agenda mis à votre disposition;",
		feature_7: "Utilisez l'Administration de Messages dans le compte postmaster pour gérer les comptes de messagerie du domaine.",
		email: "Adresse email:",
		password: "Mot de passe:",
		button: "ENTRER",
		language: "Langue:",
		theme: "Theme:",
		help: "Aide",
		https_access: "Acces HTTPS",
		old_webmail: "Version précédente",
		warning_msg: "<b>ATTENTION:</b> Il s'agit d'une version beta, certaines fonctionnalités ont été limitées (forwarding, anti-spam)",
		lost_password: "Mot de passe oublié?",
		order: "<a href=\"https://admin.forpsi.com/webhosting/adds_order.php?add=4\" target=\"_blank\" class=\"right_red\">NOUVEAU: GIGAMail - commander</a>",
		advert: "<a href=\"https://adv.forpsi.com/adv.php?id=2778&ak=click\" target=\"_blank\"><img src=\"http://adv.forpsi.com/adv.php?id=2778\" border=\"0\" style=\"width: 468px; height: 60px;\" alt=\"\" title=\"\" /></a>",
		previous: "Version précédente",
		manuals: "<a href=\"http://support.forpsi.com/KB/c79\" target=\"_blank\" class=\"right\">Manuels</a>"
	},
	hu:{
		missing_login: "Hiba: ne felejtse el, kitölteni az e-mail címet.",
		missing_password: "Hiba: ne felejtse el, kitölteni a jelszót.",
		requesting_data: "Hitelesítés folyamatban.",
		welcome: "Üdvözöli a",
		features_desc: "Az új ${serviceName} -nek köszönhetően:",
		feature_1: "Hozzáférhet e-mail fiókjaihoz bármely Internetre csatlakoztatott számítógépről;",
		feature_2: "Kezelheti és rendezheti az összes üzenetét;",
		feature_3: "Engedélyezheti és beállíthatja az AntiSpam szűrőt;",
		feature_4: "Szűrési szabályokat adhat meg;",
		feature_5: "Kezelheti címjegyzékét és rendezheti kapcsolatait;",
		feature_6: "Megszervezheti napirendjét az új naptárnak köszönhetően;",
		feature_7: "Az email fiókok kezelése a MailAdmin-ban a postmaster fiókkal történő belépés után.",
		email: "Email:",
		password: "Jelszó:",
		button: "LOGIN",
		language: "Nyelv:",
		theme: "Téma:",
		help: "Segítség",
		https_access: "HTTPS hozzáférés",
		old_webmail: "Előző webmail verzió",
		warning_msg: "<b>Vigyázat:</b> Ez csak béta verzió, néhány funkció még korlátozva van (továbbitás, anti-spam információk a funkciókról)",
		lost_password: "Elfelejtette a jelszót?",
		order: "<a href=\"https://admin.forpsi.hu/webhosting/adds_order.php?add=4\" target=\"_blank\" class=\"right_red\">Új: GIGAMail - megrendelés</a>",
		advert: "<a href=\"https://adv.forpsi.hu/adv.php?id=2163&ak=click\" target=\"_blank\"><img src=\"http://adv.forpsi.hu/adv.php?id=2163\" border=\"0\" style=\"width: 468px; height: 60px;\" alt=\"\" title=\"\" /></a>",
		previous: "Előző verzió",
		manuals: "<a href=\"http://support.forpsi.hu/KB/c40\" target=\"_blank\" class=\"right\">Kézikönyv</a>"
	},
	it:{
		missing_login: "Attenzione! Non è stato inserito l’indirizzo e-mail.",
		missing_password: "Attenzione! Non è stata inserita la Password.",
		requesting_data: "Autenticazione in corso.",
		welcome: "Benvenuto su",
		features_desc: "Grazie alla nuova ${serviceName} da oggi potrai:",
		feature_1: "Controllare la tua casella di posta elettronica da qualsiasi postazione internet;",
		feature_2: "Gestire ed organizzare tutti i tuoi messaggi;",
		feature_3: "Attivare e configurare il filtro AntiSpam;",
		feature_4: "Aggiungere e impostare le regole di posta;",
		feature_5: "Gestire la rubrica e organizzare i tuoi contatti;",
		feature_6: "Organizzare i tuoi appuntamenti grazie a un nuovo Calendario messo a tua disposizione;",
		feature_7: "Usa il Pannello di Amministrazione, accedendo come postmaster, per gestire le caselle del dominio.",
		email: "Indirizzo E-mail:",
		password: "Password:",
		button: "ACCEDI",
		language: "Lingua:",
		theme: "Stile:",
		help: "Aiuto",
		https_access: "HTTPS access",
		old_webmail: "Previous webmail version",
		warning_msg: "<b>WARNING:</b> This is only the beta version, some features are still limited (forwarding, anti-spam - information on these functions)",
		lost_password: "Password dimenticata?",
		order: "<a href=\"https://admin.forpsi.com/webhosting/adds_order.php?add=4\" target=\"_blank\" class=\"right_red\">NUOVO: GIGAMail - ordina</a>",
		advert: "<a href=\"https://adv.forpsi.com/adv.php?id=2778&ak=click\" target=\"_blank\"><img src=\"http://adv.forpsi.com/adv.php?id=2778\" border=\"0\" style=\"width: 468px; height: 60px;\" alt=\"\" title=\"\" /></a>",
		previous: "Versione Precedente",
		manuals: "<a href=\"http://support.forpsi.com/KB/c79\" target=\"_blank\" class=\"right\">Manuali</a>"
	},
	mx:{
		missing_login: "Atención! No se ha insertado la dirección e-mail.",
		missing_password: "Atención! No se ha insertado el Password.",
		requesting_data: "Autenticación en curso",
		welcome: "Bienvenido en",
		features_desc: "Gracias al nuevo Webmail de ${serviceName} desde hoy podrá:",
		feature_1: "Comprobar su cuenta de correo electronico por cualquier postación en internet;",
		feature_2: "Gestionar y organizar todos los mensajes;",
		feature_3: "Activar y configurar el filtro AntiSpam;",
		feature_4: "Añadir y configurar las reglas de correo;",
		feature_5: "Gestionar las rúbricas y organizar sus contactos;",
		feature_6: "Organizar sus citas gracias al nuevo Calendario puesto a su disposición;",
		feature_7: "Utilizar AdminMail para gestionar las cuentas del dominio en la cuenta postmaster.",
		email: "Dirección E-mail:",
		password: "Password:",
		button: "ACCEDER",
		language: "Idioma:",
		theme: "Estilo:",
		help: "Ayuda",
		https_access: "HTTPS access",
		old_webmail: "Previous webmail version",
		warning_msg: "<b>WARNING:</b> This is only the beta version, some features are still limited (forwarding, anti-spam - information on these functions)",
		lost_password: "Password lost?",
		order: "<a href=\"https://admin.forpsi.com/webhosting/adds_order.php?add=4\" target=\"_blank\" class=\"right_red\">NUEVO: GIGAMail - orden</a>",
		advert: "<a href=\"https://adv.forpsi.com/adv.php?id=2778&ak=click\" target=\"_blank\"><img src=\"http://adv.forpsi.com/adv.php?id=2778\" border=\"0\" style=\"width: 468px; height: 60px;\" alt=\"\" title=\"\" /></a>",
		previous: "Versión Precedente",
		manuals: "<a href=\"http://support.forpsi.com/KB/c79\" target=\"_blank\" class=\"right\">Guías</a>"
	},
	pl:{
		missing_login: "Błąd: nie podałeś adresu e-mail.",
		missing_password: "Błąd: nie podałeś hasła.",
		requesting_data: "Trwa autoryzacja.",
		welcome: "Witamy na",
		features_desc: "Teraz dzięki nowemu ${serviceName} możesz:",
		feature_1: "Posiadać dostęp do swojej poczty z dowolnego komputera podpiętego do internetu;",
		feature_2: "Organizować i zarządzać wszystkimi twoimi wiadomościami;",
		feature_3: "Włączać i konfigurować filtr Anty-spamowy;",
		feature_4: "Definiować własne reguły;",
		feature_5: "Zarządzać swoją książką adresową oraz porządkować swoje kontakty;",
		feature_6: "Organizować swój czas dzięki nowemu kalendarzowi;",
		feature_7: "W celu zarządzania kontami mailowymi domeny należy użyć panelu MailAdmin logując się na konto postmaster.",
		email: "Email:",
		password: "Hasło:",
		button: "ZALOGUJ",
		language: "Język:",
		theme: "Motyw:",
		help: "Pomoc",
		https_access: "HTTPS access",
		old_webmail: "Poprzednia wersja webmaila",
		warning_msg: "<b>UWAGA:</b> To wciąż jest testowa wersja, niektóre opcje nadal posiadają pewne ograniczenia (przekazywanie poczty, anty-spam - informacja o tych funkcjach)",
		lost_password: "Zapomniałeś hasła?",
		order: "<a href=\"https://admin.forpsi.pl/webhosting/adds_order.php?add=4\" target=\"_blank\" class=\"right_red\">NOWE: GIGAMail - zamów</a>",
		advert: "<a href=\"https://adv.forpsi.pl/adv.php?id=2249&ak=click\" target=\"_blank\"><img src=\"http://adv.forpsi.pl/adv.php?id=2249\" border=\"0\" style=\"width: 468px; height: 60px;\" alt=\"\" title=\"\" /></a>",
		previous: "Poprzednia wersja",
		manuals: "<a href=\"http://support.forpsi.pl/KB/c291\" target=\"_blank\" class=\"right\">Instrukcja</a>"
	}
};

function login_localize(language){

	var id_inner = ['welcome','features_desc','feature_1','feature_2','feature_3','feature_4','feature_5','feature_6','feature_7','email','password','language','theme','help','lost_password','previous','https_access','old_webmail','warning_msg', 'order', 'advert','manuals'];
	var id_value = ['button'];

	var updateInner = function(id){
		var node = document.getElementById(id);
		if (node && node.innerHTML)
		{
			node.innerHTML = fstring(localization[language][id]);
		}
	}
	var updateValue = function(id){
		var node = document.getElementById(id);
		if (node)
		{
			node.value = fstring(localization[language][id]);
		}
	}

	for(var x=0; x<id_inner.length; x++){
		updateInner(id_inner[x]);
	}
	for(var x=0; x<id_value.length; x++){
		updateValue(id_value[x]);
	}
}

function fstring (param){
	var regExModel = /\$\{([^\}]+)\}/;
	var regExRes = param.match(regExModel);
	return regExRes ? param.replace(regExRes[0], localization['global'][regExRes[1]]) : param;
}

