function obtenerDia()
{
	var dia;
	var fecha = new Date();	
	
		dia = fecha.getDate();
	
	return dia;
}

function obtenerMesAnio()
{
	var textomes = new Array (12);
	  textomes[1]="Enero";
	  textomes[2]="Febrero";
	  textomes[3]="Marzo";
	  textomes[4]="Abril";
	  textomes[5]="Mayo";
	  textomes[6]="Junio";
	  textomes[7]="Julio";
	  textomes[7]="Agosto";
	  textomes[9]="Septiembre";
	  textomes[10]="Octubre";
	  textomes[11]="Noviembre";
	  textomes[12]="Diciembre";
	  
	var mes;
	var fecha = new Date();	
	
	var mes=fecha.getMonth() +1 ;
	var anio=fecha.getFullYear();
	
	return  textomes[mes]+ "<br/>" +anio;
}

function horaPaises()
{

	var hCl = 	"<a href=http://www.tinsa.cl target=_blank><li>Chile<br/>"+ calculaHora(-3) +"</a></li>";
	var hAr = 	"<a href=http://www.tinsa.com.ar target=_blank ><li>Argentina<br/>"+calculaHora(-3) +"</a></li>";
	var hPe = 	"<a href=http://www.tinsa.com.pe target=_blank ><li>Per&uacute;<br/>"+calculaHora(-5)+"</a></li>";
	var hMx = 	"<li class=azul>M&eacute;xico<br/>"+ calculaHora(-6) +"</li>";
	//var hUsa = 	"<a href=http://www.tinsa.us target=_blank ><li>USA<br/>"+calculaHora(-5)+"</a></li>";
	var hEs = 	"<a href=http://www.tinsa.es target=_blank ><li>Espa&ntilde;a<br/>"+calculaHora(+1)+"</a></li>";
	var hFr = 	"<a href=http://www.tinsa.fr target=_blank ><li>Francia<br/>"+calculaHora(+1)+"</a></li>";
	var hPr = 	"<a href=http://www.tinsa.es/?section=414 target=_blank ><li>Portugal<br/>"+calculaHora(+0)+"</a></li>";
	
	document.getElementById("prueba_hora").innerHTML  =  hMx + hAr + hPe + hCl + hEs + hFr + hPr;
		   	
	setTimeout("horaPaises()",1000) 
}

function calculaHora( difHoraria )
{
	var fecha = new Date();
	var minutos;
	var utc = fecha.getTime() + (fecha.getTimezoneOffset() * 60000);
	
	var nfecha = new Date(utc + (3600000*difHoraria));
	
		if( nfecha.getMinutes() < 10  )
		{
			minutos = "0"+ nfecha.getMinutes();
		}
		else{
			minutos = nfecha.getMinutes();
		}
	
	return nfecha.getHours() + ":" + minutos + " h" ;
}

function horarioVerano( continente )
{
	var mes1;
	var dia1;
	var mes2;
	var dia2;
	var fecha = new Date();
	
	switch( continente ){
		case "cl":
			mes1 = "marzo";
			dia1 = 14;
			mes2 = "octubre";
			dia2 = 11;
				if( fecha.getMonth() ){
					
				}
				else{
				}
					
		break;
	}	
}


