function DOMWindow(id,c) {
	var o=new DomElement(id,'wdgWindow')
	document.body.appendChild(o.elm)

	o.titleBar=new DomElement(id+'tb','wdgTitlebar')

	o.appendChild(o.titleBar)

	o.titleBar.setHTML(c)
	o.titleBar.setWH(o.getW()-5,20)
	
	o.setXY=function(x,h) { this.canvas.setXY(x,y) }
	o.setWH=function(w,h) {
		if (w<200) w=200
		if (h<200) h=200
		this.setWH(w,h)
	}

	DragManager.manage(o.titleBar,o)
	return o
}

