var HiddenContents = new function() {
	// CLASS DECLARATIONS
	var HiddenContent = function(id) {
		// PROPERTIES
		this.itemsByClass = [];
		this.hidden = true;

		//METHODS
		this.hide = function() {
			var this_ = this;
			this_.itemsByClass['content'].style.display = 'none';
			this_.itemsByClass['arrow'].style.backgroundPosition = 'left top';
			this_.hidden = true;
		}
		
		this.show = function() {
			var this_ = this;
			this_.itemsByClass['content'].style.display = 'block';
			this_.itemsByClass['arrow'].style.backgroundPosition = 'left bottom';
			this_.hidden = false;
		}
		

		// CONSTRUCTOR
		var obj = document.getElementById(id);
		var this_ = this;
		try {
			var objs = obj.getElementsByTagName('span');
			var n = objs.length;
			for (var i=0; i < n; i++) {
				this.itemsByClass[objs[i].className] = objs[i];
			}
			this.hide();
			this.itemsByClass['headerLine'].onclick = function(evt) {
				if (this_.hidden) {
					this_.show();
				}
				else {
					this_.hide();
				}
			}
		} catch(e) {}
	}
	
	// PROPERTIES
	this.list = [];
	
	// METHODS
	this.addNew = function(id) {
		this.list.push(new HiddenContent(id));
	}
}