browserVersion = parseInt(navigator.appVersion.charAt(0));
browser = "";
if (navigator.appName == "Netscape")
	browser = "netscape" + browserVersion;
else if (navigator.appName == "Microsoft Internet Explorer")
	browser = "explorer" + browserVersion;

coolBrowser = ((browser == "netscape3") || (browser == "netscape4") || (browser == "explorer4"));
if (coolBrowser)
	imageCache = new Array();
else
	imageCache = null;

sbCount = menuCount = 0;
hInterval = 0;
docLayers = new Array();
docMenus = new Array();
isThumbDragging = false;

function preloadImage(src, w, h)
{
	if (coolBrowser)
	{
		if (w && h)
		{
			var img = new Image(w, h);
			img._w = w;
			img._h = h;
		}
		else
		{
			var img = new Image();
			img._w = img._h = h;
		}

		img.src = src;

		if (imageCache)
			imageCache[imageCache.length] = img;
	}

	return img;
}

function _height()
{
	if (browser == "explorer4")
		return this.handle.offsetHeight;
	else
		return this.handle.document.height;
}

function _width()
{
	if (browser == "explorer4")
		return this.handle.offsetWidth;
	else
		return this.handle.document.width;
}


function _resize(w, h)
{
	if (browser == "explorer4")
	{
		this.handle.style.pixelWidth = w;
		this.handle.style.pixelHeight = h;
	}
	else
		this.handle.resizeTo(w, h);
}

function _move(x, y)
{
	if (browser == "explorer4")
	{
		this.handle.style.pixelTop = y;
		this.handle.style.pixelLeft = x;
	}
	else
		this.handle.moveTo(x, y);

	this.left = x;
	this.top = y;
}

function _moveBy(dx, dy)
{
	if (browser == "explorer4")
	{
		this.handle.style.pixelTop += dy;
		this.handle.style.pixelLeft += dx;
	}
	else
		this.handle.offset(dx, dy);

	this.left += dx;
	this.top += dy;
}

function _setWindowDimensions(w, h)
{
	this.windowW = w;
	this.windowH = h;
}

function _setClipOrg(left, top)
{
	if (left < 0)
		left = 0;
	
	if (left > this.width())
		left = this.width() - 1;
	
	if (top < 0)
		top = 0;
	
	if (top > this.height())
		top = this.height() - 1;

	this.clipT = top;
	this.clipL = left;
	this.clipB = top + this.windowH;
	this.clipR = left + this.windowW;
	//alert(this.clipL + ", " + this.clipT + " - " + this.clipR + ", " + this.clipB);

	if (browser == "explorer4")
		this.handle.style.clip = "rect(" + this.clipT + "," + this.clipR + "," + this.clipB + "," + this.clipL + ")";
	else
	{
		this.handle.clip.top = this.clipT;
		this.handle.clip.left = this.clipL;
		this.handle.clip.bottom = this.clipB;
		this.handle.clip.right = this.clipR;
	}
}

function _clipBy(advX, advY)
{
	this.clipT += advY;
	this.clipB += advY;
	this.clipL += advX;
	this.clipR += advX;

	/*if (this.clipL < 0)
	{
		this.clipL = 0;
		this.clipR = this.windowW;
	}
	else if (this.clipL + this.windowW > this.width())
	{
		this.clipL = this.width() - this.windowW;
		this.clipR = this.clipL + this.windowW;
	}
	else
		this.clipR = this.clipL + this.windowW;
	
	if (this.clipT < 0)
	{
		this.clipT = 0;
		this.clipB = this.windowH;
	}
	else if (this.clipT + this.windowH > this.height())
	{
		this.clipT = this.height() - this.windowH;
		this.clipB = this.clipT + this.windowH;
	}
	else
		this.clipB = this.clipT + this.windowH;*/

	if (browser == "explorer4")
		this.handle.style.clip = "rect(" + this.clipT + "," + this.clipR + "," + this.clipB + "," + this.clipL + ")";
	else
	{
		this.handle.clip.top = this.clipT;
		this.handle.clip.left = this.clipL;
		this.handle.clip.bottom = this.clipB;
		this.handle.clip.right = this.clipR;
	}
}

