function AbrirVentana2(ruta,ancho,alto,barra) {
MiVentana2=open(ruta,"popus","width="+ancho+",height="+alto+",toolbar=no,menubar=yes,directories=no,status=no,resizable=yes,location=no,scrollbars=yes");
}
function AbrirVentana(ruta,ancho,alto,barra) {
MiVentana2=open(ruta,"Ayuda","width="+ancho+",height="+alto+",toolbar=no,menubar=no,directories=no,statusbar=no,resizable=yes,location=no,scrollbars=yes");
}

function AbrirVentana3(ruta,ancho,alto,barra) {
MiVentana2=open(ruta,"Ayuda","width="+ancho+",height="+alto+",toolbar=no,menubar=no,directories=no,statusbar=no,resizable=no,location=no,scrollbars=no");
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}

<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->

/*<!--  REDIRECCIONAMIENTO DE PAGINAS A VER SI ESTA VEZ SALE!!! 
//var pagina="pag_tcr.php?incluir=consumos&content=consumos&modo=usuario";  
function redireccionar($url) { 
window.location.href='<?=$url?>';
} 
setTimeout ("redireccionar()", 1);
$url= $dirraiz."pag_tcr.php".$_SERVER['QUERY_STRING'];
print $url;

*/


/*
if (window.Event)
  document.captureEvents(Event.MOUSEUP);

function nocontextmenu() {
  event.cancelBubble = true, event.returnValue = false;

  return false;
} 

function norightclick(e) {
  if (window.Event) {
    if (e.which == 2 || e.which == 3) return false;
  }
  else if (event.button == 2 || event.button == 3) {
    event.cancelBubble = true, event.returnValue = false;
    return false;
  }
}

if (document.layers)
 document.captureEvents(Event.MOUSEDOWN);
 document.oncontextmenu = nocontextmenu;
 document.onmousedown = norightclick;
 document.onmouseup = norightclick;
*/

/************************************************************************************************************
(C) www.dhtmlgoodies.com, February 2006
************************************************************************************************************/	
	
//window.onload = initFormValidation;

//OCULTAR INFO EN STATUSBAR
function hidestatus(){
window.status=''
return true
}

if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT | Event.ONCLICK | Event.ONKEYPRESS)

document.onmouseover=hidestatus
document.onmouseout=hidestatus
document.onclick=hidestatus
document.onkeypress=hidestatus




function show5(){
 if (!document.layers&&!document.all&&!document.getElementById)
 return
 var Digital=new Date()
 var hours=Digital.getHours()
 var minutes=Digital.getMinutes()
 var seconds=Digital.getSeconds()
 var dn="AM" 
 if (hours>12){
 dn="PM"
 hours=hours-12
 }
 if (hours==0)
 hours=12
 if (minutes<=9)
 minutes="0"+minutes
 if (seconds<=9)
 seconds="0"+seconds
//change font size here to your desire
myclock=" "+hours+":"+minutes+":"
 +seconds+" "+dn+""
if (document.layers){
document.layers.liveclock.document.write(myclock)
document.layers.liveclock.document.close()
}
else if (document.all)
liveclock.innerHTML=myclock
else if (document.getElementById)
document.getElementById("liveclock").innerHTML=myclock
setTimeout("show5()",1000)
 }
 
 
 //PARA PONER EN MAYUSCULAS
function upperCase(x)
{
var y=document.getElementById(x).value
document.getElementById(x).value=y.toUpperCase()
}
//PARA PONER EN MAYUSCULAS

 //PARA PONER EN MINUSCULAS
function lowerCase(x)
{
var y=document.getElementById(x).value
document.getElementById(x).value=y.toLowerCase()
}
//PARA PONER EN MINUSCULAS


function soloetras(e) { // 1
    tecla = (document.all) ? e.keyCode : e.which; // 2
			  var DivDestino2 = document.getElementById("DivDestino2");
			  DivDestino2.innerHTML = "<div></div>";
	
    if (tecla==8) return true; // 3 borrar
    if (tecla==27) return true; // 3 escape
    if (tecla==13) return true; // 3 enter
	
    patron =/[A-Za-zñÑ\s]/; // 4
    te = String.fromCharCode(tecla); // 5
	if (!patron.test(te)) {
		if (tecla == 16  || tecla == 20 ||tecla == 192) {  // el || es OR
		return true;
		}else{
	//	alert('Solo se permiten letras')
			  var DivDestino2 = document.getElementById("DivDestino2");
          DivDestino2.innerHTML = "<div id='error'><font style=color:red;>Debe ingresar solamente LETRAS</font></div>";

		return false;
		}
	}
} 

//NO LO VOY A USAR
function valusuario(e) { // 1
    tecla = (document.all) ? e.keyCode : e.which; // 2
    if (tecla==8) return true; // 3 borrar
    if (tecla==27) return true; // 3 escape
    if (tecla==13) return true; // 3 enter

	patron =/[\d\w]/; // 4
    te = String.fromCharCode(tecla); // 5
	if (!patron.test(te)) {
		alert('Solo se permiten letras')
		return false;
	}
}


