﻿//-->
////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
//Get请求
function remoteGetCall(url, func, callback) {
    var client = new HttpClient();
    client.isAsync = true;
    client.callback = callback;
    client.makeGetRequest(url + '?function=' + escape(func));
}
//Post请求
function remotePostCall(url, func, payload, callback) {
    var client = new HttpClient();
    client.isAsync = true;
    client.callback = callback;
    client.makePostRequest(url + '?function=' + escape(func), payload);
}

function initdateqymc() {
    var qymc = document.getElementById("textfield");
    qymc.value = "";
}
function submitkeyword() {
    var keyword = document.getElementById("textfield").value;
    if (keyword.length == 0 || keyword == '企业搜索') {
        alert("请输入查询关键字");
    }
    else {
        var f = document.createElement("form");
        document.body.appendChild(f);
        var i = document.createElement("input");
        i.type = "hidden";
        f.appendChild(i);
        i.value = keyword;
        i.name = "SearcherCom";
        f.method = "post";
        f.action = getDomainWep() + "SearcherCom.aspx";
        f.submit();

    }
}
function getDomainWep() {
    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;

}
