<%-- <script type="text/javascript" src="/Themes/Scripts/jquery-1.8.2.min.js"></script>--%>
<script type="text/javascript">
$(document).ready(function () {
function windowClose() {
window.opener = null;
window.open('', '_top');
window.top.close();
}
var DEFAULT_VERSION = "unknown";
function addContact(d, g, b, e, c, f, h) {
if (d == "") {
d = b
}
var a = "";
var i = checkIMVersion(d + g, b, h);
if (i == "-1") { } else {
if (i == "0") {
if (b == "wangwang" || b == "cnalimam") {
if (d = "cnalichn") {
showAlitalkErrMsg(1)
} else {
if (d = "cntaobao") {
showWangwangErrMsg(1)
}
}
return
}
if (d == "cntaobao") {
a = "WangWang:AddContact?uid=" + e + "&CntSiteId=" + b + "&SiteLogonedUserId=" + g + "&SelfSiteId=" + d + "&gid=" + c + "&verify=" + f + getMoreProperties(h);
execTaobaoShell(a)
} else {
if (d = "cnalichn") {
a = "Alitalk:AddContact?uid=" + e + "&CntSiteId=" + b + "&AliLoginID=" + g + "&AliLoginsiteid=" + d + "&gid=" + c + "&checkcrm=" + getMoreProperties(h);
location = a
}
}
} else {
if (i == "1") {
a = "aliim:addcontact?uid=" + d + g + "&touid=" + b + e + "&gid=" + c + "&verify=" + f + getMoreProperties(h);
execAliimShell(a)
}
}
}
}
function sendClientMsg(e, h, d, b, f, g) {
if (e == "") {
e = d
}
var a = checkIMVersion(e + h, d, g);
if (a == "-1") { } else {
if (a == "0") {
if (d == "wangwang" || d == "cnalimam") {
if (e == "cnalichn") {
sendMsg("cnalichn", h, d, b, f, g)
} else {
if (e == "cntaobao") {
sendMsg("cntaobao", h, d, b, f, g)
} else {
sendMsg("cnalichn", h, d, b, f, g)
}
}
return
}
if (e == "cnkoubei") {
var c = isSupportKouBei();
if (c == 1) {
sendMsg("cnalichn", h, d, b, f, g)
} else {
if (c == 2) {
sendMsg("cntaobao", h, d, b, f, g)
} else {
downloadWangWang(e)
}
}
} else {
if (e != DEFAULT_VERSION) {
sendMsg(e, h, d, b, f, g)
} else {
downloadWangWang(e)
}
}
} else {
if (a == "1") {
sendMsgV6Web(e, h, d, b, f, g)
}
}
}
}
function sendMsg(c, f, b, a, d, e) {
if (c == "chnyahoo") {
newYahooSendMsg(c, f, b, a, d, e)
} else {
if (c == "cntaobao") {
newWangWangSendMsg(c, f, b, a, d, e)
} else {
if (c == "cnalichn") {
newAlitalkSendMsg(c, f, b, a, d, e)
}
}
}
}
function newWangWangSendMsg(d, g, c, b, e, f) {
var a = WangWangVerSupportedSMS("cntaobao");
if (a && e == 4) {
location.href = "wangwang:SendSms?" + b + "&tositeid=" + c + "&suid=" + g + "&status=" + e + getMoreProperties(f)
} else {
location.href = "wangwang:SendIM?uid=" + b + "&tositeid=" + c + "&suid=" + g + "&status=" + e + getMoreProperties(f)
}
}
function newAlitalkSendMsg(d, g, c, b, e, f) {
var a = alitalkVerSupportedSMS("cnalichn");
if (a && e == 4) {
location.href = "Alitalk:SendSms?" + b + "&siteid=" + c + "&tositeid=" + c + "&status=" + e + "&SendLoginedAlitalk=1" + getMoreProperties(f)
} else {
location.href = "Alitalk:SendIM?" + b + "&siteid=" + c + "&AliLoginID=" + g + "&status=" + e + "&SendLoginedAlitalk=1" + getMoreProperties(f)
}
}
function newYahooSendMsg(d, g, c, b, e, f) {
var a = yahooVerSupportedSMS("chnyahoo");
if (a && e == 4) {
location.href = "YahooWW:SendSms?" + b + "&tositeid=" + c + "&status=" + e + getMoreProperties(f)
} else {
location.href = "YahooWW:SendIM?" + b + "&tositeid=" + c + "&status=" + e + getMoreProperties(f)
}
}
function onlinewangWangSendMsg(c, g, a, d, e, h) {
var b = c;
if (c == "" || c == "cnanonym") {
b = a
}
var i = checkIMVersionNoMsg(b);
if (i != "-1") {
if (c == "cnanonym") {
g = ""
}
onlinesendMsg(c, g, a, d, e, h)
} else {
if (c == "cnanonym") {
var f = "http://onlineww.im.alisoft.com/wangwang/webim.jsp?memberid=" + encodeURI(g) + "&targetid=" + encodeURI(a + d) + getMoreProperties(h);
window.open(f)
} else {
downloadWangWang(c)
}
}
}
function startWebwwTaobao() {
window.open("http://webww.taobao.com/wangwang/webww1.htm")
}
function onlinesendMsg(d, g, c, b, e, f) {
if (d == "" || d == "cnanonym") {
d = c
}
var a = checkIMVersionNoMsg(d);
if (a == "-1") { } else {
if (a == "0") {
if (c == "wangwang" || c == "cnalimam") {
if (d = "cnalichn") {
showAlitalkErrMsg(1)
} else {
if (d = "cntaobao") {
showWangwangErrMsg(1)
}
}
return
}
if (d == "chnyahoo") {
onlinenewYahooSendMsg(d, g, c, b, e, f)
} else {
if (d == "cntaobao") {
onlinenewWangWangSendMsg(d, g, c, b, e, f)
} else {
if (d == "cnalichn") {
onlinenewAlitalkSendMsg(d, g, c, b, e, f)
}
}
}
} else {
if (a == "1") {
command = "aliim:sendmsg?uid=" + d + g + "&touid=" + c + b + "&siteid=" + c + "&status=" + e + getMoreProperties(f);
execAliimShell(command)
}
}
}
}
function onlinenewAlitalkSendMsg(d, g, c, b, e, f) {
var a = alitalkVerSupportedSMS("cnalichn");
if (a && e == 4) {
location.href = "Alitalk:SendSms?" + b + "&siteid=" + c + "&status=" + e + "&AliLoginID=" + g + "&AliLoginsiteid=" + d + "&SendLoginedAlitalk=1" + getMoreProperties(f)
} else {
location.href = "Alitalk:SendIM?" + b + "&siteid=" + c + "&status=" + e + "&AliLoginID=" + g + "&AliLoginsiteid=" + d + "&SendLoginedAlitalk=1" + getMoreProperties(f)
}
}
function onlinenewWangWangSendMsg(d, g, c, b, e, f) {
var a = WangWangVerSupportedSMS("cntaobao");
if (a && e == 4) {
location.href = "wangwang:SendSms?" + b + "&tositeid=" + c + "&status=" + e + "&suid=" + g + getMoreProperties(f)
} else {
location.href = "wangwang:SendIM?uid=" + b + "&tositeid=" + c + "&status=" + e + "&suid=" + g + getMoreProperties(f)
}
}
function onlinenewYahooSendMsg(d, g, c, b, e, f) {
var a = yahooVerSupportedSMS("chnyahoo");
if (a && e == 4) {
location.href = "YahooWW:SendSms?" + b + "&tositeid=" + c + "&status=" + e + "&suid=" + g + getMoreProperties(f)
} else {
location.href = "YahooWW:SendIM?uid=" + b + "&tositeid=" + c + "&status=" + e + "&suid=" + g + getMoreProperties(f)
}
}
function onlinewangWangSend(c, g, b, a, e, f) {
alert(a + " aaaaa");
if (a != "" || a != null || a != "undefined") {
var d = (document.getElementById ? true : false);
if (window.aliwangwangSendmsgShowFrame) {
if (d) {
alert(a + " isDOM");
document.getElementById("aliwangwangSendmsgShowFrame").src = "http://www.im.alisoft.com/webim/common/online_dispatch_v6.html?fromsite=" + c + "&fromid=" + g + "&sendsite=" + b + "&sendid=" + a + "&imstatus=" + e + "&moreProperties=" + escape(f)
} else {
alert(a + " bbbbb");
window.aliwangwangSendmsgShowFrame.location = "http://www.im.alisoft.com/webim/common/online_dispatch_v6.html?fromsite=" + c + "&fromid=" + g + "&sendsite=" + b + "&sendid=" + a + "&imstatus=" + e + "&moreProperties=" + escape(f)
}
} else {
alert(a);
onlinesendMsg(c, g, b, a, e, f + "&fenliu=0")
}
}
}
function startWW(e, c, d) {
var b = e;
var a = checkIMVersionNoMsg(b);
if (a == "-1") {
return
} else {
if (a == "0") {
if (e == "cntaobao") {
if (c == "") {
location.href = "WangWang:"
} else {
location.href = "WangWang:Login?suid=" + c + "&autologin=0"
}
}
if (e == "chnyahoo") {
location.href = "yahooWW:"
}
if (e == "cnalichn") {
location.href = "Alitalk:"
}
} else {
if (a == "1") {
var f = "aliim:login?uid=" + e + c + "&autologin=0&weblogin=1";
execAliimShell(f)
}
}
}
}
function CloseWinWithoutParent() {
var b = navigator.userAgent;
var c = navigator.appName == "Microsoft Internet Explorer" ? true : false;
if (c) {
var a = parseFloat(b.substring(b.indexOf("MSIE ") + 5, b.indexOf(";", b.indexOf("MSIE "))));
if (a < 5.5) {
window.opener = null;
window.close()
} else {
if (a < 7) {
window.opener = null;
window.close()
} else {
window.opener = null;
window.close()
}
}
} else {
window.close()
}
}
function isInstalledClient(c) {
try {
var b = new ActiveXObject("aliimx.wangwangx");
if (b != null) {
return 1
}
} catch (d) { }
var a = getSite(c);
if (a == "cntaobao") {
if (newCheckWangWangInstalled() != DEFAULT_VERSION) {
return 1
}
} else {
if (a == "cnalichn") {
if (newCheckAlitalkInstalled() != DEFAULT_VERSION) {
return 1
}
} else {
if (a == "chnyahoo") {
if (newCheckYahooInstalled() != DEFAULT_VERSION) {
return 1
}
} else {
return 0
}
}
}
return 0
}
function checkIMVersionNoMsg(c) {
var d = -1;
try {
var b = new ActiveXObject("aliimx.wangwangx");
if (b != null) {
d = 1
}
} catch (f) { }
var a = c;
if (a == "cntaobao") {
if (newCheckWangWangInstalled() != DEFAULT_VERSION) {
return 0
}
} else {
if (a == "cnalichn") {
if (newCheckAlitalkInstalled() != DEFAULT_VERSION) {
return 0
}
} else {
if (a == "chnyahoo") {
if (newCheckYahooInstalled() != DEFAULT_VERSION) {
return 0
}
} else {
return d
}
}
}
return d
}
function newCheckAlitalkInstalled() {
var a = DEFAULT_VERSION;
try {
var c = new ActiveXObject("AlitalkSetup.Install");
if (c != null) {
a = "cnalichn"
}
} catch (b) { }
return a
}
function newCheckWangWangInstalled() {
var a = DEFAULT_VERSION;
try {
var c = new ActiveXObject("WangWangX.WangWangObj");
if (c != null && "1.6.06.0525" != c.GetVersionStr()) {
a = "cntaobao"
}
} catch (b) { } finally {
c = null
}
return a
}
function newCheckYahooInstalled() {
var a = DEFAULT_VERSION;
try {
var c = new ActiveXObject("YahooWangWangX.WangWangObj");
if (c != null) {
a = "chnyahoo"
}
} catch (b) { }
return a
}
function checkIMVersion(d, a, f) {
var g = "-1";
try {
var c = new ActiveXObject("aliimx.wangwangx");
if (c != null) {
g = 1
}
var i = c.IsLogin(d);
if (i == "true") {
return "1"
}
} catch (h) { }
var b = getSite(d);
if (b == "") {
b = a
}
if (b == "cntaobao") {
g = checkTaobaoVer(g)
} else {
if (b == "chnyahoo") {
g = checkYahooVer(g)
} else {
if (b == "wangwang" || b == "cnalimam") {
if (g == 1) {
return "1"
} else {
showWanghaoErrMsg(2)
}
} else {
if (b == "enaliint") {
if (g == 1) {
return "1"
} else {
showWanghaoErrMsg(2)
}
} else {
g = checkAlitalkVer(g)
}
}
}
}
return g
}
function checkTaobaoVer(c) {
try {
var f = new ActiveXObject("WangWangX.WangWangObj");
if (f != null) {
var a = f.GetVersionStr();
var b = a.charAt(0);
if (a != null) {
return "0"
} else {
if (c == 1) {
return "1"
} else {
if (c == 1) {
return "1"
} else {
showWangwangErrMsg(0)
}
}
}
} else {
if (c == 1) {
return "1"
} else {
showWangwangErrMsg(1)
}
}
} catch (d) {
if (c == 1) {
return "1"
} else {
showWangwangErrMsg(2)
}
}
}
function checkAlitalkVer(b) {
try {
var d = new ActiveXObject("Ali_Check.InfoCheck");
if (d != null) {
var a = d.GetValueBykey("AliTalkVersion");
if (a != null) {
return "0"
} else {
if (b == 1) {
return "1"
} else {
showAlitalkErrMsg(0)
}
}
} else {
if (b == 1) {
return "1"
} else {
showAlitalkErrMsg(1)
}
}
} catch (c) {
if (b == 1) {
return "1"
} else {
showAlitalkErrMsg(2)
}
}
}
function checkYahooVer(a) {
try {
var c = new ActiveXObject("YahooWangWangX.WangWangObj");
if (c != null) {
return 0
} else {
if (a == 1) {
return "1"
} else {
showYahooErrMsg(1)
}
}
} catch (b) {
if (a == 1) {
return "1"
} else {
showYahooErrMsg(2)
}
}
}