﻿function ir(url) {

    window.location = url;

}

function buscar() { 

    var txtbusca = document.getElementById("ctl00_txtBuscar");
    window.location = '?b=' + txtbusca.value;  
}

function clicar(e) {

    if (e.which || e.keyCode) {
        if ((e.which == 13) || (e.keyCode == 13) || (e.keyCode == 10) || e.which == 10) {
            var btn = document.getElementById('btnbuscar');
            buscar();
            return false;
        }
    } else
    { return true };
}


function setfocus(txt, e) {

    if (e.which || e.keyCode) {
        if ((e.which == 13) || (e.keyCode == 13) || (e.keyCode == 10) || e.which == 10) {
            var campo = document.getElementById(txt);
            campo.focus();
            return false;
        }
    } else
    { return true };
}

function foco(txt) {


    var campo = document.getElementById(txt);
    if (campo != null) {
        campo.focus();
        return false;
    }

}

function clicar(e,txt) {

    if (e.which || e.keyCode) {
        if ((e.which == 13) || (e.keyCode == 13) || (e.keyCode == 10) || e.which == 10) {
            var btn = document.getElementById(txt);
            buscar();
            return false;
        }
    } else
    { return true };
}


function copiar(campo) {


    campo.focus();
    campo.select();
//    therange = campo.createTextRange();
//    therange.execCommand("Copy");


}

