/*
 * Span KWJAX.
 */
function KWJAXSpan(pElement) {

	// Elemento
	this.lElement = new KWJAXUtil().getElement(pElement);

	// Verifica o elemento
	if (!this.lElement) {
		alert('Elemento "' + pElement + '" inválido');
		return false;
	} else {

		// Verifica o tipo do elemento
		if (new String(typeof(this.lElement)).toLowerCase() != 'object') {
			alert('O elemento "' + pElement + '" não é um objeto');
			return false;
		} else {

			// Verifica a tag do elemento
			if (new String(this.lElement.tagName).toLowerCase() != 'span') {
				alert('O elemento "' + pElement + '" não é um SPAN');
				return false;
			}
		}
	}

	/*
	 * Obtém o HTML interno do elemento.
	 */
	this.getInnerHTML = function() {
		return this.lElement.innerHTML;
	}

	/*
	 * Obtém a visibilidade do elemento.
	 */
	this.getVisible = function() {
		return (this.lElement.style.display != 'none');
	}

	/*
	 * Atribui o HTML interno do elemento.
	 */
	this.setInnerHTML = function(pInnerHTML) {
		this.lElement.innerHTML = pInnerHTML;
	}

	/*
	 * Atribui a visibilidade do elemento.
	 */
	this.setVisible = function(pVisible) {
		this.lElement.style.display = (pVisible ? '' : 'none');
	}
}
