/*************************DIMENSOES*************************/
unitsWindow = function() {
	// Variáveis utilizadas no objeto
	var yScroll = new Number(0);		//posiçao Y do scroll
	var xScroll = new Number(0);		//posiçao X do scroll
	var wndWidthVis = new Number(0);	//width janela, visível
	var wndHeightVis = new Number(0);	//height janela, visível
	var wndWidthHid = new Number(0);	//width janela, tamanho total visível + invisível
	var wndHeightHid = new Number(0);	//height janela, tamanho total visível + invisível
	
	this.widthVisible = function() {
		return wndWidthVis;
	}

	this.heightVisible = function() {
		return wndHeightVis;
	}

	this.widthTotal = function() {
		return wndWidthHid;
	}

	this.heightTotal = function() {
		return wndHeightHid;
	}

	this.posScrollY = function() {
		if (self.pageYOffset) yScroll = self.pageYOffset;
		else if (document.documentElement && document.documentElement.scrollTop) yScroll = document.documentElement.scrollTop; 
		else if (document.body) yScroll = document.body.scrollTop;

		return yScroll;
	}

	this.posScrollX = function() {
		if (self.pageXOffset) xScroll = self.pageXOffset;
		else if (document.documentElement && document.documentElement.scrollLeft) xScroll = document.documentElement.scrollLeft; 
		else if (document.body) xScroll = document.body.scrollLeft; 

		return xScroll;
	}

	this.scrollToTop = function() {
		if (self.pageYOffset) self.pageYOffset = 0;
		else if (document.documentElement && document.documentElement.scrollTop) document.documentElement.scrollTop = 0; 
		else if (document.body) document.body.scrollTop = 0;

		return yScroll;
	}

	this.load = function() {
		if (window.innerWidth) wndWidthVis = window.innerWidth;
		else if (document.documentElement && document.documentElement.clientWidth) wndWidthVis = document.documentElement.clientWidth;
		else if (document.body) wndWidthVis = document.body.clientWidth;

		if (window.innerHeight) wndHeightVis=window.innerHeight;
		else if (document.documentElement && document.documentElement.clientHeight) wndHeightVis=document.documentElement.clientHeight;
		else if (document.body) wndHeightVis=document.body.clientHeight;
	
		wndWidthHid = document.body.clientWidth;

		wndHeightHid = document.body.clientHeight;	
	}
}
/***********************************************************/
