//var topurl = getquerystring('topurl'); var topurl = request('topurl'); if (topurl != null) { if (topurl.indexof("http") < 0) { topurl = "http://" + topurl; } } var sname = request('sname'); var sitetype = request('sitetype'); var comid = request('comid'); var cid = ''; var toplocation = window.location.host; if (toplocation.indexof("http") < 0) { toplocation = "http://" + toplocation + "/"; } if (toplocation != null) { if (sitetype == 0) { $.ajax({ type: "post", url: "/im/ashx/getcompanyinfo.ashx", data: { "method": "getcid" }, success: function (data) { if (data != "err") { cid = data; document.getelementbyid("col4").src = "http://cmsim.zhuchao.cc/im/immessage_m.htm?toplocation=" + toplocation + "&cid=" + cid; } else { document.getelementbyid("col4").src = "http://cmsim.zhuchao.cc/im/immessage_m.htm?toplocation=" + toplocation; } } }); } } //获取企业信息 if (sitetype == 0) { //筑巢站点 $.ajax({ type: "post", url: "/im/ashx/getcompanyinfo.ashx", data: { "method": "getinfo" }, success: function (data) { if (data != "err" && data != "") { $("#usrinfo").html(data); var qq = document.getelementbyid("cs_qq").innerhtml; if (qq != "") { var str = ""; str += ""; str += ""; $("#usrinfo").html($("#usrinfo").html() + str); } } else if (data == "") { } } }); } //获取url上的参数 function getquerystring(name) { var reg = new regexp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var r = window.location.search.substr(1).match(reg); if (r != null) return unescape(r[2]); return null; } //获取url上的参数 function request(paras) { var url = location.href; var parastring = url.substring(url.indexof("?") + 1, url.length).split("&"); var paraobj = {} for (i = 0; j = parastring[i]; i++) { paraobj[j.substring(0, j.indexof("=")).tolowercase()] = j.substring(j.indexof("=") + 1, j.length); } var returnvalue = paraobj[paras.tolowercase()]; if (typeof (returnvalue) == "undefined") { return ""; } else { return returnvalue; } }