// Opciones para la parte superior de todas las paginas web del sitio

var all;
var month;
var period;
var day;
function time(){
var currentDate=new Date()

hour=currentDate.getHours()
min=currentDate.getMinutes()
sec=currentDate.getSeconds()
date=currentDate.getDate()
switch(currentDate.getMonth()){
        case 0:month="Enero";break;
        case 1:month="Febrero";break;
        case 2:month="Marzo";break;
        case 3:month="Abril";break;
        case 4:month="Mayo";break;
        case 5:month="Junio";break;
        case 6:month="Julio";break;
        case 7:month="Agosto";break;
        case 8:month="Septiembre";break;
        case 9:month="Octubre";break;
        case 10:month="Noviembre";break;
        case 11:month="Diciembre";break;
}

switch(currentDate.getDay()){
        case 0:day="Domingo";break;
        case 1:day="Lunes";break;
        case 2:day="Martes";break;
        case 3:day="Miercoles";break;
        case 4:day="Jueves";break;
        case 5:day="Viernes";break;
        case 6:day="Sabado";break;
}
if(sec<10){sec="0"+sec}
if(min<10){min="0"+min}

if(hour>12){hour-=12;period="pm"} else {period="am"}
if(currentDate.getHours()==12){period="pm"}
if(currentDate.getHours()==24){period="am"}

var all= day+", "+date+" de "+month+". "+hour+":"+min+":"+sec+period
window.status=all
window.setTimeout("time()",300)
}
time()


function MostrarFecha()
   {
   var nombres_dias = new Array("Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado")
   var nombres_meses = new Array("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre")

   var fecha_actual = new Date()

   dia_mes = fecha_actual.getDate()			//dia del mes
   dia_semana = fecha_actual.getDay()			//dia de la semana
   mes = fecha_actual.getMonth() + 1
   anio = fecha_actual.getYear()

   if (anio < 100)					//pasa el año a 4 digitos
      anio = '19' + anio
   else if ( ( anio > 100 ) && ( anio < 999 ) ) {	//efecto 2000
      var cadena_anio = new String(anio)
      anio = '20' + cadena_anio.substring(1,3)
   }
document.write(nombres_dias[dia_semana] + ", " + dia_mes + " de " + nombres_meses[mes - 1] + " de " + anio)
   }

document.write('<table width="100%" background="imagenes/fondo_top.jpg" cellpadding="0" align="rigth" cellspacing="0"> ');

document.write('  <tr height="60">');
document.write('      <td width="100%" colspan="6" align="right" >');
document.write('    <font color="#666666" face="Arial" size="1">');
MostrarFecha();
document.write('&nbsp;&nbsp;    </font>');
document.write('    </td>');

document.write('  </tr>');


document.write('  <tr valign="top" align="rigth" height="32">');


document.write('    <td width="400" align="left">');
document.write('<!-- ');
document.write('  &nbsp;   <a href="UnderConstruction.html" title="English version of the site.">');
document.write('    <img border="0" src="imagenes/en_ingles.gif" width="40" height="30" align="center"></a>');
document.write('    <a href="EmConstrucao.html" title="Versão em Português do site.">');
document.write('    <img border="0" src="imagenes/en_portugues.gif" width="40" height="30" align="center"></a>');
document.write('-->');
document.write('    </td>');

document.write('    <td width="32" align="center" valign="bottom">');
document.write('    <a href="Index.php" onMouseOver="entra1()" onMouseOut="sale1()" title="Volver a la Pagina Inicial de Aduanas.">');
document.write('    <img border="0" src="imagenes/Home.gif" width="30" height="30" align="center" name="boton1"></a>');
document.write('    </td>');

document.write('    <td width="32" align="center" valign="bottom">');
document.write('    <a href="PreguntasFrecuentes.php?Pregunta=" onMouseOver="entra2()" onMouseOut="sale2()" title="De aca se accede a la informacion referente a consultas realizadas al organismo por usuarios del sitio.">');
document.write('    <img border="0" src="imagenes/FAQ.gif" width="30" height="30" align="center" name="boton2"></a>');
document.write('    </td>');

document.write('    <td width="32" align="center" valign="bottom">');
document.write('    <a href="Busqueda.php?Texto=" onMouseOver="entra3()" onMouseOut="sale3()" title="Buscador de documentos avanzado dentro del sitio.">');
document.write('    <img border="0" src="imagenes/Buscador.gif" width="30" height="30" align="center" name="boton3"></a>');
document.write('    </td>');

document.write('    <td width="32" align="center" valign="bottom">');
document.write('    <a href="Glosario.php?Texto=A" onMouseOver="entra4()" onMouseOut="sale4()" title="Glosario de terminología aduanera">');
document.write('    <img border="0" src="imagenes/Glosario.gif" width="30" height="30" align="center" name="boton4"></a>');
document.write('    </td>');

document.write('    <td width="32" align="center" valign="bottom">');
document.write('    <a href="mailto:info@aduanas.gub.uy" target="_blank" onMouseOver="entra5()" onMouseOut="sale5()" title="Contáctese vía correo electrónico con Relaciones Públicas de la Dirección Nacional de Aduanas.">');
document.write('    <img border="0" src="imagenes/Contactenos.gif" width="30" height="30" align="center" name="boton5"></a>');
document.write('    </td>');

document.write('    <td width="32" align="center" valign="bottom">');
document.write('    &nbsp; &nbsp;  ');
document.write('    </td>');

