<public:component tagName="part">
	<public:method name="setMode" />
	<public:property name="mode" get="getDesignMode"/>
	<public:attach event=onmousemove onevent="checkMove();" />
	<public:event id="evSD" name="startDrag" />
</public:component>
<script language="javascript">
//  this all needs to change to meta-data driven e.g., isMoveable
var m_designMode = false

function getDesignMode() {
	return m_designMode;
}

function checkMove() {
	if (event.button==1 && m_designMode) {
		var el = event.srcElement
		while (el!=null && el.className!="pheader")  // TODO (P3) - change to check for pHeader within compound class names
		{
			el = el.parentElement
		}
		
		if (el!=null) 
		{	
		  //alert(event.button);
		  
			oEvent = createEventObject();
			oEvent.result = element;
			m_designmode=false;
			evSD.fire(oEvent);
				//alert(oEvent.result);
		}
	}
	
}

function setMode(v) {
  m_designMode = v;	
}
</script>