window.onload=actualizaFecha;



/* Coeminza el script del Reloj */
 function actualizaFecha(){ 
 actualizaReloj();
/* Capturamos la Hora, los minutos y los segundos */
marcacion = new Date() 
 
/* Capturamos la Hora */
Hora = marcacion.getHours() 
 
/* Capturamos los Minutos */
Minutos = marcacion.getMinutes() 
 
/* Capturamos los Segundos */
Segundos = marcacion.getSeconds() 
 
/* Si la Hora, los Minutos o los Segundos
Son Menores o igual a 9, le añadimos un 0 */
 
if (Hora<=9)
Hora = "0" + Hora
 
if (Minutos<=9)
Minutos = "0" + Minutos
 
if (Segundos<=9)
Segundos = "0" + Segundos
 
/* Termina el Script del Reloj */
 
 
/* Coemienza eñ Script de la Fecha */
 
var Dia = new Array("Domingo", "Lunes", "Martes", "Mi&eacute;rcoles", "Jueves", "Viernes", "S&aacute;bado", "Domingo");
var Mes = new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");
var Hoy = new Date();
var Anio = Hoy.getFullYear();
var Fecha = "Hoy es "+  Dia[Hoy.getDay()] + ", " + Hoy.getDate() + " de " + Mes[Hoy.getMonth()] + " de " + Anio ;
 
/* Termina el script de la Fecha */
 
 
/* Creamos 4 variables para darle formato a nuestro Script */
var Inicio, Script, Final, Total
 
/*En Inicio le indicamos un color de fuente y un tamaño */
Inicio = ""
 
/* En Reloj le indicamos la Hora, los Minutos y los Segundos */
Script = Fecha 
 
/* En final cerramos el tag de la fuente */
Final = "</font>"
 
/* En total Finalizamos el Reloj uniendo las variables */
Total = Inicio + Script + Final
 
/* Capturamos una celda para mostrar el Reloj */
document.getElementById('Fecha').innerHTML = Total
 
/* Indicamos que nos refresque el Reloj cada 1 segundo */

}

function Oculta()
{
	
}
	
	
	
function actualizaReloj(){ 
 
/* Capturamos la Hora, los minutos y los segundos */
marcacion = new Date() 
 
/* Capturamos la Hora */
Hora = marcacion.getHours() 
 
/* Capturamos los Minutos */
Minutos = marcacion.getMinutes() 
 
/* Capturamos los Segundos */
Segundos = marcacion.getSeconds() 
 
/* Si la Hora, los Minutos o los Segundos
Son Menores o igual a 9, le añadimos un 0 */
 
if (Hora<=9)
Hora = "0" + Hora
 
if (Minutos<=9)
Minutos = "0" + Minutos
 
if (Segundos<=9)
Segundos = "0" + Segundos
 
/* Termina el Script del Reloj */
 
 
/* Coemienza eñ Script de la Fecha */
 
var Dia = new Array("Domingo", "Lunes", "Martes", "Mi&eacute;rcoles", "Jueves", "Viernes", "S&aacute;bado", "Domingo");
var Mes = new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");
var Hoy = new Date();
var Anio = Hoy.getFullYear();

 
/* Termina el script de la Fecha */
 
 
/* Creamos 4 variables para darle formato a nuestro Script */
var Inicio, Script, Final, Total
 
/*En Inicio le indicamos un color de fuente y un tamaño */
Inicio = "<font style='font-size:9px' color='#000000' >"
 
/* En Reloj le indicamos la Hora, los Minutos y los Segundos */
Script = Hora + ":" + Minutos + ":" + Segundos
 
/* En final cerramos el tag de la fuente */
Final = ""
 
/* En total Finalizamos el Reloj uniendo las variables */
Total = Inicio + Script + Final
 
/* Capturamos una celda para mostrar el Reloj */
document.getElementById('Fecha_Reloj').innerHTML = Total
 
/* Indicamos que nos refresque el Reloj cada 1 segundo */
setTimeout("actualizaReloj()",1000) 
}