document.write('<!-- ');
document.write('    <td width="90" align="center" valign="bottom">');
document.write('    <map name="FPMap0"> ');
document.write('    <area href="EmConstrucao.html" title="Versão em Português do site" shape="rect" coords="2, 2, 45, 29"> ');
document.write('    <area href="UnderConstruction.html" title="English version of the site" shape="rect" coords="48, 2, 89, 28"></map> ');
document.write('    <img border="0" src="Imagenes/en_otro_idioma.gif" width="90" height="30" usemap="#FPMap0"></p> ');
document.write('    </td>');
document.write('-->');

document.write('<!-- ');
document.write('    <td width="30" align="center" valign="bottom">');
document.write('    <a href="EnConstruccion.html" target="output" title="Acceda desde aca a Relaciones Publicas y Difucion de Aduanas.">');
document.write('    <img border="0" src="imagenes/RRPP.gif" width="46" height="30" align="center"></a>');
document.write('    </td>');
document.write('-->');

document.write('  </tr>');


document.write('  <tr height="10">');
document.write('      <td width="100%" align="right" >');
document.write('    <font color="#3F6B97" face="Arial" size="1">');
document.write('&nbsp; &nbsp;    </font>');
document.write('    </td>');
document.write('  </tr>');

document.write('</table>');

document.title="Dirección Nacional de Aduanas - República Oriental del Uruguay";

// Manejo de cambio de imagenes en botones

// Carga de imagen cuando el ratón pasa por encima del boton 1
function entra1() {
  var boton_off = new Image();
  boton_off.src = "imagenes/home2.gif";
  document.images["boton1"].src = boton_off.src;
}

// Carga de imagen cuando el ratón abandona el área de la imagen del boton 1
function sale1() {
  var boton_on = new Image();
  boton_on.src = "imagenes/home.gif";
  document.images["boton1"].src = boton_on.src;
}

// Carga de imagen cuando el ratón pasa por encima del boton 2
function entra2() {
  var boton_off = new Image();
  boton_off.src = "imagenes/faq2.gif";
  document.images["boton2"].src = boton_off.src;
}

// Carga de imagen cuando el ratón abandona el área de la imagen del boton 2
function sale2() {
  var boton_on = new Image();
  boton_on.src = "imagenes/faq.gif";
  document.images["boton2"].src = boton_on.src;
}

// Carga de imagen cuando el ratón pasa por encima del boton 3
function entra3() {
  var boton_off = new Image();
  boton_off.src = "imagenes/buscador2.gif";
  document.images["boton3"].src = boton_off.src;
}

// Carga de imagen cuando el ratón abandona el área de la imagen del boton 3
function sale3() {
  var boton_on = new Image();
  boton_on.src = "imagenes/buscador.gif";
  document.images["boton3"].src = boton_on.src;
}

// Carga de imagen cuando el ratón pasa por encima del boton 4
function entra4() {
  var boton_off = new Image();
  boton_off.src = "imagenes/glosario2.gif";
  document.images["boton4"].src = boton_off.src;
}

// Carga de imagen cuando el ratón abandona el área de la imagen del boton 4
function sale4() {
  var boton_on = new Image();
  boton_on.src = "imagenes/glosario.gif";
  document.images["boton4"].src = boton_on.src;
}

// Carga de imagen cuando el ratón pasa por encima del boton 5
function entra5() {
  var boton_off = new Image();
  boton_off.src = "imagenes/contactenos2.gif";
  document.images["boton5"].src = boton_off.src;
}

// Carga de imagen cuando el ratón abandona el área de la imagen del boton 5
function sale5() {
  var boton_on = new Image();
  boton_on.src = "imagenes/contactenos.gif";
  document.images["boton5"].src = boton_on.src;
}

// <--- fin de manejo

var sH="<table class=\"menu\" id=\"mainmenu\" cellspacing=\"0\"><tr>";
var p=0;
var j=0;
while(eval("typeof(td_"+ ++j +")!=\"undefined\"")){
	sH+="<td id=\"td_"+j+"\" onmouseover=\"doMenu(this)\" onmouseout=\"ti=setTimeout('clearMenu()',md)\"";
	sH+=(eval("typeof(url_"+j+")!=\"undefined\""))?" onclick=\"runMenu('"+eval("url_"+j)+"')\">":">";
	sH+=eval("td_"+j)+"</td>";
	if (eval("typeof(td_"+j+"_1)!=\"undefined\""))
		pT[p++]="_"+j;
}
sH+="</tr></table>";
document.write(sH);
for(var q=0;typeof(pT[q])!="undefined";q++){
	sT=pT[q];
	sH="";
	j=0;
	sH+="<table class=\"menu\" id=\"tbl"+sT+"\" cellspacing=\"0\" style=\"top:"+getCoord(sT);
	while (eval("typeof(td"+sT+"_"+ ++j +")!=\"undefined\"")){
		sH+="<tr><td id=\"td"+sT+"_"+j+"\" onmouseover=\"doMenu(this)\" onmouseout=\"ti=setTimeout('clearMenu()',md)\"";
		sH+=(eval("typeof(url"+sT+"_"+j+")!=\"undefined\""))?" onclick=\"runMenu('"+eval("url"+sT+"_"+j)+"')\">":">";
		sH+=eval("td"+sT+"_"+j)+"</td></tr>";
		if (eval("typeof(td"+sT+"_"+j+"_1)!=\"undefined\""))
			pT[p++]=sT+"_"+j;
	}
	sH+="</table>";
	document.write(sH);
}
document.getElementById("mainmenu").style.visibility="visible";

