var ddrag = false;
YAHOO.example.DDList = function (id, sGroup, config) {
    var lockvar = dEvent[idPlace(id)][8];
    if (calLocked == false && lockvar != "locked" && allowEdit) {
        if (id) {
            this.init(id, sGroup, config);
            this.initFrame();
            this.logger = this.logger || YAHOO;
        }
        var s = this.getDragEl().style;
        s.borderColor = "transparent";
        s.backgroundColor = "#f6f5e5";
        s.opacity = 0.76;
        s.filter = "alpha(opacity=76)";
    }
};
YAHOO.extend(YAHOO.example.DDList, YAHOO.util.DDProxy);
YAHOO.example.DDList.prototype.startDrag = function (x, y) {
    if (calLocked == false && allowEdit) {
        ddrag = true;
        this.logger.log(this.id + " startDrag");
        var dragEl = this.getDragEl();
        var clickEl = this.getEl();
        dragEl.className = clickEl.className;
        dragEl.style.color = clickEl.style.color;
        dragEl.style.border = "1px solid #fff";
        dragEl.style.fontFamily = "Arial, sans-serif";
        dragEl.style.fontSize = "9px";
        dragEl.style.padding = "0 0 4px 0";
    }
};
YAHOO.example.DDList.prototype.endDrag = function (e) {
    ddrag = false;
    if (the_state == true) {
        eventUpdateDate();
        eventOrder(the_event);
        the_state = false;
    }
};
YAHOO.example.DDList.prototype.onDragDrop = function (e, id) {
    YAHOO.log("DROP: " + id, "warn");
};
YAHOO.example.DDList.prototype.onDrag = function (e, id) {};
YAHOO.example.DDList.prototype.onDragOver = function (e, id) {
    var el;
    if ("string" == typeof id) {
        el = YAHOO.util.DDM.getElement(id);
    } else {
        el = YAHOO.util.DDM.getBestMatch(id).getEl();
    }
    var mid = YAHOO.util.DDM.getPosY(el) + (Math.floor(el.offsetTop / 2));
    this.logger.log("mid: " + mid);
    if (ddrag == true && calLocked == false && allowEdit) {
        var el2 = this.getEl();
        var p = el.parentNode;
        the_state = true;
        the_event = el2.id;
        the_date = p.id;
        p.insertBefore(el2, el);
    }
};
YAHOO.example.DDList.prototype.onDragEnter = function (e, id) {};
YAHOO.example.DDList.prototype.onDragOut = function (e, id) {};
YAHOO.example.DDList.prototype.toString = function () {
    return "DDList " + this.id;
};
YAHOO.example.DDListBoundary = function (id, sGroup, config) {
    if (id) {
        this.init(id, sGroup, config);
        this.logger = this.logger || YAHOO;
        this.isBoundary = true;
    }
};
YAHOO.extend(YAHOO.example.DDListBoundary, YAHOO.util.DDTarget);
YAHOO.example.DDListBoundary.prototype.toString = function () {
    return "DDListBoundary " + this.id;
};