function _scrollBy(advX, advY)
{
	if (this.clipL + advX < 0)
		advX = -this.clipL;
	else if ((this.clipR + advX > this.width()) && (this.width() > this.windowW))
		advX = this.width() - this.clipR;

	if (this.clipT + advY < 0)
		advY = -this.clipT;
	else if ((this.clipB + advY > this.height()) && (this.height() > this.windowH))
		advY = this.height() - this.clipB;

	this.clipBy(advX, advY);
	this.moveBy(-advX, -advY);
}

function _scrollTo(orgX, orgY)
{
	var advX = orgX - this.clipL;
	var advY = orgY - this.clipT;

	this.clipBy(advX, advY);
	this.moveBy(-advX, -advY);
}

function _show()
{
	if (browser == "explorer4")
		this.handle.style.visibility = "visible";
	else
		this.handle.visibility = "show";

	if (this.vScroller) this.vScroller.show();
}

function _hide()
{
	if (browser == "explorer4")
		this.handle.style.visibility = "hidden";
	else
		this.handle.visibility = "hide";

	if (this.vScroller) this.vScroller.hide();
}

function _isVisible()
{
	if (browser == "explorer4")
		return ! (this.handle.style.visibility == "hidden");
	else
		return ! (this.handle.visibility == "hide");
}

function _write(content)
{
	this.scrollTo(0, 0);

	if (browser == "explorer4")
		this.handle.innerHTML = content;
	else
	{
		this.handle.document.open();
		this.handle.document.write(content);
		this.handle.document.close();
	}

}

function _setBgColor(color)
{
	if (browser == "explorer4")
	{
		if (color)
			this.handle.style.backgroundColor = color;
		else
			this.handle.style.backgroundColor = "transparent";
	}
	else
		this.handle.bgColor = color;

}

var mbNone = 0;
var mbLeft = 1;
var mbRight = 2;
var evtMouseDown = 1;
var evtMouseUp = 2;
var evtClick = 3;
var evtMouseOver = 4;
var evtMouseOut = 5;
var evtMouseMove = 6;

function _assignEventHandler(evtCode, evtFunction)
{
	if (browser == "explorer4")
	{
		if (evtCode == evtMouseDown)
		{
			if (evtFunction != null)
				this.handle.onmousedown = evtFunction;
			else
				this.handle.onmousedown = null;
		}
		else if (evtCode == evtMouseUp)
		{
			if (evtFunction != null)
				this.handle.onmouseup = evtFunction;
			else
				this.handle.onmouseup = null;
		}
		else if (evtCode == evtClick)
		{
			if (evtFunction != null)
				this.handle.onclick = evtFunction;
			else
				this.handle.onclick = null;
		}
		else if (evtCode == evtMouseOver)
		{
			if (evtFunction != null)
				this.handle.onmouseover = evtFunction;
			else
				this.handle.onmouseover = null;
		}
		else if (evtCode == evtMouseOut)
		{
			if (evtFunction != null)
				this.handle.onmouseout = evtFunction;
			else
				this.handle.onmouseout = null;
		}
		else if (evtCode == evtMouseMove)
		{
			if (evtFunction != null)
				this.handle.onmousemove = evtFunction;
			else
				this.handle.onmousemove = null;
		}
	}
	else
	{
		if (evtCode == evtMouseDown)
		{
			if (evtFunction != null)
			{
				this.handle.onmousedown = evtFunction;
				this.handle.captureEvents(Event.MOUSEDOWN);
			}
			else
			{
				this.handle.releaseEvents(Event.MOUSEDOWN);
				this.handle.onmousedown = null;
			}
		}
		else if (evtCode == evtMouseUp)
		{
			if (evtFunction != null)
			{
				this.handle.onmouseup = evtFunction;
				this.handle.captureEvents(Event.MOUSEUP);
			}
			else
			{
				this.handle.releaseEvents(Event.MOUSEUP);
				this.handle.onmouseup = null;
			}
		}
		else if (evtCode == evtClick)
		{
			if (evtFunction != null)
			{
				this.handle.onclick = evtFunction;
				this.handle.captureEvents(Event.CLICK);
			}
			else
			{
				this.handle.releaseEvents(Event.CLICK);
				this.handle.onclick = null;
			}
		}
		else if (evtCode == evtMouseOver)
		{
			if (evtFunction != null)
			{
				this.handle.onmouseover = evtFunction;
				this.handle.captureEvents(Event.MOUSEOVER);
			}
			else
			{
				this.handle.releaseEvents(Event.MOUSEOVER);
				this.handle.onmouseover = null;
			}
		}
		else if (evtCode == evtMouseOut)
		{
			if (evtFunction != null)
			{
				this.handle.onmouseout = evtFunction;
				this.handle.captureEvents(Event.MOUSEOUT);
			}
			else
			{
				this.handle.releaseEvents(Event.MOUSEOUT);
				this.handle.onmouseout = null;
			}
		}
		else if (evtCode == evtMouseMove)
		{
			if (evtFunction != null)
			{
				this.handle.onmousemove = evtFunction;
				this.handle.captureEvents(Event.MOUSEMOVE);
			}
			else
			{
				this.handle.releaseEvents(Event.MOUSEMOVE);
				this.handle.onmousemove = null;
			}
		}
	}
}

