﻿// 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();
//    document.getElementById('MyButton').onclick();
//    
//    if (bt.dispatchEvent)
//    {
//    var e = document.createEvent("MouseEvents");
//    e.initEvent("click", true, true);
//    bt.dispatchEvent(e);
//    }
//    else
//    {
//    bt.click();
//    }
    
//    alert("si");

//    bt.click(); 
}