function theRotator() {
	//Set the opacity of all images to 0
	$('div#rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div#rotator ul li:first').css({opacity: 1.0});
		
	
	
}



 // Initialize version 1.0 of Google AJAX API
 google.load("language", "1");

 function translate(lang,texto_traducido,texto_original) {

   var source = document.getElementById(texto_original).innerHTML;
   var len = source.length;

   // Google Language API accepts 500 characters per request 
   var words = 2000;

   // This is for English pages, you can change the
   // sourcelang variable for other languages
   var sourcelang = "es";
   document.getElementById(texto_traducido).innerHTML = "";
 
   for(i=0; i<=(len/words); i++) {

     google.language.translate (source.substr(i*words, words),
                 "es", lang, function (result) {
					 	   
     if (!result.error) {
		 
     document.getElementById(texto_traducido).innerHTML
           = document.getElementById(texto_traducido).innerHTML
           + result.translation;
    } }); }  
	

  // Hide the text written in the original language
  document.getElementById(texto_traducido).style.display = 'block';
  document.getElementById(texto_original).style.display = 'none';
  return false;
 }
 
  function original() {
	  for(var i=0; i<35;i++)
	  {
		  if(document.getElementById("Texto"+i+"_t")!=null)
		  {
			 document.getElementById("Texto"+i+"_t").style.display='none';
  			 document.getElementById("Texto"+i+"").style.display = 'block';
		  }
	   }
	   
	   	 if( document.getElementById("cuota2")!=null)
		  document.getElementById("cuota2").style.display='block';
		  
		  if( document.getElementById("cuota")!=null)
		 document.getElementById("cuota").style.display='none';
		 
		  
		 
		 
		    	 if( document.getElementById("p1_mxn")!=null)
		  document.getElementById("p1_mxn").style.display='block';
		  
		   if( document.getElementById("p1_usd")!=null)
		  document.getElementById("p1_usd").style.display='none';
		  
		  if( document.getElementById("cuota")!=null)
		 document.getElementById("cuota").style.display='none';
		 
		  if( document.getElementById("fen")!=null)
		 document.getElementById("fen").style.display='none';
		   if( document.getElementById("fes")!=null)
		 document.getElementById("fes").style.display='block';
	       //  document.getElementById("Video_fr").style.display='none';
		   
	document.getElementById("Video_es").style.display='block';
	document.getElementById("Video_en").style.display='none';
	//document.getElementById("Video_fr").style.display='none';

  return false;
 }

 function traducir(lang){

	

	 for(var i=0; i<35;i++)
	  {
		  if(document.getElementById("Texto"+i+"_t")!=null)
		  {
			  
				 translate(lang,"Texto"+i+"_t","Texto"+i+"");  
				 
		  }
	  }
	 if(lang=="en")
	 {
		if( document.getElementById("Video_en")!=null)
	 	 document.getElementById("Video_en").style.display='block';
		 

		 if( document.getElementById("Video_es")!=null)
		 document.getElementById("Video_es").style.display='none';
		 
		 if( document.getElementById("p1_usd")!=null)
		  document.getElementById("p1_usd").style.display='block';
		  	
		  
		  if( document.getElementById("p1_mxn")!=null)
		  document.getElementById("p1_mxn").style.display='none';
		


		 
		 if( document.getElementById("cuota")!=null)
		  document.getElementById("cuota").style.display='block';
		  
		  if( document.getElementById("cuota2")!=null)
		 document.getElementById("cuota2").style.display='none';
		 
		   if( document.getElementById("fen")!=null)
		 document.getElementById("fen").style.display='block';
		   if( document.getElementById("fes")!=null)
		 document.getElementById("fes").style.display='none';
	
		 
	     //    document.getElementById("Video_fr").style.display='none';
	 }
	else if(lang=="fr")
	{
	 	 //document.getElementById("Video_fr").style.display='block';
		 document.getElementById("Video_en").style.display='none';
	         document.getElementById("Video_es").style.display='none';
	}
	else
	{
		 if( document.getElementById("Video_es")!=null)
		document.getElementById("Video_es").style.display='block';
		
		 if( document.getElementById("Video_en")!=null)
		 document.getElementById("Video_en").style.display='none';
		 
		 
		 if( document.getElementById("cuota2")!=null)
		  document.getElementById("cuota2").style.display='block';
		  
		  if( document.getElementById("cuota")!=null)
		 document.getElementById("cuota").style.display='none';
	       //  document.getElementById("Video_fr").style.display='none';
	}

 }





