// JavaScript Document
/*--------------------------------------------------------------------------------------------
Función para detectar el ENTER.
--------------------------------------------------------------------------------------------*/
function enter(e) {
  tecla = (document.all) ? e.keyCode : e.which;
  if (tecla==13) return true;
  else return false;
}
/*--------------------------------------------------------------------------------------------
Función para identificar cuando esta puesto el bloqueo de MAYUSCULAS.
--------------------------------------------------------------------------------------------*/
function capLock(e){
	kc=e.keyCode?e.keyCode:e.which;
	sk=e.shiftKey?e.shiftKey:((kc==16)?true:false);
	if(((kc>=65&&kc<=90)&&!sk)||((kc>=97&&kc<=122)&&sk))
		document.getElementById('caplock').style.visibility = 'visible';
	else 
		document.getElementById('caplock').style.visibility = 'hidden';
}
/*------------------------------------------------------------------------------------------
Funcion para abrir un popup.
--------------------------------------------------------------------------------------------*/
function abrirPopup(url,ancho,alto)
{
  var opciones="toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=0,width="+ancho+",height="+alto;
  var Nueva_ventana;
  var tiempo=new Date();
  var hora=tiempo.getHours();
  var minuto=tiempo.getMinutes();
  var segundo=tiempo.getSeconds();
  var nombre=hora+minuto+segundo;
  Nueva_ventana = window.open(url,nombre,opciones); 
  Nueva_ventana.moveTo(0,0); 
}
