var FAQs = {
	_h4:	null,
	_img:	null,
	_div:	null,
	_cache:	null,
	
	_toggle: function (index) {
		if (!this._h4 || (arguments.length==0))
			return;
		var closed = (this._img[index].readAttribute('alt')=='Expand');
		this._img[index].writeAttribute('alt',(closed?'Close':'Expand'));
		this._img[index].writeAttribute('title',(closed?'Close':'Expand'));
		this._img[index].writeAttribute('src','/images/buttons/'+(closed?'retract':'more')+'.gif');
		this._div[index].setStyle({'display':(closed?'block':'none')});
	},
	
	deinitialize: function () {
		if (!this._h4)
			return;
		for (var iFAQs = 0; iFAQs < this._h4.length; ++iFAQs)
			Event.stopObserving(this._h4[iFAQs], 'click', this._cache[iFAQs]);
		delete this._h4;
		delete this._img;
		delete this._div;
		delete this._cache;
	},
	
	initialize: function () {
		this._h4 = $$('h4.faq');
		this._img = $$('img.faq');
		this._div = $$('div.faq');
		this._cache = [];
		
		for (var iFAQs = 0; iFAQs < this._h4.length; ++iFAQs) {
			this._cache[iFAQs] = this._toggle.bind(this, iFAQs);
			Event.observe(this._h4[iFAQs], 'click', this._cache[iFAQs]);
		}
		
		Event.observe(window, 'unload', FAQs.deinitialize.bind(FAQs));
	}
};	
Event.observe(window, 'load', FAQs.initialize.bind(FAQs));