/**
 * traductor 
 * 
 * @param string[] $L contiene las traducciones 
 * @param string $page el nombre de la pagina a traducir
 * @access public
 * @return void
 */
function traductor(L,page){
	var tran;
	var i;
	var g;

	//traducir menu inicio o header.
	trans=document.getElementById("header").getElementsByTagName('a');
	for(i=1;i<6;i++)
		trans[i].innerHTML=L[i-1];

	//traducir pie de pagina o footer.
	((document.getElementById("footer").getElementsByTagName('b'))[0]).innerHTML=L[4]; 
	trans=document.getElementById("menu2").getElementsByTagName('a');
	for(i=0;i<5;i++)
		trans[i].innerHTML=L[i+5];
	
	//Traducir paginas segun la variable page.
	switch(page){
	case "index":
		g=10;
		trans=document.getElementById("content").getElementsByTagName('h1');
		for(i=0;i<5;i++)
			trans[i].innerHTML=L[g+i];
		trans=document.getElementById("content").getElementsByTagName('td');
		trans[0].innerHTML=L[g+5]+" Sferea <b>.mobi<sup>&copy;</sup></b> "+L[g+6];
		for(i=0;i<3;i++)
			trans[i+8].innerHTML=L[i+g+7];
		trans[15].innerHTML=L[g+10];
		//comienza slider.
		g=75;
	break;
	case "about":
		g=21;
		document.getElementById("abo1").innerHTML=L[g+0];
		document.getElementById("abo2").innerHTML=L[g+1];
		trans=document.getElementById("content").getElementsByTagName('div');
		trans[0].innerHTML="Sferea <b>.mobi<sup>&copy;</sup></b> "+L[g+2];
		trans[1].innerHTML=L[15]+" Sferea <b>.mobi<sup>&copy;</sup></b> "+L[16];
		trans[2].innerHTML=L[g+3];
		trans[3].innerHTML="Sferea <b>.mobi<sup>&copy;</sup></b> "+L[g+4];
		trans=document.getElementById("content").getElementsByTagName('li');
		for(i=0;i<4;i++)
			trans[i].innerHTML=L[g+i+5];
	break;
	case "services":
		g=30;
		((document.getElementById('content').getElementsByTagName('th'))[0]).innerHTML=L[1];
		((document.getElementById('content').getElementsByTagName('h2'))[0]).innerHTML=
			L[g+0]+' Sferea <b>.mobi<sup>&copy;</sup></b>,'+L[g+1];
		trans=(document.getElementById('content')).getElementsByTagName('li');
		trans[0].innerHTML=L[g+2]+'<br/>'
			+L[g+3]+"<br/>"
			+L[g+4]+"<br/>";
		trans[1].innerHTML=L[g+5]+'<br/>'
			+L[g+6]+"<br/>"
			+L[g+7]+"<br/>"
			+"Augmented reality<br/>";
		trans[2].innerHTML=L[g+8]+'<br/>'
			+L[g+9]+"<br/>"
			+L[g+10]+"<br/>"
			+L[g+11]+"<br/>";
		trans[3].innerHTML=L[g+12]+'<br/>'
			+L[g+13]+"<br/>"
			+L[g+14]+"<br/>";
		trans[4].innerHTML=L[g+15]+'<br/>'
			+L[g+16]+"<br/>"
			+L[g+17]+"<br/>";
		trans[5].innerHTML=L[g+18]+'<br/>'
			+"Facebook<br/>"
			+"Twitter<br/>"
			+"Foursquare<br/>";
		trans[6].innerHTML=L[g+19]+"<br/>"
			+L[g+20]+"<br/>"
			+L[g+21]+"<br/>"
			+L[g+22]+"<br/>"
			+L[g+23]+"<br/>";
	break;
	case "solutions":
		g=54;
		((document.getElementById('content').getElementsByTagName('th'))[0]).innerHTML=L[2];
		trans=document.getElementById("content").getElementsByTagName('h2');
		for(i=0;i<3;i++)
			trans[i].innerHTML=L[g+i];
		trans=document.getElementById("content").getElementsByTagName('div');
		trans[0].innerHTML=L[g+3];
		trans[1].innerHTML=L[g+4];
		trans[3].innerHTML=L[g+5];
		trans=document.getElementById("content").getElementsByTagName('li');
		trans[0].innerHTML=L[g+6];
		trans[1].innerHTML=L[g+7];
	break;
	case "success":
		g=62;
		((document.getElementById('content').getElementsByTagName('th'))[0]).innerHTML=L[3];
		((document.getElementById('content').getElementsByTagName('h2'))[0]).innerHTML=L[g];
		trans=document.getElementById("content").getElementsByTagName('div');
		trans[0].innerHTML="<br/>"+L[g+1]
			+" Penalties – Pasi&oacute;n Tricolor M&oacute;vil.<br/>"+L[g+2];
		trans[1].innerHTML="<br/>"+L[g+3]+"<br/>"+L[g+4];
		trans[4].innerHTML="<br/>"+L[g+5];
		trans[5].innerHTML="<br/>"+L[g+6];
	break;
	case "contact":
		g=69;
		((document.getElementById('content').getElementsByTagName('th'))[0]).innerHTML=L[g];
		((document.getElementById('content').getElementsByTagName('button'))[0]).innerHTML=L[g+1];
		document.getElementById("nom").value=L[g+2];
		document.getElementById("ema").value=L[g+3];
		document.getElementById("tel").value=L[g+4];
		document.getElementById("msg").innerHTML=L[g+5];
	break;
	}	
}
var currLang="es";
var currPage="";
//Inician las arrays de traducción.

