﻿// JScript 文件
var QQlink = "<div id='QQService' style=\"position:absolute; width:110px;z-index:0;\">";
QQlink += "<table  border='0' cellspacing='0' cellpadding='0' width='110' style='background-color:#ffffff;'>";
QQlink += "<tbody align=left valign=middle>";
QQlink += "<tr><td colspan='4'><img src='images/chat.gif'/></td></tr>";
QQlink += "<tr height='25' ><td style='width:2px;' bgcolor='#E4E5E8'></td><td  style='padding-left:9px;' width='30'><a target=blank href=tencent://message/?uin=1572866261&Site=在线客服&Menu=no><img border=\"0\" SRC=http://wpa.qq.com/pa?p=1:1572866261:4alt=\"点击这里给我发消息\"></a></td><td width='76'><a target=blank href=tencent://message/?uin=1572866261&Site=在线客服&Menu=yes>客服QQ</a></td><td style='width:2px;' bgcolor='#E4E5E8'></td></tr>";
QQlink += "<tr height='25' ><td style='width:2px;' bgcolor='#E4E5E8'></td><td  style='padding-left:9px;' width='30'></td><td width='76'><a href='Detail.aspx?typeid=621'>给我留言</a></td><td style='width:2px;' bgcolor='#E4E5E8'></td></tr>";
QQlink += "<tr><td colspan='4' style='height:2px;' bgcolor='#E4E5E8'></td>";
QQlink += "</tbody>";
QQlink += "</table>";
QQlink += "<div>";
document.write(QQlink);

function Float(id, initX, initY, align) {
    this.startX = (initX) ? initX : 3;
    this.startY = (initY) ? initY : 3;
    this.align = (align) ? align : "left";
    this.x = this.startX;
    this.y = this.startY;

    this.div = document.getElementById(id);

    this.init = function () {
        this.div.style.top = this.startY + "px";
        if (this.align == "left")
            this.div.style.left = this.startX + "px";
        else
            this.div.style.right = this.startX + "px";
    }

    this.refresh = function () {
        this.y += (getRoot().scrollTop + this.startY - this.y) / 8;
        this.div.style.top = this.y + "px";
    }
    this.floating = function (objName) {
        setInterval(objName + '.refresh()', 10);
    }
    this.init();
}

function getRoot() {
    if (document.documentElement && document.body) {
        return (document.documentElement.scrollTop > document.body.scrollTop) ? document.documentElement : document.body;
    } else if (document.documentElement) {
        return document.documentElement;
    } else {
        return document.body;
    }
}

var QQService = new Float('QQService', 5, 405, 'right');
QQService.floating('QQService');