function _destroy()
{
	this.hide();

	if (browser == "explorer4")
	{
		this.handle.innerHTML = "";
		this.handle.outerHTML = "";
	}
	else
		delete this.handle;

	this.handle = this.name = this.parent = null;
	this.clipL = this.clipT = this.clipR = this.clipB = this.left = this.top = this.windowW = this.windowH = 0;
}

function DocLayer(lObject, lName, lParent, lXPos, lYPos, lWidth, lHeight, lVisible, lBgColor, lZIndex)
{
	// Métodos de DocLayer
	this.resize = _resize;
	this.moveTo = _move;
	this.moveBy = _moveBy;
	this.width = _width;
	this.height = _height;
	this.setWindowDimensions = _setWindowDimensions;
	
	this.setClipOrg = _setClipOrg;
	this.clipBy = _clipBy;
	this.scrollBy = _scrollBy;
	this.scrollTo = _scrollTo;
		
	this.show = _show;
	this.hide = _hide;
	this.isVisible = _isVisible;
	this.setContents = _write;
	this.setBgColor = _setBgColor;

	this.assignEventHandler = _assignEventHandler;
	this.destroy = _destroy;

	// Ajuste de propriedades
	if (lObject != null) // --> objeto criado a partir de camada já existente
	{
		this.handle = lObject;
		this.vScroller = null;
		this.clipL = this.clipT = this.clipR = this.clipB = this.windowW = this.windowH = 0;

		if (browser == "explorer4")
		{
			this.left = lObject.style.pixelLeft;
			this.top = lObject.style.pixelTop;
			this.name = lObject.id;
			this.handle.docLayerObject = this;

			// Associa o handle "bruto" (dependente do browser) do elemento que contém esta camada à propriedade parent
			this.parent = lObject.parentElement;
		}
		else
		{
			this.left = lObject.left;
			this.top = lObject.top;
			this.name = lObject.name;
			this.handle.docLayerObject = this;

			// Associa o handle "bruto" (dependente do browser) do elemento que contém esta camada à propriedade parent
			this.parent = lObject.parentLayer;
		}

		// Adiciona objeto às docLayers
		docLayers[this.name] = this;
	}
	else if (arguments.length > 0) // --> cria-se a camada dinamicamente
	{
		var _layer = null;
		this.name = lName;

		if (browser == "explorer4")
		{
			var str = "\n<DIV id=" + lName + " style=\"position:absolute; left:" + lXPos + "; top:" + lYPos + "; width:" + lWidth;
			if (lHeight != null)
				str += "; height:" + lHeight + "; clip:rect(0," + lWidth + "," + lHeight + ",0)";

			if (lBgColor != null)
				str += "; background-color:" + lBgColor;
			if (lZIndex != null)
				str += "; z-index:" + lZIndex;

			str += "; visibility:" + (lVisible? "visible" : "hidden");
			str += ";\"></DIV>";

			if (lParent)
				lParent.handle.insertAdjacentHTML("BeforeEnd", str);
			else
				document.body.insertAdjacentHTML("BeforeEnd", str);

			_layer = document.all[lName];
			//alert(lName + " - " + _layer.style.left);

			// Referência ao objeto DocLayer para uso no tratamento de eventos
			_layer.docLayerObject = this;

			// Associa o handle "bruto" (dependente do browser) do elemento que contém esta camada à propriedade parent
			this.parent = _layer.parentElement;
		}
		else
		{
			var _layer = null;
			lWidth = parseInt(lWidth);

			if (lParent)
			{
				_layer = new Layer(lWidth, lParent.handle);
				lParent.handle.document.layers[lName] = _layer;
			}
			else
			{
				_layer = document.layers[lName] = new Layer(lWidth);
				eval("document." + lName + " = _layer");
			}

			_layer.name = lName;
			_layer.left = lXPos;
			_layer.top = lYPos;

			if (lHeight != null)
				_layer.clip.height = lHeight;

			if (lBgColor != null)
				_layer.bgColor = lBgColor;

			_layer.visibility = (lVisible? "show" : "hide");

			if (lZIndex != null)
				_layer.zIndex = lZIndex;

			// Referência ao objeto DocLayer para uso no tratamento de eventos
			_layer.docLayerObject = this;

			// Associa o handle "bruto" (dependente do browser) do elemento que contém esta camada à propriedade parent
			this.parent = _layer.parentLayer;
		}

		// Monta-se o objeto DocLayer
		this.handle = _layer;
		this.vScroller = null;
		this.left = lXPos;
		this.top = lYPos;
		this.setWindowDimensions(lWidth, lHeight);
		this.setClipOrg(0, 0);

		// Adiciona objeto às docLayers
		docLayers[this.name] = this;
	}
	else // --> usado pela declaração de prototypes, onde não se passam parâmetros
	{
		this.handle = this.name = this.parent = this.vScroller = null;
		this.clipL = this.clipT = this.clipR = this.clipB = this.left = this.top = this.windowW = this.windowH = 0;
	}
}