//Traduccion al espanol
var es=[
//Header o menu principal
'Sobre Nosotros',
'Servicios',
'Soluciones',
'Casos de &Eacute;xito',
'Contacto',

//footer o pie de pagina.
'inicio',
'empleos',
'prensa',
'contacto',
'legal',
//index (no incluye slider)
'Ambientes Empresariales',
'Instituciones Gubernamentales',
'Campa&ntilde;as de marketing m&oacute;vil',
'Noticias',
'Medios de Comunicaci&oacute;n',
'En',
'somos expertos desarrollando sistemas m&oacute;viles para:',
'Utilizando aplicaciones m&oacute;viles creamos ventajas competitivas que generan un impacto real en el negocio de nuestros clientes',
'Soluciones m&oacute;viles que optimizan procesos y acercan la información al ciuddano.',
'Creatividad móvil que impulsa de forma innovadora el posicionamiento de una marca',
'Impulsamos la participaci&oacute;n y asistencia a eventos f&iacute;sicos y virtuales a trav&eacute;s de aplicaciones m&oacute;viles innovadoras, que aprovechan los beneficios de las redes sociales.',
//about
'Sobre',
'Nuestra Misi&oacute;n',
'es una empresa dedicada a ofrecer soluciones m&oacute;viles para procesos de negocio, gubernamentales, medios, entretenimiento y campa&ntilde;as de mercadotecnia m&oacute;vil.',
'Proveer soluciones m&oacute;viles creativas que optimicen procesos de negocio innovando la forma en que clientes y usuarios acceden a la informaci&oacute;n, para generar reconocimiento de marca y ventajas competitivas a nuestros clientes.',
'es una divisi&oacute;n de Sferea®, que, junto con sus empresas hermanas (Sferea Games© y Sferea Security©) ofrece servicios creativos de excelencia y calidad a nuestros clientes.',
'Ambientes empresariales, donde utilizando aplicaciones m&oacute;viles creamos ventajas competitivas que generan un impacto real en el negocio de nuestros clientes.',
'En Instituciones Gubernamentales optimizamos procesos y acercando la informaci&oacute;n al ciudadano utilizando software m&oacute;vil.',
'Medios de Comunicaci&oacute;n y Entretenimiento: Impulsamos la participaci&oacute;n y asistencia a eventos f&iacute;sicos y virtuales a trav&eacute;s de aplicaciones m&oacute;viles innovadoras, que aprovechan los beneficios de las redes sociales.',
'En campa&ntilde;as de marketing m&oacute;vil impulsamos de forma innovadora el posicionamiento de una marca, y conseguimos traducir las ideas creativas en ventas.',

//servicios
'En',
'ofrecemos soluciones en sectores como:',
'Medios de Informaci&oacute;n:',
'Peri&oacute;dicos,  Revistas,  Publicaciones, etc.',
'Multimedia en tiempo real.',
'Marketing:',
'Campa&ntilde;as de marketing m&oacute;vil',
'Creatividad m&oacute;vil',
'Turismo:',
'Festivales',
'Espect&aacute;culos',
'Agenda de eventos (culturales, deportivos, etc.)',
'Salud:',
'Campa&ntilde;as permanentes de salud e higiene',
'Divulgaci&oacute;n de informaci&oacute;n',
'Aplicaciones Empresariales:',
'Terminales m&oacute;viles para Sistemas de Misi&oacute;n Cr&iacute;tica',
'Interfaces m&oacute;viles para CRM y/o ERP',
'Interfaces con Redes Sociales:',
'Sector P&uacute;blico, Gobierno:',
'Tr&aacute;mites m&oacute;viles',
'Encuestas',
'Contacto ciudadano',
'Log&iacute;stica y Geolocalizaci&oacute;n (GPS)',

//Solutions
'Eventos',
'Turismo',
'Marketing',
'Es una aplicaci&oacute;n para dispositivos m&oacute;viles que permite al usuario interactuar en una exposici&oacute;n, congreso o convenci&oacute;n identificando las actividades, conferencias y promociones del evento.',
'La soluci&oacute;n Sferea Great Events integra:',
'Somos expertos desarrollando campa&ntilde;as de marketing m&oacute;vil para impulsar de forma innovadora el posicionamiento de una marca, y convertir ideas creativas en ventas.',
'Una aplicaci&oacute;n m&oacute;vil “Sferea Great Events” que te mantendr&aacute; actualizado sobre los eventos organizados en un carnaval o festival. Podr&aacute;s a trav&eacute;s de ella interactuar con otros asistentes, compartiendo fotos e invit&aacute;ndolos a participar. Es una gu&iacute;a m&oacute;vil que te permitir&aacute; disfrutar un evento al m&aacute;ximo aprovechando tambi&eacute;n las ventajas de las  redes sociales.',
'Nuestro portal web de administraci&oacute;n, donde podr&aacute;s tener el control del contenido mostrado en los dispositivos m&oacute;viles as&iacute; como acceso a otras herramientas para un mayor acercamiento con tus usuarios.',

//success
'Algunos de nuestros casos de &eacute;xito son:',
'Como proveedor del Portal EsMas de Televisa, Sferea distribuye el videojuego',
'En Pas&iacute;on Tricolor M&oacute;vil, eres el jugador favorito del equipo Tricolor y tienes la responsabilidad de llevar a tu equipo al campeonato. Deberas demostrar&aacute;s tu habilidad para salir vencedor de toda una ronda de penalties. Pasi&oacute;n Tricolor M&oacute;vil es un juego casual que con dos tem&aacute;ticas divertidas te entrenar&aacute; para ser la estrella del mundial.',
'Expopublicitas 2010, es la exposici&oacute;n m&aacute;s importante de publicidad de America Latina se realiz&oacute; los d&iacute;as 25, 26 y 27 de Mayo de 2010, en el Centro de Exposiciones Banamex en la Cd. de M&eacute;xico.',
'Durante los tres d&iacute;as del evento la aplicaci&oacute;n m&oacute;vil "Expopublicitas 2010 – Directorio de Expositores" a trav&eacute;s de la cual los asistentes pudieron interactuar con la Expo , identificando a los expositores, su ubicaci&oacute;n en la expo y en general los beneficios de contar con datos de futuros proveedores.',
'Distribuido en 2009 de forma gratuita, el videojuego “Betito vs la Influenza”, promueve las medidas de prevenci&oacute;n relacionadas con el virus de la Influenza A H1N1, y fue la contribuci&oacute;n social de Sferea para orientar a los peque&ntilde;os sobre las medidas de prevenci&oacute;n para evitar el contagio, y tambi&eacute;n fue un &eacute;xito como campa&ntilde;a de marketing viral.',
'Carnival World es un aplicaci&oacute;n para plataforma Blackberry, que es una gu&iacute;a indispensable para asistir a los carnavales de: Jamaica, Barbados y Trinidad y Tobago. A trav&eacute;s de Carnival World, los asistentes al carnaval conocen informaci&oacute;n sobre los eventos del carnaval, identifican los eventos recomendados e interact&uacute;an con sus amigos utilizando las redes sociales.',

//Contacto
'Cont&aacute;ctanos',
'Enviar',
'Nombre',
'e-mail',
'Teléfono',
'Mensaje',


//SLIDER
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
''
];

