var D = Detail = {};
Detail.show = function(a, b, d, g, e, j, h, l, m, k, o) {
    b = decodeURIComponent(b);
    h = decodeURIComponent(h);
    l = "";
    l += '<div class="bg_tm"></div>';
    l += '<div class="win_content" id="div_tip_detail"><dl><dt>' + b + "</dt><dd>";
    l += j > 0 && e > 0 ? '<p class="p_1"><span class="star star' + Math.round(e / 2) + '"><strong>' + e + "</strong></span><em>[" + j + "</em></p>": "";
    
    if ((a == "" || a == "") && h != "") {
       
        l += "<p><span>" + h + "&nbsp;</span></p>"
    } else if (a == "tv" && h != "") {
       
        l += "<p><span>" + h + "&nbsp;</span></p>"
    } else if (a == "anime" && h != "") {
        a = h.split(" ");
       
    }
    if (g != "") l += "<p><span>" + g + "&nbsp;</span></p>";
    if (d != "") l += "<p><span>" + d + "&nbsp;</span></p>";
    l += "</dd>";
    l += "</dl>";
    l += "</div>";
    document.getElementById("div_tip_detail").innerHTML = l;
    d = KK.position(event.srcElement);
    g = document.getElementById("movie_info");
    g.style.display = "";
    if (o == 1) {
        g.style.top = d.Top - 144 + "px";
        g.style.left = d.Left > 1E3 ? d.Left - 220 + "px": event.srcElement.width == 100 || event.srcElement.width == 104 ? d.Left + 110 + "px": d.Left - 103 + "px"
    } 
};
Detail.hide = function() {
    document.getElementById("movie_info").style.display = "none"
};
var KK = {};
KK.position = function(a) {
    for (var b = {
        Top: 0,
        Left: 0
    }; a;) {
        b.Top += a.offsetTop;
        b.Left += a.offsetLeft;
        a = a.offsetParent
    }
    return b
};

kkCoreExt = {};
with(kkCoreExt) {
    kkCoreExt.History = function() {
        this.lastPos = 0;
        this.G_ITEMS_CHAR = "@@";
        this.G_GROUP_CHAR = "|"
    };   
}

var G_CORE_HISTORY = new kkCoreExt.History;
isIE = navigator.appName.indexOf("Microsoft") != -1;
if (window.Event && !isIE) {
    var SearchEvent = function() {
        for (var a = SearchEvent.caller; a != null;) {
            var b = a.arguments[0];
            if (b) if (String(b.constructor).indexOf("Event") > -1) return b;
            a = a.caller
        }
        return null
    };
    window.constructor.prototype.__defineGetter__("event",
    function() {
        return SearchEvent()
    });
    Event.prototype.__defineSetter__("returnValue",
    function(a) {
        a || this.preventDefault();
        return a
    });
    Event.prototype.__defineSetter__("cancelBubble",
    function(a) {
        a && this.stopPropagation();
        return a
    });
    Event.prototype.__defineGetter__("clientX",
    function() {
        return this.pageX
    });
    Event.prototype.__defineGetter__("clientY",
    function() {
        return this.pageY
    });
    Event.prototype.__defineGetter__("keyCode",
    function() {
        return this.which
    });
    Event.prototype.__defineGetter__("button",
    function() {
        return this.which
    });
    Event.prototype.__defineGetter__("srcElement",
    function() {
        for (var a = this.target; a.nodeType != 1;) a = a.parentNode;
        return a
    });
    Event.prototype.__defineGetter__("offsetX",
    function() {
        return this.layerX
    });
    Event.prototype.__defineGetter__("offsetY",
    function() {
        return this.layerY
    });
    Event.prototype.attachEvent = function(a, b) {
        this.addEventListener(a.substring(2), b, true)
    };
    Event.prototype.detachEvent = function(a, b) {
        this.removeEventListener(a.substring(2), b, true)
    };
    window.constructor.prototype.attachEvent = function(a, b) {
        this.addEventListener(a.substring(2), b, true)
    };
    window.constructor.prototype.detachEvent = function(a, b) {
        this.removeEventListener(a.substring(2), b, true)
    };
    document.constructor.prototype.attachEvent = function(a, b) {
        this.addEventListener(a.substring(2), b, true)
    };
    document.constructor.prototype.detachEvent = function(a, b) {
        this.removeEventListener(a.substring(2), b, true)
    };
    Element.prototype.attachEvent = function(a, b) {
        this.addEventListener(a.substring(2), b, true)
    };
    Element.prototype.detachEvent = function(a, b) {
        this.removeEventListener(a.substring(2), b, true)
    };
    HTMLElement.prototype.attachEvent = function(a, b) {
        this.addEventListener(a.substring(2), b, true)
    };
    HTMLElement.prototype.detachEvent = function(a, b) {
        this.removeEventListener(a.substring(2), b, true)
    }
}
