﻿// No Mostrar Texto en Barra de Estado

function hidestatus()
{
    window.status=''
    return true
}

if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)

document.onmouseover=hidestatus
document.onmouseout=hidestatus

// Scripts Varios

var nav4 = window.Event ? true : false;
function acceptNumDec(evt){
    // NOTE: Backspace = 8, Enter = 13, '0' = 48, '9' = 57, '.' = 46
    var key = nav4 ? evt.which : evt.keyCode;
    return (key <= 13 || (key >= 48 && key <= 57) || key == 46 || key == 44);
}


function hidestatus()
    {
        window.status=''
        return true
    }
    
function SoloNumeros(e){ 
    if(navigator.appName.indexOf("Netscape")>(-1)){ 
          if (e.keyCode < 48 || e.keyCode > 57){
                e.keyCode=0;
          }
    } 
    if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1)){
          if (e.keyCode < 48 || e.keyCode > 57){
                e.keyCode=0;
          }
    } 
}

function clickButton(e, buttonid){
      var bt = document.getElementById(buttonid); 
      if (typeof bt == 'object'){ 
            if(navigator.appName.indexOf("Netscape")>(-1)){ 
                   
                        bt.click();
                        return false; 

            } 
            if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1)){ 

                        bt.click(); 
                        return false; 

            } 
      } 
}


function clickButton(e, buttonid){
      var bt = document.getElementById(buttonid); 
      if (typeof bt == 'object'){ 
            if(navigator.appName.indexOf("Netscape")>(-1)){ 
                   
                        bt.click();
                        return false; 

            } 
            if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1)){ 

                        bt.click(); 
                        return false; 

            } 
      } 
}

function SetIDEvento(LinkButton, NuevoValor, buttonid)
{
    document.getElementById(LinkButton).value = NuevoValor;
    document.getElementById(buttonid).click();
}

function ValidarCaracteres(textareaControl,maxlength){
    if (textareaControl.value.length > maxlength){
        textareaControl.value = textareaControl.value.substring(0,maxlength);
        alert("Debe ingresar hasta un maximo de "+maxlength+" caracteres");
    }
}

