﻿function getEl(objID)
{
	this.jqObj = document.getElementById(objID);
	return this;
}

getEl.prototype.show = function()
{
	if (this.jqObj != undefined)
	{
		this.jqObj.style.display = 'block';

		if (parseInt(this.jqObj.parentNode.offsetLeft) + parseInt(this.jqObj.offsetLeft) + parseInt(this.jqObj.offsetWidth) > parseInt(this.jqObj.parentNode.parentNode.offsetWidth))
			this.jqObj.style.left = parseInt(this.jqObj.parentNode.parentNode.offsetWidth) - parseInt(this.jqObj.parentNode.offsetLeft) - parseInt(this.jqObj.offsetWidth) + 'px';
	}
}

getEl.prototype.hide = function()
{
	if (this.jqObj != undefined)
	{
		this.jqObj.style.display = 'none';
	}
}