﻿function $(objname) { return document.getElementById(objname); }
var request = {
    QueryString: function(val) {
        var uri = window.location.search;
        var re = new RegExp("" + val + "=([^&?]*)", "ig");
        return ((uri.match(re)) ? (uri.match(re)[0].substr(val.length + 1)) : null);
    } 
}



function ieResize() {
    var browser = navigator.appName;
    var b_version = navigator.appVersion;
    var ver = parseFloat(b_version);
    if (browser == "Microsoft Internet Explorer") {
        if (ver < 6.9) { document.body.style.width = (document.documentElement.clientWidth < 1000) ? "1000px" : "auto"; }
        else { document.body.style.minWidth = "1000px"; }
    }
}

function opGo(urlstr) {
    window.location = "http://" + window.location.hostname + urlstr;
}

function getText(objname) {
    var reg = /<div id="?\w[^>]*"?>\w*[^<]*<\/div>/ig;
    return $(objname).innerHTML.replace(reg, "");
}
function InitDiscus() {
    return true;
}


var changecity = {
    mode: "iframe",
    url: "changecity.htm",
    ot: "",
    createFrame: function() {
        if (this.ot == "") {
            document.getElementById("all_city").innerHTML = '<iframe id="chf" scrolling="no" width="400" height="210" src="' + this.url + '" frameborder="0"></iframe>';
        }
        else {
            document.getElementById("all_city").innerHTML = '<iframe id="chf" scrolling="no" width="400" height="210" src="' + this.url + "?" + this.ot + '" frameborder="0"></iframe>';
        }
    },
    changeClass: function(className) {
        if (className == "sc") {
            if (!document.getElementById("chf")) {
                this.url = "changecity.htm";
                this.createFrame();
            }
        }
        document.getElementById('all_city').className = className;
    }
}
document.onclick = function() {
    if ($("downlist") != null) $("downlist").className = 'hc';
    try { win.closeToolTipWindow(); } catch (e) { return true; }
}