var en=[
'About Us',
'Services',
'Solutions',
'Success Stories',
'Contact',
'start',
'jobs',
'press',
'contact',
'legal',
'Business Environments',
'Government Institutions',
'Mobile Marketing Campaigns',
'News',
'Media &amp; Entertainment',
'At',
'we are experts developing mobile systems for:',
'where using mobile devices we create competitive advantages that generate a real impact in the business of our clients.',
'we optimize their processes to reduce costs and as well as getting the information nearer to the citizens.',
'we boost through innovative ways the positioning of a brand, translating the creative ideas in sales.',
'we promote the participation and assistance to physical and virtual events or shows through innovative apps, taking also advantage of the social apps features.',
'About',
'Our Mision',
'is a company focused in providing a variety of mobile solutions to business processes, government, and mobile marketing campaigns.',
'Provide creative mobile solutions that optimize business processes innovating the way in which customers and users access the information, to generate brand recognition and competitive advantages to our clients and stakeholders.',
'is a division of Sferea®, which, among its sister companies (Sferea Games© and Sferea Security©) provides creative services of excellency and quality to our clients.',
'Business environments, where using mobile devices we create competitive advantages that generate a real impact in the business of our clients.',
'Government institutions, we optimize their processes to reduce costs and as well as getting the information nearer to the citizens.',
'Media &amp; Entertainment, we promote the participation and assistance to physical and virtual events or shows through innovative apps, taking also advantage of the social apps features.',
'Mobile marketing campaigns, we boost through innovative ways the positioning of a brand, translating the creative ideas in sales.',
'At',
'we provide solutions in the following areas',
'Media:',
'Newspapers, magazines, publications, etc.',
'Real-time multimedia',
'Marketing:',
'Mobile marketing campaigns',
'Mobile creativity',
'Tourism:',
'Festivals',
'Shows',
'Annual events agenda (cultural, sports, etc.)',
'Health:',
'Continuous health campaigns',
'Information releases',
'Business applications:',
'Mobile terminals for Mission-Critical systems',
'Mobile interfaces for CRM & ERP',
'Social networks interaction:',
'Public sector / Government:',
'Paperwork handled at the mobile devices',
'Surveys',
'Contact information for citizens',
'Logistics and Geolocalization (GPS)',
'Events',
'Tourism',
'Marketing',
'It is an application for mobile devices that allows the user to interact at an expo, congress, or convention identifying the activities, conferences and promotions of the event.',
'Our Sferea Great Events solution integrates:',
'we are experts developing mobile marketing campaigs that boost, in an innovative way, the positioning of a brand, translating creative ideas in sales.',
'A mobile application “Sferea Great Events” which will keep you updated about the events that will occur at a festival or carnival. Through the app you’ll be able to interact with other assistants, sharing photos and inviting them to participate. This mobile guide will help you to fully enjoy an event taking advantaje of the social networks.',
'Our management web portal, where you’ll have the control over the content shown at the mobile devices, as well as to other tools for a better approach with your users and customers.',
'Some of our stories of success are:',
'As IT provider of EsMas (Televisa subsidiary), Sferea developed the videogame',
'On Pasión Tricolor Móvil, you are the favorite player of your Tricolor team, and you have the responsibility to lead your team to the championship. You’ll have to prove your hability to achieve the victory through a final penalty round. Pasión Tricolor Móvil is a casual game with two fun modalities which will train you to be the Worldcup star.',
'Expopublicitas 2010, is the most important publicity and advertising event in LatinAmerica which has held on May 2010 at Mexico City.',
'During the three days of the event, the mobile application "Expopublicitas 2010 – Exhibitor’s directory" allowed the assistants to interact with the Expo, identifying the exhibitors of their interest, their location at the place, and in general all the benefits of having in advance the information of possible future providers.',
'Distributed freely in 2009, the videogame “Betito vs la Influenza”, promotes the healthy prevention measures related with the AH1N1 virus. It was Sferea’s social contribution to guide kids and young people about the prevention measures to avoid the infection; and, by the way, it was also a success as a viral marketing campaign.',
'Carnival World is an application primarily designed for the Blackberry(R) platform. It is an indispensable guide for assisting to the events at the Carnivals of Jamaica, Barbados, and Trinidad & Tobago. Through Carnival World, the assistants will be able to know detailed information about the events at the carnival, identify the recommended events and rate them, and always interacting with their social networking friends.',
'Contact Us',
'Send',
'Name',
'e-mail',
'Telephone',
'Message',

'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
''];

function trad(){
	if(/about/.test(window.location.href))
		currPag="about";
	else if(/services/.test(window.location.href))
		currPag="services";
	else if(/solutions/.test(window.location.href))
		currPag="solutions";
	else if(/success/.test(window.location.href))
		currPag="success";
	else if(/contact/.test(window.location.href))
		currPag="contact";
	else if(/join/.test(window.location.href))
		currPag="join";
	else
		currPag="index";
	if(/en/.test(navigator.language)){
		trad2();
	}
}
function trad2(s){
	if(s=="en"){
		if(currPag=="index")
			document.getElementById("dossier").href="sferea-dossier-e.pdf"
		traductor(en,currPag);
		document.getElementById("imgen").style.display='none';
		document.getElementById("imges").style.display='block';
	}else{
		if(currPag=="index")
			document.getElementById("dossier").href="sferea-dossier.pdf"
		traductor(es,currPag);
		document.getElementById("imges").style.display='none';
		document.getElementById("imgen").style.display='block';
	}
}
trad();
/*var test=new Array();
for(i=0;i<88;i++){
 test[i] = i;
}
traductor(test);*/

