﻿function getDomain() {
    var strFullPath = window.document.location.href;

    var strPath = window.document.location.pathname;

    var pos = strFullPath.indexOf(strPath);

    var prePath = strFullPath.substring(0, pos) + "/";
    return prePath;

}

function searchnewcom(searcherType, searcherTypeValue) {
    var keyword = document.getElementById("resutlkeword").value;
    var PageType = document.getElementById("pageid").value;
    document.getElementById("searchid").innerHTML = "数据加载中请稍候....";
    remotePostCall(getDomain() + "Ajax.aspx", "SearcherComInfo", "searcherTypeValue=" + escape(searcherTypeValue) + "&searcherType=" + escape(searcherType) + "&keyword=" + escape(keyword) + "&PageType=" + escape(PageType),
                function(result) {
                    if (result == "No") {

                        alert("没有你想查找的数据");
                    } else {
                        //构造数组 0为查询结果 1为工作年限列表，2为学历列表 3为性虽列表 4为薪资列表 5为分页
                        var resultarr = result.split("fengge");
                        document.getElementById("searchid").innerHTML = resultarr[0];
                        document.getElementById("tdgznx").innerHTML = resultarr[1];
                        document.getElementById("tdxl").innerHTML = resultarr[2];
                        document.getElementById("pageaddress").innerHTML = resultarr[3];
                    }
                });

}

//跳转
function JumpPageNo(PageType) {
    var pagenum = document.getElementById("PageNumID").value;
    var PageCount = document.getElementById("PageCount").value;
    if (pagenum <= PageCount && parseInt(pagenum) > 0) {
        if (parseInt(pagenum) == pagenum) {
            switch (PageType) {
                default:
                    PageName = "";
                    break;
                case "zxqy":
                    PageName = "NewCom";
                    break;
                case "MYClient":
                     PageName = "MYClient";
                     break;
            }
            window.location.href = PageName + "-" + pagenum + ".html";
        }
        else {
            alert("请输入整数");
        }
    }
    else {
        alert("页码范围不对");
    }
}
function GetCodeType(CodeType, Code) {
    searchnewcom(CodeType, Code)
}