function _NSFindLayer(lName, doc)
{
	var _layer = null;

	// procura a layer no documento e sub-layers
	if (doc.layers && (doc.layers.length > 0))
	{
		var i = 0;
		for (i = 0; (i < doc.layers.length) && (_layer == null); i++)
		{
			if (doc.layers[i].name == lName)
				_layer = doc.layers[i];
			else
				_layer = _NSFindLayer(lName, doc.layers[i].document);
		}
	}

	return _layer;
}

function getLayer(lName)
{
	var _layer = null;
	if (browser == "explorer4")
		_layer = document.all[lName];
	else
		_layer = _NSFindLayer(lName, document);

	if (_layer)
		return new DocLayer(_layer);
	else
		return null;
}

function createLayer(lName, lParent, lXPos, lYPos, lWidth, lHeight, lVisible, lBgColor, lZIndex)
{
	var _layer = null;
	if (browser == "explorer4")
	{
		var str = "\n<DIV id=" + lName + " style=\"position:absolute; left:" + lXPos + "; top:" + lYPos + "; width:" + lWidth;
		if (lHeight != null)
			str += "; height:" + lHeight + "; clip:rect(0," + lWidth + "," + lHeight + ",0)";

		if (lBgColor != null)
			str += "; background-color:" + lBgColor;
		if (lZIndex != null)
			str += "; z-index:" + lZIndex;

		str += "; visibility:" + (lVisible? "visible" : "hidden");
		str += ";\"></DIV>";
		//alert(str);

		if (lParent)
			lParent.handle.insertAdjacentHTML("BeforeEnd", str);
		else
			document.body.insertAdjacentHTML("BeforeEnd", str);

		_layer = document.all[lName];
	}
	else
	{
		var _layer = null;
		lWidth = parseInt(lWidth);

		if (lParent)
		{
			_layer = new Layer(lWidth, lParent.handle);
			lParent.handle.document.layers[lName] = _layer;
		}
		else
		{
			_layer = document.layers[lName] = new Layer(lWidth);
			eval("document." + lName + " = _layer");
		}

		_layer.name = lName;
		_layer.left = lXPos;
		_layer.top = lYPos;

		if (lHeight != null)
			_layer.clip.height = lHeight;

		if (lBgColor != null)
			_layer.bgColor = lBgColor;

		_layer.visibility = (lVisible? "show" : "hide");

      if (lZIndex != null)
			_layer.zIndex = lZIndex;

		/*if (lParent)
		{
			var _newLayer = eval("document." + lParent.handle.name + ".document." + lName + " = new Layer(lWidth, document." + lParent.handle.name + ")");
		}
		else
		{
			var _newLayer = document.layers[lName] = new Layer(lWidth);
			eval("document." + lName + " = _newLayer")
		}

		_newLayer.name = lName;
		_newLayer.left = lXPos;
		_newLayer.top = lYPos;

		if (lHeight != null)
			_newLayer.clip.height = lHeight;

		if (lBgColor != null)
			_newLayer.bgColor = lBgColor;

		_newLayer.visibility = (lVisible? "show" : "hide");

		if (lZIndex != null)
			_newLayer.zIndex = lZIndex;

		_newLayer.document.open();
		_newLayer.document.write(".");
		_newLayer.document.close();
		return new DocLayer(_newLayer);*/
	}

	// Retorna objeto recém-criado
	if (_layer)
	{
		var _layerObj = new DocLayer(_layer);
		_layerObj.setWindowDimensions(lWidth, lHeight);
		_layerObj.setClipOrg(0, 0);

		return _layerObj;
	}
	else
		return null;
}


