var objGrid, sSort;
function Sort(ord) {
    window.location.replace(ord);
    return false;
};
function Filter() {
    var qry = new String("?");
    var s = new Array("id", "cod", "title", "class", "date", "party");

    var o = objGrid.getElementsByTagName("INPUT");

    for (var i = 0; i < 6; i++)
        try {
        if (o[i].value) qry += (s[i] + '=' + o[i].value + '&');
    } catch (ex) { };

    if (sSort) qry += ('sort=' + sSort + '&');
    qry = qry.substr(0, qry.length - 1);

    //window.location.search = qry;
    window.location.replace(qry);
    return false;
};
function clearFilters() { window.location.replace("?"); return false; };
function GetEnter(e) {
    if (!e) e = event;

    if (e.keyCode == 13) {
        Filter();
        return false;
    } else {
        return true;
    }
};
function init() {
    //    obj = document.getElementById("koko");
    document.onkeydown = GetEnter;
};
window.onload = init;