///////////////////////////////////////////////////////////////////
//Funciones Básicas del Sitio WEb UNEG
//Dirección de Informática
//Nombre: FuncionesUNEG.js
//Fecha de Cración: 01/10/2002
//Creado por: Ing. Tobías Bolívar
//Ultima Modificación: 01/10/2002
//Ultimo en Modificar: Ing. Tobías Bolívar
//Escriba esta instrucción despues de etiqueta </title> en su 
//págiba Web para llamar a las funciones: <SCRIPT src="Applet/FuncionesUNEG.js"><SCRIPT>
///////////////////////////No Editar sin Permiso///////////////////
//<!--
function imprimirPag()
{
  if (confirm("¿Desea imprimir la página?")) 
   {  window.print();}
}

function MM_displayStatusMsg(msgStr) {
  status=msgStr;
  document.MM_returnValue = true;
}

function AbrirNuevaVentana(URL,NombVentana,Formato) {
  window.open(URL,NombVentana,Formato);
}

function Abrir_ventana (pagina) {
var opciones="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=800,height=530,top=0,left=0";
    //if (navigator.appName=="Microsoft Internet Explorer")
	//   opciones=opciones + ",fullscreen=yes"
    window.open(pagina,"",opciones);
}

function MostrarFecha()
{//Formato: Miercoles 20 Mayo, 2002 

 var Fecha=new Date();
 var FormatoFecha;
 var Mes;

 if (Fecha.getDay()==0) 
    FormatoFecha="Domingo";
 if (Fecha.getDay()==1) 
    FormatoFecha="Lunes";
 if (Fecha.getDay()==2) 
    FormatoFecha="Martes";
 if (Fecha.getDay()==3) 
    FormatoFecha="Miercoles";
 if (Fecha.getDay()==4) 
    FormatoFecha="Jueves";
 if (Fecha.getDay()==5) 
    FormatoFecha="Viernes";
 if (Fecha.getDay()==6) 
    FormatoFecha="Sábado";
 FormatoFecha=FormatoFecha + ", " + Fecha.getDate() + " de ";
 if (Fecha.getMonth()==0) 
    Mes="Enero";
 if (Fecha.getMonth()==1) 
    Mes="Febrero";
 if (Fecha.getMonth()==2) 
    Mes="Marzo";
 if (Fecha.getMonth()==3) 
    Mes="Abril";
 if (Fecha.getMonth()==4) 
    Mes="Mayo";
 if (Fecha.getMonth()==5) 
    Mes="Junio";
 if (Fecha.getMonth()==6) 
    Mes="Julio";
 if (Fecha.getMonth()==7) 
    Mes="Agosto";
 if (Fecha.getMonth()==8) 
    Mes="Septiembre";
 if (Fecha.getMonth()==9) 
    Mes="Octubre";
 if (Fecha.getMonth()==10) 
    Mes="Noviembre";
 if (Fecha.getMonth()==11) 
    Mes="Diciembre";
 FormatoFecha=FormatoFecha + Mes + " de ";
 //Para Netscape: Otra forma de obterner el año
 //Anno=Fecha.toLocaleString(); //13
 //Anno=Anno.substring(Anno.length, Anno.length-16);
 //Anno=Anno.substring(Anno.length-9, 3);
 //Para Microsoft Internet Explorer  y Netscape usa la función getFullYear en 
 //lugar de la función getYear
   
 FormatoFecha=FormatoFecha + Fecha.getFullYear() + " - Estado Bolívar, Venezuela";
 return(FormatoFecha); 
}

function EsNumero(Dato)
{
  var CadenaNumeros="0123456789";
  var EsteCaracter;
  var Contador=0;
  for (var i=0; i < Dato.length; i++)
   {
    EsteCaracter = Dato.substring(i, i+1);
    if (CadenaNumeros.indexOf(EsteCaracter)!=-1)
       Contador++;
   }
  if (Contador == Dato.length)
     return(true);
  else
     return(false);
}

function FechaDeHoy()
{//Formato: dd/mm/aaaa 

 var Fecha=new Date();
 var Mes=Fecha.getMonth() + 1;
 var Dia= Fecha.getDate();
 var Dia2;
 var Mes2;
 if (Fecha.getDate() <10)
     Dia2="0" + Dia;
 else
     Dia2=Dia;
 if (Fecha.getMonth() <9)
     Mes2="0" + Mes;
 else
     Mes2=Mes;	 
 return(Dia2 + "/" + Mes2 + "/" + Fecha.getFullYear());
}

//-->
