document.writeln("<div id=\"divSerWin\" class=\"service\">");
document.writeln("<div id=\"divMySer\" class=\"service-close\">");
document.writeln("<div class=\"service-button\" onclick='ClickSer();'></div>");
document.writeln("<div class=\"service-inside\">");
document.writeln("<dl>");
document.writeln("<dt>客服工作时111间</dt>");
document.writeln("<dd class=\"esp_4\">周一至周日</dd>");
document.writeln("<dd class=\"esp_4\">9:00 - 23:00</dd>");
document.writeln("<dt>客服团队</dt>");
document.writeln("<dd><a target=\"_blank\" href=\"http://wpa.qq.com/msgrd?v=3&uin=1035085242&site=www&menu=yes\"><img border=\"0\" src=\"http://wpa.qq.com/pa?p=1:1035085242:51\" alt=\"点击这里给我发消息\" title=\"点击这里给我发消息\"/></a></dd>");
document.writeln("<dd><a target=\"_blank\" href=\"http://wpa.qq.com/msgrd?v=3&uin=1035085242&site=www&menu=yes\"><img border=\"0\" src=\"http://wpa.qq.com/pa?p=1:1035085242:51\" alt=\"点击这里给我发消息\" title=\"点击这里给我发消息\"/></a></dd>");
document.writeln("<dd><a target=\"_blank\" href=\"http://wpa.qq.com/msgrd?v=3&uin=4079489&site=www&menu=yes\"><img border=\"0\" src=\"http://wpa.qq.com/pa?p=2:4079489:51\" alt=\"点击这里给我发消息\" title=\"点击这里给我发消息\"/></a></dd>");
document.writeln("<dd><a href=\"tencent://message/?uin=4079489\">在线客服</a></dd>");
document.writeln("<dd class=\"esp_1\"><a href=\"tencent://message/?uin=4079489\">投诉建议</a></dd>");
document.writeln("<dt>联系电话</dt>");
document.writeln("<dd class=\"esp_3\" title=\"24小时客服电话\">123456789</dd>");
document.writeln("<dt>官方微信</dt>");
document.writeln("<dd title=\"官方微信\" class=\"esp_4\"><img src=\"../images/wx.jpg\"></dd>");
document.writeln("</dl>");
document.writeln("</div>");
document.writeln("</div>");
document.writeln("</div>");

$(document).ready(function(){
    var destDiv = $("#divSerWin");
    var startPos = destDiv.position().top;
    var divHeight = destDiv.outerHeight();
    
    $(window).scroll(function (){
        scrTop = $(window).scrollTop();
        if( startPos < scrTop){
            topPos = startPos+(scrTop - startPos)+10;
            $("#divSerWin").css("position", "absolute").css("top", topPos +"px").css('zIndex', '500');
        }
    });
});

function ClickSer(){
    var obj=$("#divMySer")
    if( obj.attr("class") == "service-open" )
        $("#divMySer").removeClass("service-open").addClass("service-close");
    else
        $("#divMySer").removeClass("service-close").addClass("service-open");
}