live800_companyID = "119464";
var enterurl = "null", isOldSkin = false, globalWindowAttribute = "toolbar=0,scrollbars=0,location=0,menubar=0,resizable=1,width=570,height=424";
jid = "2093642811";
var live800_baseUrl = "chat16.live800.com", live800_baseHtmlUrl = "chat16.live800.com", live800_baseWebApp = "/live800", live800_baseChatHtmlDir = "/chatClient";
live800_configID = "39707";
live800_configContent = "live800_float=1&live800_online=http%3A%2F%2Fwww.tradehong.com%2Fimages%2Flive800online.gif&live800_offline=http%3A%2F%2Fwww.tradehong.com%2Fimages%2Flive800offline.gif&live800_floatToRight=1&live800_floatTop=150&live800_floatSide=5&live800_switch=0&live800_closeIcon=0";
(function() {
	function k(a) {
		for ( var b = document.getElementsByTagName("*"), c = b.length, e = [], d = 0; d < c; d++)
			b[d].className.match(RegExp("(^|\\s)" + a + "(\\s|$)"))
					&& e.push(b[d]);
		return e
	}
	function l(a, b) {
		var c = new Date;
		c.setTime(c.getTime() + 2592E6);
		document.cookie = a + "=" + escape(b)
	}
	function m(a) {
		this.topSide = parseInt(a.getAttribute("lim:top"));
		this.floatRight = parseInt(a.getAttribute("lim:float"));
		this.side = parseInt(a.getAttribute("lim:side"));
		this.element = a;
		this.init()
	}
	var n = function(a) {
		if (a.indexOf("MSIE") > 0) {
			a = a.match(/msie([^;]+);/i);
			if (parseFloat(a[1]) <= 6)
				return true
		}
		return false
	}(navigator.userAgent), i = document.location.protocol == "https:" ? "https://"
			: "http://";
	m.prototype = {
		init : function() {
			var a = this.element.style, b = navigator.userAgent;
			a.position = "absolute";
			a.zIndex = "2147483647";
			a.top = this.topSide + "px";
			if (b.toLowerCase().indexOf("360se") > -1)
				this.isBlock = true;
			else if (b.toLowerCase().indexOf("theworld") > 0)
				this.isBlock = true;
			this.floatRight == 1 ? a.right = this.side + "px"
					: a.left = this.side + "px";
			var c = this;
			setInterval(function() {
				c.lock.call(c)
			}, 20)
		},
		lockTop : function(a, b, c, e, d) {
			e = e.top + d.topSide;
			d = (e - parseInt(a.style.top)) / 20;
			if (this.isBlock)
				d = e - parseInt(a.style.top);
			e = parseInt(a.style.top) + d;
			if (e + b.height < c.height)
				a.style.top = e + "px"
		},
		lockLeft : function(a, b, c) {
			b = (b.left + c.side - parseInt(a.style.left)) / 20;
			a.style.left = parseInt(a.style.left) + b + "px"
		},
		lockRight : function(a, b, c) {
			if (b.left == 0) {
				b = c.side;
				b = (Math.abs(b) - Math.abs(parseInt(a.style.right))) / 20;
				a.style.right = Math.abs(parseInt(a.style.right)) + b + "px"
			} else if (!n) {
				b = b.left - c.side;
				b = (Math.abs(b) - Math.abs(parseInt(a.style.right))) / 20;
				a.style.right = -(Math.abs(parseInt(a.style.right)) + b) + "px"
			}
		},
		lock : function() {
			var a = this.element, b = this.currentPosition(a);
			this.windowDimension();
			var c = this.scrollPosition(), e = this.pageDimension();
			this.lockTop(a, b, e, c, this);
			this.floatRight == 1 ? this.lockRight(a, c, this) : this.lockLeft(
					a, c, this);
			if (this.isBlock)
				if (this.lastTop != a.style.top) {
					a.style.visibility = "hidden";
					this.lastTop = a.style.top
				} else
					a.style.visibility = "visible"
		},
		currentPosition : function(a) {
			return {
				top : a.offsetTop,
				left : a.offsetLeft,
				width : a.offsetWidth,
				height : a.offsetHeight
			}
		},
		windowDimension : function() {
			if (typeof innerWidth != "undefined" && innerWidth != 0
					&& typeof innerHeight != "undefined" && innerHeight != 0)
				return {
					width : innerWidth,
					height : innerHeight
				};
			var a = document;
			return {
				width : Math.min(a.body.clientWidth,
						a.documentElement.clientWidth),
				height : Math.min(a.body.clientHeight,
						a.documentElement.clientHeight)
			}
		},
		scrollPosition : function() {
			var a = document;
			return {
				top : Math.max(a.body.scrollTop, a.documentElement.scrollTop),
				left : Math
						.max(a.body.scrollLeft, a.documentElement.scrollLeft)
			}
		},
		pageDimension : function() {
			var a = document;
			return {
				width : Math.max(a.body.scrollWidth,
						a.documentElement.scrollWidth),
				height : Math.max(a.body.scrollHeight,
						a.documentElement.scrollHeight)
			}
		}
	};
	window.limIconClose = function(a) {
		a = a.parentNode;
		if (a.className.indexOf("lim_float_icon") == -1)
			a = a.parentNode;
		a.style.visibility = "hidden"
	};
	var o = function(a) {
		function b(f) {
			return f.toString(16).toUpperCase()
		}
		if (a == null || a == "")
			return "";
		for ( var c = "", e = 0, d, g = a.length; e < g; e++) {
			d = a.charCodeAt(e);
			if (d < 16)
				c += "%0" + d.toString(16).toUpperCase();
			else if (d < 128)
				c += d == 32 ? "+" : d >= 48 && d <= 57 || d >= 65 && d <= 90
						|| d >= 97 && d <= 122 ? a.charAt(e) : "%" + b(d);
			else {
				if (d < 2048)
					c += "%" + b(192 + (d >> 6));
				else {
					c += "%" + b(224 + (d >> 12));
					c += "%" + b(128 + (d >> 6) % 64)
				}
				c += "%" + b(128 + d % 64)
			}
		}
		return c
	};
	window.openChat = function(a) {
		try {
			parent.closeMini()
		} catch (b) {
		}
		var c = i + live800_baseUrl + live800_baseWebApp
				+ live800_baseChatHtmlDir + "/chatbox.jsp?";
		c += "companyID=" + a.getAttribute("lim:company");
		if (typeof jid != "undefined")
			c += "&jid=" + jid;
		if (a.getAttribute("lim:operator"))
			c += "&operatorId=" + a.getAttribute("lim:operator");
		if (a.getAttribute("lim:skill"))
			c += "&skillId=" + a.getAttribute("lim:skill");
		c += "&enterurl=" + o(document.URL);
		if (typeof trustfulInfo != "undefined")
			c += "&info=" + trustfulInfo;
		c += "&tm=" + (new Date).getTime();
		var e = globalWindowAttribute;
		a.win = window.open(c, a.getAttribute("lim:company") + "chatbox", e);
		return false
	};
	window.openChat2 = function() {
		var a=["119464","",""];
		try {
			parent.closeMini()
		} catch (b) {
		}
		var c = i + live800_baseUrl + live800_baseWebApp
				+ live800_baseChatHtmlDir + "/chatbox.jsp?";
		c += "companyID=" + a[0];
		if (typeof jid != "undefined")
			c += "&jid=" + jid;
		if (a[1])
			c += "&operatorId=" + a[1];
		if (a[2])
			c += "&skillId=" + a[2];
		c += "&enterurl=" + o(document.URL);
		if (typeof trustfulInfo != "undefined")
			c += "&info=" + trustfulInfo;
		c += "&tm=" + (new Date).getTime();
		var e = globalWindowAttribute;
		a.win = window.open(c, a[0] + "chatbox", e);
		return false
	};
	try {
		if (parent && parent.document.body.getAttribute("lim:initchat") == "1")
			return
	} catch (p) {
	}
//	(function() {
//		var a;
//		a: {
//			a = k("lim_float_icon");
//			if (a.length == 0) {
//				a = [];
//				if (typeof live800_configContent == "undefined"
//						|| typeof live800_companyID == "undefined")
//					a = false;
//				else {
//					if (typeof live800_configContent != "undefined") {
//						a = live800_configContent.split("&");
//						var b = [];
//						if (null != a) {
//							for ( var c = [], e = 0; e < a.length; e++) {
//								if (typeof a[e] == "string")
//									c = a[e].split("=");
//								b[c[0]] = c[1]
//							}
//							a = b
//						} else
//							a = []
//					} else
//						a = void 0;
//					a.company = live800_companyID;
//					b = {
//						company : a.company,
//						"float" : typeof a.live800_floatToRight != "undefined" ? a.live800_floatToRight
//								: 1,
//						side : typeof a.live800_floatSide != "undefined" ? a.live800_floatSide
//								: 5,
//						top : typeof a.live800_floatTop != "undefined" ? a.live800_floatTop
//								: 150,
//						close : typeof a.live800_closeIcon != "undefined" ? a.live800_closeIcon
//								: 0,
//						online : typeof a.live800_online != "undefined" ? a.live800_online
//								: "",
//						offline : typeof a.live800_offline != "undefined" ? a.live800_offline
//								: ""
//					};
//					if (typeof a.live800_operator != "undefined")
//						b.operator = a.live800_operator;
//					if (typeof a.live800_skill != "undefined")
//						b.skill = a.live800_skill;
//					a = b
//				}
//				if (!a) {
//					a = false;
//					break a
//				}
//				b = "<div class='lim_float_icon' lim:company='" + a.company
//						+ "' lim:float='" + a["float"] + "' lim:close='"
//						+ a.close + "' lim:side='" + a.side + "' lim:top='"
//						+ a.top + "' lim:online='" + a.online
//						+ "' lim:offline='" + a.offline + "'";
//				if (typeof a.operator != "undefined")
//					b += " lim:operator='" + a.operator + "'";
//				if (typeof a.skill != "undefined")
//					b += " lim:skill='" + a.skill + "'";
//				b += "></div>";
//				document.write(b);
//				a = k("lim_float_icon")
//			}
//			a = a
//		}
//		var d, g;
//		if (a) {
//			c = i + live800_baseUrl + live800_baseWebApp
//					+ "/SurferServer?cmd=111";
//			var f, h;
//			for (e = 0; e < a.length; e++) {
//				b = a[e];
//				d = "";
//				f = c;
//				if (b.getAttribute("lim:company")) {
//					f += "&companyID=" + b.getAttribute("lim:company");
//					d += "lim:company='" + b.getAttribute("lim:company") + "' "
//				}
//				if (b.getAttribute("lim:online"))
//					f += "&online=" + b.getAttribute("lim:online");
//				if (b.getAttribute("lim:offline"))
//					f += "&offline=" + b.getAttribute("lim:offline");
//				if (b.getAttribute("lim:operator")) {
//					f += "&operatorId=" + b.getAttribute("lim:operator");
//					d += "lim:operator='" + b.getAttribute("lim:operator")
//							+ "' ";
//					l("operatorId", b.getAttribute("lim:operator"))
//				}
//				if (b.getAttribute("lim:skill")) {
//					f += "&skillId=" + b.getAttribute("lim:skill");
//					d += "lim:skill='" + b.getAttribute("lim:skill") + "' ";
//					if (live800_companyID == "65654"
//							|| live800_companyID == "66181")
//						if (typeof window["lim:skills"] != "undefined")
//							window["lim:skills"].push(b
//									.getAttribute("lim:skill"));
//						else
//							window["lim:skills"] = [ b
//									.getAttribute("lim:skill") ];
//					else
//						l("skillId", b.getAttribute("lim:skill"))
//				}
//				f += "&tm=" + (new Date).getTime();
//				g = b.getAttribute("lim:close");
//				h = "";
//				if (g && g == "1")
//					h = "<div style='background:transparent;overflow:visible;position:relative;z-index:2147483647;clear:both;' onclick='limIconClose(this);'><img src='"
//							+ i
//							+ live800_baseUrl
//							+ live800_baseWebApp
//							+ "/images/close.gif' onmouseover='this.src=\""
//							+ i
//							+ live800_baseUrl
//							+ live800_baseWebApp
//							+ "/images/close_hover.gif\"' onmouseout='this.src=\""
//							+ i
//							+ live800_baseUrl
//							+ live800_baseWebApp
//							+ "/images/close.gif\"' style='cursor:pointer;position:absolute;top:-6px;"
//							+ (b.getAttribute("lim:float") == 1 ? "left"
//									: "right") + ":-6px;'/></div>";
//				h += "<div style='position:relative;z-index:2147483647;'><a href='javascript:void(0)' onclick='return false;'><img src='"
//						+ f
//						+ "' border='0' style='cursor:pointer;' "
//						+ d
//						+ " onclick='openChat(this);'/></a></div>";
//				if (b.getAttribute("lim:flash")
//						&& b.getAttribute("lim:flash") == "1") {
//					g = b;
//					f = f;
//					d = d;
//					h = i + live800_baseUrl + live800_baseWebApp
//							+ "/chatClient/images/mask.gif";
//					var j = '<object id="inviteFlash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'
//							+ g.getAttribute("lim:width")
//							+ '" height="'
//							+ g.getAttribute("lim:height") + '" >';
//					j += '<param name="movie" value="'
//							+ f
//							+ '" /><param name="quality" value="high" /><param name="wmode" value="opaque">';
//					j += '<embed src="' + f + '" quality="high" width="'
//							+ g.getAttribute("lim:width") + '" height="'
//							+ g.getAttribute("lim:height")
//							+ '" wmode="opaque" name="movie"';
//					j += ' type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"/></object>';
//					j += "<div "
//							+ d
//							+ ' onclick="openChat(this);" style="cursor:pointer;z-index:1001;top:0;left:0;position:absolute;"><img height="'
//							+ g.getAttribute("lim:height") + '" width="'
//							+ g.getAttribute("lim:width") + '" src="' + h
//							+ '" border="0"/></div>';
//					h = j
//				}
//				b.innerHTML = h;
//				new m(b)
//			}
//		}
//	})()
})();

