	
// setStyleByClass: dado un tipo de elemento y un selector de clase,
// propiedad de estilo y valor, aplicar el estilo.
// args:
//  t - tipo de tag a buscar (po ej., SPAN)
//  c - nombre de clase
//  p - propiedad CSS
//  v - valor
function setStyleByClass(t,c,p,v){
	var elements;
	if(t == '*') {
		// '*' no soportado por IE/Win 5.5 e inferior
		elements = (ie) ? document.all : document.getElementsByTagName('*');
	} else {
		elements = document.getElementsByTagName(t);
	}
	for(var i = 0; i < elements.length; i++){
		var node = elements.item(i);
		for(var j = 0; j < node.attributes.length; j++) {
			if(node.attributes.item(j).nodeName == 'class' || node.attributes.item(j).nodeName == 'CLASS' ) {
				if(node.attributes.item(j).nodeValue == c) {
					eval('node.style.' + p + " = '" +v + "'");
				}
			}
		}
	}
}


// cargar: muestra el bloque mostrado por el idMostrar.
// args:
//  idMostrar - id del bloque a mostrar
var cargar = function(idMostrar) {
	el=idMostrar;
	
	var bloqueLeer = document.getElementById(idMostrar);
	
	// Ponemos todas las cajas a no mostrables
	setStyleByClass('DIV', 'caja', 'display', 'none');
	var txtCaja = bloqueLeer.innerHTML;
	bloqueLeer.innerHTML = '';
	bloqueLeer.style.visibility = 'hidden';
	bloqueLeer.style.display = 'block';
	
	
   el = $(el);
   //el.setHTML(txtCaja).effect('opacity').custom(0,1);
   el.setHTML(txtCaja).effect('opacity').start(0,1);
   return false;
}