if (typeof(HJFloater) != 'function') { function HJFloater(id, imgId, imgStr, imgWidth, imgHeight, alignX, alignY, offsetX, offsetY) { this.id = id; this.imgId = imgId; this.imgStr = imgStr; this.imgWidth = parseInt(imgWidth); this.imgHeight = parseInt(imgHeight); this.alignX = alignX; this.alignY = alignY; this.offsetX = parseInt(offsetX) + 2; this.offsetY = parseInt(offsetY) + 2; this.msoffsetX = 0; this.msoffsetY = 0; this.left = 0; this.top = 0; this.left_last = 0; this.top_last = 0; this.scrollLeft = 0; this.scrollTop = 0; this.documentWidth = 0; this.documentHeight = 0; this.flagmousedown = false; this.isIE = (document.all) ? 1 : 0;this.innerHTML = '
' + this.imgStr + '
';this.init = HJFloater_init; this.float = HJFloater_float; this.popchatwindow = HJFloater_popchatwindow; this.popvoipwindow = HJFloater_popvoipwindow; this.startmove = HJFloater_startmove; this.moving = HJFloater_moving; this.stopmove = HJFloater_stopmove; this.init(); this.float(); } } if (typeof(HJFloater_init) != 'function') { function HJFloater_init() { if (!document.getElementById(this.id)) { if (document.getElementById('HJLiveChatPageScript' )) { var objFloater = document.createElement('div'); objFloater.id = this.id; var objScript = document.getElementById('HJLiveChatPageScript' ); objScript.parentNode.insertBefore(objFloater, objScript); objFloater.innerHTML = this.innerHTML; } else { document.write('
' + this.innerHTML + '
'); } } } } if (typeof(HJFloater_float) != 'function') { function HJFloater_float() { this.scrollLeft = document.body.scrollLeft; this.scrollTop = document.body.scrollTop; if (this.scrollLeft == 0) { this.scrollLeft = document.documentElement.scrollLeft; } if (this.scrollTop == 0) { this.scrollTop = document.documentElement.scrollTop; } this.documentWidth = document.documentElement.clientWidth; this.documentHeight = document.documentElement.clientHeight; if (this.documentWidth == 0) { this.documentWidth = document.body.clientWidth; } if (this.documentHeight == 0) { this.documentHeight = document.body.clientHeight; } try { this.imgWidth = document.getElementById(this.imgId).width; this.imgHeight = document.getElementById(this.imgId).height; } catch(e) { } if (this.msoffsetX == 0 && this.msoffsetY == 0) { if (this.alignX == 'left') { this.left = this.scrollLeft + this.offsetX; } else if (this.alignX == 'right') { if (this.documentWidth > this.imgWidth + this.offsetX) this.left = this.scrollLeft + this.documentWidth - this.imgWidth - this.offsetX; else this.left = this.scrollLeft + this.offsetX; } else { if (this.documentWidth > this.imgWidth) this.left = this.scrollLeft + this.offsetX + this.documentWidth/2 - this.imgWidth/2 ; else this.left = this.scrollLeft + this.offsetX; } if (this.alignY == 'top') { this.top = this.scrollTop + this.offsetY; } else if (this.alignY == 'buttom') { if (this.documentHeight > this.imgHeight + this.offsetY) this.top = this.scrollTop + this.documentHeight - this.imgHeight - this.offsetY; else this.top = this.scrollTop + this.offsetY; } else { if (this.documentHeight > this.imgHeight) this.top = this.scrollTop + this.documentHeight/2 - this.imgHeight/2; else this.top = this.scrollTop + this.offsetY; } }else{ this.top = this.scrollTop + this.offsetY; this.left = this.scrollLeft + this.offsetX; } if (this.left != this.left_last || this.top != this.top_last) { if (document.getElementById(this.id)) { var floater = document.getElementById(this.id); this.innerHTML = '
' + this.imgStr + '
'; floater.innerHTML = this.innerHTML; } this.left_last = this.left; this.top_last = this.top; } } } if(typeof(HJFloater_popchatwindow) != 'function') { function HJFloater_popchatwindow() { var url = 'http://cs.5107.cn/v4/msg/sendmsg.php?ver=401&company=1622&vcwStyle=1&vcwColor=0&vcwLang=gb2312&vcwTitle=%E6%81%92%E8%81%9A%E7%BD%91%E7%AB%99%E4%BC%B4%E4%BE%A3+-+%E5%9C%A8%E7%BA%BF%E6%94%AF%E6%8C%81&vcwCoName=%E5%85%89%E7%8E%89%E7%94%B5%E5%AD%90%E7%81%AF%E6%B3%A1%E5%8E%82&vcwExpire=10&vcwCusTit=Array&vcwLog=&vcwVoice=yes&vcwTitAd=http%3A%2F%2Fvip.5107.cn%2Fv4%2Ftemplates%2Fimages%2Fchat_1_0_ad.gif&vcwLftAdUrl=http%3A%2F%2Fwww.5107.cn&vcwLftAdImg=http%3A%2F%2Fwww.5107.cn&smwStyle=1&smwColor=0&smwTitle=%E6%81%92%E8%81%9A%E7%BD%91%E7%AB%99%E4%BC%B4%E4%BE%A3+-+%E7%A6%BB%E7%BA%BF%E7%95%99%E8%A8%80&smwLftAdUrl=http%3A%2F%2Fwww.5107.cn&smwLftAdImg=http%3A%2F%2Fwww.5107.cn&'; var chatwindow = window.open(url, '_blank', 'toolbar=no,location=no,directories=no,scrollbars=no,menubar=no,width=690,height=543,resizable=no,left=0,top=0, status=no'); chatwindow.focus(); } } if(typeof(HJFloater_popvoipwindow) != 'function') { function HJFloater_popvoipwindow() { var url = 'http://cs.5107.cn/v4/chat/voip.php?company=1622&vwStyle=1&vwColor=0&vwLang='; var voipwindow = window.open(url, '_blank', 'toolbar=no,location=no,directories=no,scrollbars=no,menubar=no,width=400,height=500,resizable=no,left=0,top=0, status=no'); voipwindow.focus(); } } if(typeof(HJFloater_startmove) != 'function') { function HJFloater_startmove() { this.flagmousedown = true; this.msoffsetX = event.clientX - parseInt(this.left); this.msoffsetY = event.clientY - parseInt(this.top); } } if(typeof(HJFloater_moving) != 'function') { function HJFloater_moving() { if (this.flagmousedown) { this.left = event.clientX - this.msoffsetX; this.top = event.clientY - this.msoffsetY; this.offsetX = this.left - this.scrollLeft; this.offsetY = this.top - this.scrollTop this.innerHTML = '
' + this.imgStr + '
'; var floater = document.getElementById(this.id); floater.innerHTML = this.innerHTML; } } } if(typeof(HJFloater_stopmove) != 'function') { function HJFloater_stopmove() { this.flagmousedown = false; } } if (typeof(objNowHJLiveChat_EventObject) == 'undefined') {var objNowHJLiveChat_EventObject = null;} if (typeof(aryHJLiveChat_IconID) == 'undefined') {var aryHJLiveChat_IconID = Array();} if (typeof(aryHJLiveChat_IconObject) == 'undefined') {var aryHJLiveChat_IconObject = Array();} if(typeof(HJLiveChatIcon_getobj) != 'function') { function HJLiveChatIcon_getobj() { objNowHJLiveChat_EventObject = event.srcElement; while (objNowHJLiveChat_EventObject.id.indexOf("idHJLiveChat_") == -1) { objNowHJLiveChat_EventObject = objNowHJLiveChat_EventObject.parentElement; if (objNowHJLiveChat_EventObject == null) { return null; } } if (typeof(objNowHJLiveChat_EventObject.id) != "undefined") { for (var i=0; i <= aryHJLiveChat_IconID.length; i++) { if (objNowHJLiveChat_EventObject.id == aryHJLiveChat_IconID[i]) return aryHJLiveChat_IconObject[i]; } } } } if(typeof(HJLiveChatIcon_startmove) != 'function') { function HJLiveChatIcon_startmove() { var obj = HJLiveChatIcon_getobj(); if (obj != null) { obj.startmove(); } } } if(typeof(HJLiveChatIcon_moving) != 'function') { function HJLiveChatIcon_moving() { var obj = HJLiveChatIcon_getobj(); if (obj != null) { obj.moving(); } } } if(typeof(HJLiveChatIcon_stopmove) != 'function') { function HJLiveChatIcon_stopmove() { var obj = HJLiveChatIcon_getobj(); if (obj != null) { obj.stopmove(); } } } var objHJLiveChat_IconStatus_1622_1 = new HJFloater("idHJLiveChat_IconStatus_1622_1", "HJLiveChat_IconStatic_Img_1622_1", "", 100, 100, "left", "middle", 5, 0);setInterval("objHJLiveChat_IconStatus_1622_1.float();" ,200);aryHJLiveChat_IconID.push("idHJLiveChat_IconStatus_1622_1"); aryHJLiveChat_IconObject.push(objHJLiveChat_IconStatus_1622_1); //document.onmousedown = HJLiveChatIcon_startmove; //document.onmousemove = HJLiveChatIcon_moving; //document.onmouseup = HJLiveChatIcon_stopmove;