var localization = {
	global:{
		serviceName: "webmail.verticaltech.it",
		domain: "verticaltech.it"
	},
	bo:{
		missing_login: "Atención! No se ha insertado la dirección email.",
		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.",
		email: "Dirección Email:",
		password: "Password:",
		button: "ACCEDER",
		language: "Idioma:",
		theme: "Estilo:",
		help: "> Ayuda on-line",
		lost_password: "<a href=\"http://hosting.aruba.it/Domini/spediscidatidominio.asp?Lang=ES\" target=\"_blank\">> Modalidad de Recuperació password</a>",
		previous: "> Versión Precedente"
	},
	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 do",
		features_desc: "Po přihlášení do ${serviceName} můžete:",
		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",
		email: "Emailová adresa:",
		password: "Heslo:",
		button: "Přihlásit",
		language: "Jazyk:",
		theme: "Vzhled:",
		help: "> Nápověda",
		lost_password: "<a href=\"http://hosting.aruba.it/Domini/spediscidatidominio.asp?Lang=EN\" target=\"_blank\">> Zapomněli jste heslo?</a>",
		previous: "> Předchozí verze"
	},
	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 Webmail ${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",
		email: "Email:",
		password: "Kennwort:",
		button: "LOGIN",
		language: "Sprache:",
		theme: "Thema:",
		help: "> Help on-line",
		lost_password: "<a href=\"http://hosting.aruba.it/Domini/spediscidatidominio.asp?Lang=DE\" target=\"_blank\">> Kennwort-wiederherstellung Modus</a>",
		previous: "> Vorherige version"
	},
	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 ${serviceName} new webmail 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.",
		email: "Email:",
		password: "Password:",
		button: "LOGIN",
		language: "Language:",
		theme: "Theme:",
		help: "> Online Help",
		lost_password: "<a href=\"http://hosting.aruba.it/Domini/spediscidatidominio.asp?Lang=EN\" target=\"_blank\">> Password Recovery Methods</a>",
		previous: "> Previous version"
	},
	es:{
		missing_login: "Atención! No se ha insertado la dirección email.",
		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.",
		email: "Dirección Email:",
		password: "Password:",
		button: "ACCEDER",
		language: "Idioma:",
		theme: "Estilo:",
		help: "> Ayuda on-line",
		lost_password: "<a href=\"http://hosting.aruba.it/Domini/spediscidatidominio.asp?Lang=ES\" target=\"_blank\">> Modalidad de Recuperació password</a>",
		previous: "> Versión Precedente"
	},
	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 webmail de ${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.",
		email: "Adresse email:",
		password: "Mot de passe:",
		button: "ENTRER",
		language: "Langue:",
		theme: "Thème:",
		help: "> Aide",
		lost_password: "<a href=\"http://hosting.aruba.it/Domini/spediscidatidominio.asp?Lang=EN\" target=\"_blank\">> Mot de passe oublié?</a>",
		previous: "> Version précédente"
	},
	hu:{
		missing_login: "Hiba: ne felejtse el, kitölteni az email címet.",
		missing_password: "Hiba: ne felejtse el, kitölteni a jelszót.",
		requesting_data: "Hitelesítés folyamatban.",
		welcome: "Üdvözöljük",
		features_desc: "A ${serviceName} új webmail-nek köszönhetően ön képes:",
		feature_1: "Hozzáférés az ön email fiókjához bármilyen Internetre csatlakozotatott számítógépről;",
		feature_2: "Az összes üzenetének kezelése és rendezése;",
		feature_3: "Az AntiSpam szűrő engedélyezése és beállítása;",
		feature_4: "Adja meg a szűrési szabályokat;",
		feature_5: "Kezelje címjegyzékét és rendezze kapcsolatait;",
		feature_6: "Megszervezheti napirendjét az új naptárnak köszönhetően.",
		email: "Email:",
		password: "Jelszó:",
		button: "LOGIN",
		language: "Nyelv:",
		theme: "Téma:",
		help: "> Segítség",
		lost_password: "<a href=\"http://hosting.aruba.it/Domini/spediscidatidominio.asp?Lang=EN\" target=\"_blank\">> Elfelejtette a jelszót?</a>",
		previous: "> Előző verzió"
	},
	it:{
		missing_login: "Attenzione! Non è stato inserito l’indirizzo email.",
		missing_password: "Attenzione! Non è stata inserita la Password.",
		requesting_data: "Autenticazione in corso.",
		welcome: "Benvenuto su",
		features_desc: "Grazie alla nuova Webmail di ${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.",
		email: "Indirizzo Email:",
		password: "Password:",
		button: "ACCEDI",
		language: "Lingua:",
		theme: "Stile:",
		help: "> Help on-line",
		lost_password: "<a href=\"http://assistenza.aruba.it/kb/idx/0/1502/article/Recupero-Password-Caselle-di-Posta-.html\" target=\"_blank\">> Modalità recupero password</a>",
		previous: "> Versione Precedente"
	},
	mx:{
		missing_login: "Atención! No se ha insertado la dirección email.",
		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.",
		email: "Dirección Email:",
		password: "Password:",
		button: "ACCEDER",
		language: "Idioma:",
		theme: "Estilo:",
		help: "> Ayuda on-line",
		lost_password: "<a href=\"http://hosting.aruba.it/Domini/spediscidatidominio.asp?Lang=ES\" target=\"_blank\">> Modalidad de Recuperació password</a>",
		previous: "> Versión Precedente"
	},
	pl:{
		missing_login: "Błąd: nie podałeś adresu email.",
		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.",
		email: "Email:",
		password: "Hasło:",
		button: "ZALOGUJ",
		language: "Język:",
		theme: "Motyw:",
		help: "> Pomoc",
		lost_password: "<a href=\"http://hosting.aruba.it/Domini/spediscidatidominio.asp?Lang=EN\" target=\"_blank\">> PZapomniałeś hasła?</a>",
		previous: "> Poprzednia wersja"
	}
};

function login_localize(language){

	var id_inner = ['welcome','features_desc','feature_1','feature_2','feature_3','feature_4','feature_5','feature_6','email','password','language','theme','help','lost_password','previous'];
	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;
}

