function PainelUtilDom() {
}

PainelUtilDom.prototype = {

	el : null,

	getPainel : function() {
		return this.el;
	},

	inicializaElemento : function(el) {
		this.el = Util.getObj(el);
	},

	criaElemento : function( idElemento ){

		if( Util.isUdf(idElemento) ) {
			var idElemento = "divPainelUtilDom" + Util.getRandomId();
		}

		this.el = document.createElement("DIV");
		this.el.setAttribute("id",idElemento);

		this.el.style.display 	= "none";

		document.body.appendChild(this.el);
	},

	dragDrop : function() {
		if( !Util.isNull(this.el) ) {
			dragDrop.initElement(this.el);
		}
	},

	show : function(o) {

		if( Util.Browser.isIe6() ) {

			var newStyle = new Util.Style("BODY");
				newStyle.setAttribute("margin","0")
				newStyle.setAttribute("padding","0");
				newStyle.setAttribute("height","100%")
				newStyle.setAttribute("overflow","auto");

			Util.CSS.addAttributeStyle(newStyle);

			var newStyle = new Util.Style("HTML");
				newStyle.setAttribute("margin","0")
				newStyle.setAttribute("padding","0");
				newStyle.setAttribute("height","100%")
				newStyle.setAttribute("overflow","auto");

			Util.CSS.addAttributeStyle(newStyle);
	

			this.el.style.position = "absolute";
		} else {
			this.el.style.position = "fixed";
		}

		this.el.style.zIndex 	= "4";

		if( o.fade ) {
			this.noFinal = {
				fade : new AnimationFade( this.el, o.fade )
			}
			this.noFinal.fade.show();
		} else {
			Util.manipulaEl(this.el,"show");
		}

		var xyBrowser = Util.Browser.xy();

		var xTop = xyBrowser[1]/60;

		if( o.top ) {
			this.el.style.top	= xTop + "px";
			this.el.style.left	= 900 + xyBrowser[0] + "px";
		} else {
			this.el.style.top	= o.xy[1] + xTop + "px";
			this.el.style.left	= o.xy[0] + xyBrowser[0] + "px";
		}
	},

	remove : function() {
		Util.manipulaEl(this.el,"remove");
	},

	noFinal : null,

	hide : function() {

		if( this.noFinal != null ) {
			if( this.noFinal.fade )
				this.noFinal.fade.hide();
		} else {
			Util.manipulaEl(this.el,"hide");
		}
	}
}