//Script Adapted by Cesar Arraiz
//cesar_arraiz@hotmail.com
//necsolutions.com.ve


//Verifica Resize de window 
window.onresize = doResize;

function doResize()
{
//setTimeout("location.reload()",5000);
}

//Obtiene el ancho de la ventana - It gets window width
function maxWidth()
	{
	if(navigator.appName.indexOf("Explorer") != -1)
		return document.body.clientWidth
	else
		return innerWidth
	}

//Chequea los objetos presentes en el browser - It checks the present objects in browser
function checkObj()
	{
	this.dom = (document.getElementById)
	this.all = (document.all && !this.dom)
	this.lyr = (document.layers && !this.dom)
	}

bws = new checkObj()

//Constructor de objeto - Object constructor
function makeObj(id,nest)
	{
	nest = (!nest) ? "" : "document." + nest + "."
	this.css = (bws.dom) ? document.getElementById(id).style : (bws.all) ? document.all[id].style : (bws.lyr) ? eval(nest + "document." + id) : 0
	this.elm = (bws.dom) ? document.getElementById(id) : (bws.all) ? document.all[id] : (bws.lyr) ? this.css : 0
	this.left = (bws.lyr) ? this.css.left : this.elm.offsetLeft
	this.top = (bws.lyr) ? this.css.top : this.elm.offsetTop
	this.width = (bws.lyr) ? this.css.clip.width : this.elm.offsetWidth
	this.height = (bws.lyr) ? this.css.clip.height : this.elm.offsetHeight
	this.show = lyrShow
	this.hide = lyrHide
	this.moveTo = lyrMoveTo
	this.moveBy = lyrMoveBy
	}

//Muestra el objeto - It shows the object
function lyrShow()
	{
	this.css.visibility = (bws.lyr) ? "show" : "visible"
	}

//Oculta el objeto - It hides the object
function lyrHide()
	{
	this.css.visibility = (bws.lyr) ? "hide" : "hidden"
	}

//Mueve el objeto hasta una posicion específica - It moves the object to a especfic position
function lyrMoveTo(x,y)
	{
	if(x)
		{
		this.left = x
		this.css.left = this.left
		}
	if(y)
		{
		this.top = y
		this.css.top = this.top
		}
	}

//Mueve el objeto tantas unidades - It moves the object by certain units
function lyrMoveBy(x,y)
	{
	if(x)
		{
		this.left += x
		this.css.left = this.left
		}
	if(y)
		{
		this.top += y
		this.css.top = this.top
		}
	}

