//=======================获取地址栏的值=======================//
function GetParam(paraName, strURL) {
    var rawURL;
    if (strURL == undefined || strURL == "") {
        rawURL = document.location.href.split('#')[0];
    } else {
        rawURL = strURL;
    }
    var result = rawURL.replace(/\?/g, " ").replace(/\&/g, " ");
    var items = result.split(' ');
    var m = new RegExp("^" + paraName + "=", "i");
    var param = "";
    for (var i = 0; i < items.length; i++) {
        var temp = items[i];
        temp = temp.replace(/\s/g, "");
        if (temp == "")
            continue;
        if (temp.match(m)) {
            if (param != "")
                param += ",";
            param += temp.replace(m, "");
        }
    }
    return param;
}

function attach(o, e, f) {
    if (document.attachEvent)
        o.attachEvent("on" + e, f);
    else if (document.addEventListener)
        o.addEventListener(e, f);
}