/* --------------------------------------------------------
 * ScrollBar
 * --------------------------------------------------------
 */

function _updateThumb()
{
	this.percentShown = (this.contentLayer.clipT / (this.contentLayer.height() - this.contentLayer.windowH)) * 100;
	
	if (! this.thumb) return;
	var sbHeight = this.windowH - this.upScroller.height() - this.dnScroller.height() - this.thumb.height();
	var yPos = (sbHeight * this.percentShown) / 100 + this.upScroller.height();
	this.thumb.moveTo(0, yPos);
}

function _scrollUp()
{
	if (this.percentShown > 0)
	{
		this.contentLayer.scrollBy(0, -20);
		this.updateThumb();
	}
	else
		this.stopScrolling();
}

function _scrollDn()
{
	if (this.percentShown < 100)
	{
		this.contentLayer.scrollBy(0, 20);
		this.updateThumb();
	}
	else
		this.stopScrolling();
}

function _startThumbDrag(e)
{
	de = new DocEvent(e);

	// verifica se clicou sobre o thumb
	var sbYClick = de.y + this.activeArea.top;
	if ((sbYClick > this.thumb.top) && (sbYClick < this.thumb.top + this.thumb.height()))
	{
		this.isThumbDragging = true;
		this.dsY = de.y;
		this.oldThumbTop = this.thumb.top;
	}
	else
		this.isThumbDragging = true;
}

function _stopThumbDrag()
{
	this.isThumbDragging = false;
}

function _mouseMove(e, sbName)
{
	sb = docLayers[sbName];
	if (sb.isThumbDragging)
	{
		de = new DocEvent(e);
		var newThumbTop = sb.oldThumbTop + (de.y - sb.dsY);
		//sb.thumb.moveTo(0, newThumbTop);

		var sbHeight = sb.windowH - sb.upScroller.height() - sb.dnScroller.height() - sb.thumb.height();
		var delta = sb.contentLayer.height() - sb.contentLayer.windowH;
		var newClipT = -(delta * (100*sb.activeArea.top - 100*newThumbTop)) / (100 * sbHeight);
		//alert(sb.oldThumbTop + " + (" + de.y + " - " + sb.dsY + ")");
		newClipT = Math.floor(newClipT);
		
		if (newClipT < 0) newClipT = 0;
		if (newClipT > delta) newClipT = delta;
		sb.contentLayer.scrollTo(0, newClipT);
		sb.updateThumb();
	}

	return false;
}

var dirUp = 0;
var dirDn = 1;

function _startScrolling(dir)
{
	if (hInterval != 0)
	{
		window.clearInterval(hInterval);
		hInterval = 0;
	}

	if (dir == dirUp)
		hInterval = window.setInterval("docLayers['" + this.name + "'].scrollUp()", 200);
	else if (dir == dirDn)
		hInterval = window.setInterval("docLayers['" + this.name + "'].scrollDn()", 200);
}

function _stopScrolling()
{
	if (hInterval != 0)
	{
		window.clearInterval(hInterval);
		hInterval = 0;
	}
}

function _update()
{
	if (this.contentLayer.height() <= this.contentLayer.windowH)
	{
		this.upScroller.hide();
		this.dnScroller.hide();
		
		if (this.thumb)
		{
			this.thumb.hide();
			this.activeArea.hide();
		}

		this.hide();
	}
	else
	{
		if (this.contentLayer.isVisible())
		{
			this.upScroller.show();
			this.dnScroller.show();

			if (this.thumb)
			{
				this.thumb.show();
				this.activeArea.show();
			}

			this.__show();
		}

		this.updateThumb();
	}
}

