function validar(evt)
{
evt = (evt) ? evt : event
var key = (evt.which) ? evt.which : evt.keyCode;
if (key > 47 && key < 58 || key == 8 || key == 45) { return true;}
else {return false;}
}

function validar1(evt)
{
evt = (evt) ? evt : event
var key = (evt.which) ? evt.which : evt.keyCode;
if (key > 92 && key < 200 || key == 8 || key > 64 && key < 91 ) { return true;}
else {return false;}
}

//Para efecto mouse over, muestra otro color cuando se pasa encima el puntero
function MouseOver(id)
{
    id.className="fila_MouseOver";
    id.style.cursor='pointer';
}

function MouseOut(id)
{
    id.className="fila_MouseOut";
    id.style.cursor='default';
}

function MouseOver2(id)
{
    id.className="fila_MouseOver2";
    id.style.cursor='pointer';
}

function MouseOut2(id)
{
    id.className="fila_MouseOut2";
    id.style.cursor='default';
}

function MouseOver3(id)
{
    id.className="fila_MouseOver3";
    id.style.cursor='pointer';
}

function MouseOut3(id)
{
    id.className="fila_MouseOut3";
    id.style.cursor='default';
}

function MouseOver4(id)
{
    id.className="fila_MouseOver4";
    id.style.cursor='pointer';
}

function MouseOut4(id)
{
    id.className="fila_MouseOut4";
    id.style.cursor='default';
}

//Para cerrar ventana del Navegador
function cerrarse(){
window.close()
}

//Cerrr ventanas emergentes con Ajax
function cerrarPopup(pid)
{
document.getElementById(pid).style.visibility = 'hidden'; 
}


//Funciones para Abrir Popups de Distintas Resoluciones
function popUp(URL){
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=650,height=300');");
}

function popUp2(URL){
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=250,height=150');");
}

function popUp3(URL){
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=800,height=450');");
}

function popUp4(URL){
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=600,height=250');");
}

function popUp5(URL){
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=650,height=450');");
}

function popUp6(URL){
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=450,height=225');");
}

function popUp7(URL){
day = new Date();
id = day.getTime();
eval("page = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=350,height=500');");
}

function popUp8(URL){
day = new Date();
id = day.getTime();
eval("page = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=800,height=600');");
}

//Funcion para limitar el texto en un textarea o textbox
function taLimit() { 
var taObj=event.srcElement; 
if (taObj.value.length==taObj.maxLength*1) return false; 
} 
function taCount(visCnt) { 
var taObj=event.srcElement; 
if (taObj.value.length>taObj.maxLength*1) taObj.value=taObj.value.substring(0,taObj.maxLength*1); 
if (visCnt) visCnt.innerText=taObj.maxLength-taObj.value.length; 
} 
