var _top = 100;
var _height = 200;

function RunKEFU(kfhtml) {
    if (typeof jQuery === "undefined") {
        //alert("jQuery 不存在");
        return;
    }
    var div = $(document.createElement("div")).css({ left: "-157px", border: "none", top: _top, position: "absolute", zIndex: "999998" });
    var dbody = $(document.createElement("div")).css({ position: "relative", width: "189px" });
    var d2 = $(document.createElement("div")).css({ float: "left", width: "157px", backgroundColor: "#fff", height: "100%" });
    var body = $(document.createElement("div")).css({ height: "100%" });
    var btitle = $(document.createElement("div")).css({ width: "157px", height: "39px", background: "url('kefu/img3-5_2.png')", overflow: "hidden" });
    var bbbody = $(document.createElement("div")).css({ width: "157px", height: _height, background: "url('kefu/img3-5_3.png')", overflow: "hidden" });
    var bbottom = $(document.createElement("div")).css({ width: "157px", height: "8px", background: "url('kefu/img3-5_4.png')", overflow: "hidden" });
    var bcondiv = $(document.createElement("div")).css({ width: "141px", margin: "2px 0px 0px 8px", fontSize: "12px", overflow: "hidden", backgroundColor: "#fff", height: _height });
    var d3 = $(document.createElement("div")).css({ float: "left", width: "32px", background: "none", height: "100%", overflow: "hidden" });
    var hideshow = $(document.createElement("div")).css({ marginLeft: "0px", zIndex: "999999", height: "139px", width: "32px", top: (_height / 2 - 40), position: "absolute", background: "url('kefu/img3-5_1.png')", overflow: "hidden" });
    $(bbbody).append(bcondiv);
    $(body).append(btitle).append(bbbody).append(bbottom);
    $(d2).append(body);
    $(d3).append(hideshow);
    $(dbody).append(d2).append(d3);
    $(div).append(dbody);
    $(document.body).append(div);

    /*********************************************/
    $(hideshow).mouseenter(function () {
        $(div).animate({ left: "0px" }, 100)
        $(hideshow).animate({ marginLeft: "-5px" }, 100)
    })

    $(dbody).mouseleave(function () {
        $(div).animate({ left: "-157px" }, 100)
        $(hideshow).animate({ marginLeft: "0px" }, 100)
    })
    $(window).scroll(function () {
        var s = $(window).scrollTop();
        alert(s)
        $(div).animate({ top: (s + _top) }, 10)
    })
    $(bbbody).html(kfhtml)
}

