/**
 *
 */
function objExpandPanel(object_name) {
	this.panel;
	this.objName = object_name;
	this.timeout = 3;	// Tiempo de espera entre ciclos
	this.sizeincr = 15;	// Incremento en cada ciclo
	this.height = 255;	// Tamaņo fijo que se expande la capa
	
	this.show = function() {
		var h = parseInt(this.panel.style.height) + this.sizeincr;
		if( h > this.height ) {
			this.panel.style.height = this.height;
			return;
		}
		this.panel.style.height = h;
		var i = setTimeout(this.objName + ".show()", this.timeout);
	}
	/**
	 * Ocultar
	 */
	this.hide = function() {
		this.panel.style.height = 0;
		this.panel.style.display = 'none';
	}
	/**
	 * Change
	 */
	this.change = function(panel_id) {
		if( (this.panel = document.getElementById(panel_id)) == null ) {
			return;
		}
		/*
		var node = this.panel.firstChild;
		do {
			if( node.tagName == 'TABLE' ) {
			}
		} while ( (node = node.nextSibling) != null );
		*/
		if( parseInt(this.panel.style.height, 10) > 0 ) {
			this.hide();
		}
		else {
			this.panel.style.display = 'block';
			this.show();
		}
	}
}

