/* Scripts usados en el portal */
/*
Fecha de la cabecera (fecha jalada de la maquina de cada usuario no del servidor)
*/
<!--
var pong;
function makeArray(n){
  this.length = n;
  for (i=1;i<=n;i++){
    this[i]=0;
  }
  return this;
}
// Funcion que muestra la fecha estándar
function displayDate() {
  var this_month = new makeArray(12);
  this_month[0]  = "Enero";
  this_month[1]  = "Febrero";
  this_month[2]  = "Marzo";
  this_month[3]  = "Abril";
  this_month[4]  = "Mayo";
  this_month[5]  = "Junio";
  this_month[6]  = "Julio";
  this_month[7]  = "Agosto";
  this_month[8]  = "Setiembre";
  this_month[9]  = "Octubre";
  this_month[10] = "Noviembre";
  this_month[11] = "Diciembre";

  var this_day_e = new makeArray(7);
  this_day_e[0]  = "Domingo";
  this_day_e[1]  = "Lunes";
  this_day_e[2]  = "Martes";
  this_day_e[3]  = "Miércoles";
  this_day_e[4]  = "Jueves";
  this_day_e[5]  = "Viernes";
  this_day_e[6]  = "Sábado";

  var today = new Date();
  var day   = today.getDate();
  var month = today.getMonth();
  var year  = today.getYear();
  var dia = today.getDay();
    if (year < 1000) {
       year += 1900; }
  return( " " + this_day_e[dia] + ", " + day + " de " + this_month[month] + " de " + year);
}
// -->
/*
Funciòn que activa el buscador en la pagina de inicio
reutilizado del portal anterior
*/
function fncBuscar()  {
	if (document.getElementById("txtTermino").value != "") {document.frm.submit();}
	else{alert("Escriba el termino a buscar");document.getElementById("txtTermino").focus();return;}
}
/*
Menu Desplegable V1.0
 Tutorial descargado de www.Alistapart.com
*/
Desplegable = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("NavPrincipal");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
}
node.onmouseout=function() {
this.className=this.className.replace(" over", "");
}
}
}
}
}
/*
 Tabla usable V 1.0
 Descargado de www.Alistapart.com
 escrito por Chris Heilmann para alistapart.
*/
function TablaUsable()
{
if (document.getElementById && document.createTextNode)
{
var tables=document.getElementsByTagName('table');
for (var i=0;i<tables.length;i++)
{
if(tables[i].className=='Datos')
{
var trs=tables[i].getElementsByTagName('tr');
for(var j=0;j<trs.length;j++)
{
if(trs[j].parentNode.nodeName=='TBODY')
{
trs[j].onmouseover=function(){this.className='regla';return false}
trs[j].onmouseout=function(){this.className='';return false}
}
}
}
}
}
}

/*
 Ventana Emergente V1.0
 Modifique las variables según sus necesidades
 agregue --> onload="DefaultPopUp()" <-- en algún
 elemento dentro de <body> en el html.
*/
var URI='http://www.minjus.gob.pe/avisos/emergente24Dic2007.html';
var Nombre='DefaultPopUp';
var Atributos='width=380,height=420,left=110,top=20,scrollbars=no,location=no';

function DefaultPopUp(){
window.open(URI,Nombre,Atributos);
return false;
}
/*
  Ventana Emergente para la galeria de fotos
  agregue: onclick="GaleriaPopUp()" target="emergente"
  dentro del tag <a> --USADO EN CASO FUJIMORI-- USADO EN PERDIDA DE DOMINIO
*/
function GaleriaPopUp(){
  window.open(this.href,"emergente","width=778,height=480,left=50,top=40,scrollbars=yes,location=no");
  return false;
}

