﻿function ChangePageSize(town, gid, sid, sort) {
    var dlPageSize = document.getElementById('cphMain_CatalogBody_gvGoods_dlPageSize');
    if (dlPageSize != null) {
        var pgsize = dlPageSize.options[dlPageSize.selectedIndex].value;
        window.location = "/" + town + "/cat/" + gid + "/" + sid + "/1/" + sort + "/" + pgsize;
    }
}
function ChangePageSearch(town, gid, sid) {
    var txtword = document.getElementById('Head1_txtWord').value;
    if (txtword != null) {
        txtword = txtword.replace(" ","_");
        //alert(txtword);
        if (txtword == '') {
            window.location = "/" + town + "/search/nothing";
        } else {

            if (gid > 0) {
                if (sid > 0) {
                    window.location = "/" + town + "/search/" + gid + "/" + sid + "/" + txtword;
                } else {
                    window.location = "/" + town + "/search/" + gid + "/0/" + txtword;
                }
            } else {
                window.location = "/" + town + "/search/" + txtword;
            }
        }
    } else {
        window.location = "/" + town + "/search/nothing";
    }
}
function ChangePageRequest(town) {
    var txtword = document.getElementById('txtReq').value;
    if (txtword != null) {
        if (txtword == '') {
            window.location = "/" + town;
        } else {
                window.location = "/" + town + "/request/" + txtword;
        }
    } else {
        window.location = "/" + town;
    }
}

