﻿//搜索查询
function SiteSearch(send_url, divTgs) {
    var str = $.trim($(divTgs).val());
    if (str.length > 0) {
        window.location.href = send_url + "?keyword=" + encodeURI($(divTgs).val());
    }
   
}

//替换关健字
function ReplaceKeywords(divTgs, keyword) {
    var divHtml = $(divTgs).html();
    var reg = new RegExp("\\" + keyword, "g");
    divHtml = divHtml.replace(reg, "<span style=\"color:#F00;font-weight:normal;\">" + keyword + "</span>");
    $(divTgs).html(divHtml);
}


function comintro() {
    $("#comintro").css({ color: "#00aed5" });
}

function culture() {
    $("#culture").css({ color: "#00aed5" });
}

function news() {
    $("#new").css({ color: "#00aed5" });
}
function job() {
    $("#job").css({ color: "#00aed5" });
} function changecss() {
    $("#a" + getArgs("id")).css({ color: "#00aed5" });
}
function getArgs(strParame) {
    var args = new Object();
    var query = location.search.substring(1); // Get query string
    var pairs = query.split("&"); // Break at ampersand
    for (var i = 0; i < pairs.length; i++) {
        var pos = pairs[i].indexOf('='); // Look for "name=value"
        if (pos == -1) continue; // If not found, skip
        var argname = pairs[i].substring(0, pos); // Extract the name
        var value = pairs[i].substring(pos + 1); // Extract the value
        value = decodeURIComponent(value); // Decode it, if needed
        args[argname] = value; // Store as a property
    }
    return args[strParame]; // Return the object
}