function _sbDestroy()
{
	this.upScroller.destroy();
	this.dnScroller.destroy();
	if (this.thumb) this.thumb.destroy();

	this.parentLayer.vScroller = null;
	this.__destroy();
}

function _sbShow()
{
	if (this.contentLayer.isVisible)
	{
		this.__show();
		this.update();
	}
}

function _sbHide()
{
	this.__hide();
	this.upScroller.hide();
	this.dnScroller.hide();
	if (this.thumb) this.thumb.hide();
}

function ScrollBar(contentLayer, sbHeight, imgUp, imgDn, imgThumb)
{
	this.contentLayer = contentLayer;
	this.base = DocLayer;
	this.percentShown = 0;
	this.isThumbDragging = false;

	var superLayer = new DocLayer(contentLayer.parent);
	contentLayer.vScroller = this;
	sbHeight = (sbHeight? sbHeight : contentLayer.windowH);
	this.base(null, "sb" + (++sbCount), superLayer, contentLayer.left + contentLayer.windowW, contentLayer.top, imgUp._w, sbHeight, false, null, null);

	this.scrollUp = _scrollUp;
	this.scrollDn = _scrollDn;
	this.startScrolling = _startScrolling;
	this.stopScrolling = _stopScrolling;
	this.updateThumb = _updateThumb;
	this.update = _update;
	this.startThumbDrag= _startThumbDrag;
	this.stopThumbDrag = _stopThumbDrag;
	this.__destroy = _destroy; // _destroy() é a função destrutora original de DocLayer
	this.destroy = _sbDestroy;
	this.__show = _show; // idem acima
	this.show = _sbShow;
	this.__hide = _hide; // idem acima
	this.hide = _sbHide;


	// Scrollers
	this.upScroller = new DocLayer(null, "sb"+sbCount+"_up", this, 0, 0, imgUp._w, imgUp._h, false, null, null);
	this.upScroller.scrollBar = this;
	this.upScroller.setContents("<img src='" + imgUp.src + "' width=" + imgUp._w + " height=" + imgUp._h + " border=0>");
	this.upScroller.assignEventHandler(evtMouseOver, Function("docLayers['" + this.name + "'].startScrolling(dirUp)"));
	this.upScroller.assignEventHandler(evtMouseOut, Function("docLayers['" + this.name + "'].stopScrolling()"));

	this.dnScroller = new DocLayer(null, "sb"+sbCount+"_dn", this, 0, this.windowH - imgDn._h, imgDn._w, imgDn._h, true, null, null);
	this.dnScroller.scrollBar = this;
	this.dnScroller.setContents("<img src='" + imgDn.src + "' width=" + imgDn._w + " height=" + imgDn._h + " border=0>");
	this.dnScroller.assignEventHandler(evtMouseOver, Function("docLayers['" + this.name + "'].startScrolling(dirDn)"));
	this.dnScroller.assignEventHandler(evtMouseOut, Function("docLayers['" + this.name + "'].stopScrolling()"));

	if (imgThumb != null)
	{
		this.thumb = new DocLayer(null, "sb"+sbCount+"_th", this, 0, imgUp._h, imgThumb._w, imgThumb._h, false, null, null);
		this.thumb.scrollBar = this;
		this.thumb.setContents("<img src='" + imgThumb.src + "' width=" + imgThumb._w + " height=" + imgThumb._h + " border=0>");
		this.assignEventHandler(evtMouseMove, Function("e", "_mouseMove(e, '" + this.name + "')"));

		this.activeArea = new DocLayer(null, "sb"+sbCount+"_aa", this, 0, imgUp._h, imgUp._w, sbHeight - imgUp._h - imgDn._h, false, null, null);
		this.activeArea.scrollBar = this;
		this.activeArea.assignEventHandler(evtMouseDown, Function("e", "docLayers['" + this.name + "'].startThumbDrag(e)"));
		this.activeArea.assignEventHandler(evtMouseUp, Function("docLayers['" + this.name + "'].stopThumbDrag()"));
	}
	else
		this.thumb = null;

	this.update();
}
ScrollBar.prototype = new DocLayer;


