 DDItem = function(id, sGroup, config) {

    if (id) {
        this.init(id, sGroup, config);
        this.initFrame();
    }

    var s = this.getDragEl().style;
    s.borderColor = "transparent";
    s.backgroundColor = "#f6f5e5";
    s.opacity = 0.76;
    s.filter = "alpha(opacity=76)";
	
	
};

YAHOO.extend( DDItem, YAHOO.util.DDProxy);

 DDItem.prototype.startDrag = function(x, y) {

    var dragEl = this.getDragEl();
    var clickEl = this.getEl();
    dragEl.innerHTML = clickEl.innerHTML;
    dragEl.className = clickEl.className;
    dragEl.style.color = clickEl.style.color;
    dragEl.style.border = "1px solid blue";

};

 DDItem.prototype.endDrag = function(e) {
    // disable moving the linked element
};

 DDItem.prototype.onDrag = function(e, id) {

};

 DDItem.prototype.onDragDrop = function(e, id) {
   contentProcessor.reorderXML();
   Emulator.Init();
};

 DDItem.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));

    if (YAHOO.util.Event.getPageY(e) < mid) {
        var el2 = this.getEl();
        var p = el.parentNode;
		if (p.id == 'listGroup') {
           p.insertBefore(el2, el);
		}
    }
};

 DDItem.prototype.onDragEnter = function(e, id) {

};

 DDItem.prototype.onDragOut = function(e, id) {

};

 DDItem.prototype.toString = function() {
    return this.id;
};


/////////////////////////////////////////////////////////////////////////////

 DDItemBoundary = function(id, sGroup, config) {
    if (id) {
        this.init(id, sGroup, config);
        this.isBoundary = true;
    }
};

YAHOO.extend( DDItemBoundary, YAHOO.util.DDTarget);

 DDItemBoundary.prototype.toString = function() {
    return "DDItemBoundary " + this.id;
};

