/**
 * @class is a YAHOO.util.DD sublcass wich drag and drop his parent element.
 * additionally on drag action the style will be changed if set.
 *
 * @extends YAHOO.util.DD
 * @constructor
 * @param {String} id the id of the linked element
 * @param {String} sGroup the group of related DragDrop objects
 */
function ddParent(id, sGroup, onDragStyleClass, onStopStyleClass) {

	if (id) {
		// get parent id (window block element) and store it
		this.parentId = document.getElementById(id).parentNode.id;
		
		// invoke init method from superclass with parent id to set parent as
		// drag and drop element
		this.init(this.parentId);
		
		// Set a child element of set element in init method which should be
		// used to initiate the drag operation. In this case the given id
		// vi constructor (window head element) should be initiat the drag operation.
		this.setHandleElId(id);
		
    // css style to use when items are not being hovered over.
    this.onDragClass = onDragStyleClass;

    // css style to use when hovered over
    this.onStopClass = onStopStyleClass;
	}
}

// extend from class DD
ddParent.prototype = new YAHOO.util.DD();

/**
 * Method will be called after drag and drop object is clicked.
 * Set given onDragClass as style class.
 */
ddParent.prototype.startDrag = function(x, y) {
	var el = this.getEl();
	el.className = this.onDragClass;
}

/**
 * Method will be called when done dragging.
 * Set given onStopClass style class.
 */
ddParent.prototype.endDrag = function(e) {
	var el = this.getEl();
	el.className = this.onStopClass;
};