/* A basic string buffer class.
 *
 * example:
 *   var s = new StringBuffer();
 *   s.append('Hi');
 *   document.write(s.toString());
 */
function StringBuffer() {
	this.buffer = [];
};
StringBuffer.prototype.append = function(s) {
	this.buffer.push(s);
	return this;
};
StringBuffer.prototype.toString = function() {
	return this.buffer.join("");
};

/* Toggle div hidden/visible */
function toggleDiv(elName) {
	var el = document.getElementById(elName);
	if (el) {
		if (el.style.display == "block")
			el.style.display = "none";
		else
			el.style.display = "block";
	}
	return false;
};

