﻿function hellofordefault() {
    if (document.getElementById('TxtKeyWord').value == "") {
        alert("请输入关键字！")
    }
    else {
        if (document.getElementById('SelectSearchType').value == "SelLocal") {
            window.location.href = "Search/List.aspx?CID=00049&CID1=00001&CID2=00049&keystring=" + encodeURI(document.getElementById('TxtKeyWord').value);
        }
        if (document.getElementById('SelectSearchType').value == "SelSites") {
            window.open("FormSubmit/GovGroupSearch.aspx?word=" + document.getElementById('TxtKeyWord').value);
        }
        if (document.getElementById('SelectSearchType').value == "SelNet") {
            window.open("FormSubmit/NetSearch.aspx?word=" + document.getElementById('TxtKeyWord').value);
        }
    }
}
function AddvanceSearchfordefault() {
    window.location.href = "Search/List.aspx?CID=00049&CID1=00001&CID2=00049&keystring=" + document.getElementById('TxtKeyWord').value;
}

function hello() {
    if (document.getElementById('TxtKeyWord').value == "") {
        alert("请输入关键字！")
    }
    else {
        if ($("loginUl").innerHTML == "本站") {
            window.location.href = "../Search/List.aspx?CID=00049&CID1=00001&CID2=00049&keystring=" + encodeURI(document.getElementById('TxtKeyWord').value);
        }
        if ($("loginUl").innerHTML == "政府网站群") {
            window.open("../FormSubmit/GovGroupSearch.aspx?word=" + document.getElementById('TxtKeyWord').value);
        }
        if ($("loginUl").innerHTML == "互联网") {
            window.open("../FormSubmit/NetSearch.aspx?word=" + document.getElementById('TxtKeyWord').value);
        }
    }
}
function AddvanceSearch() {
    window.location.href = "../Search/List.aspx?CID=00049&CID1=00001&CID2=00049&keystring=" + document.getElementById('TxtKeyWord').value;
}

function Pressenter(e) {
    var KeyNumber
    if (window.HTMLElement)//W3C eg. FF、konqueror 、opera 、 netscape、Safari 
    {
        KeyNumber = e.which;
    }
    else if (document.all)//IE
    {
        KeyNumber = e.keyCode;
    }
    if (KeyNumber == 13) {
        hello();
        return false;
    }
}

