﻿/*

	Lost Boys 2005.
	
	De inhoud van dit bestand is in opdracht vervaardigd en eigendom van onze opdrachtgever.
	Niet hergebruiken zonder toestemming.
	Neem voor vragen contact op met Lost Boys, www.lostboys.nl.

	The contents of this file have been produced for and are the property of our client.
	Do not reuse without permission.
	Any questions? Please contact Lost Boys, www.lostboys.nl.

*/
FAQ = function() {
	// get all the list items within 'faqs' and put them in an array
	this.faqItems = new Array();
	var startNode = document.getElementById('faqs');
	var arrItems = startNode.getElementsByTagName('*');
	for (var i=0; i<arrItems.length; i++ ) {
		if (arrItems[i].className == 'hidden') {
			this.faqItems[this.faqItems.length] = new faqItem(arrItems[i],arrItems[i].getElementsByTagName("a")[0],arrItems[i].getElementsByTagName("p")[0]);
		}
	}
}
faqItem = function(faqItem,faqLink,faqInfo) {
	this.faqItem = faqItem;
	this.faqLink = faqLink;
	this.faqInfo = faqInfo;
	var faqitem = this;
	this.faqLink.onclick = function () {
		this.blur();
		faqitem.toggle();
        return false;
    }
}
faqItem.prototype.toggle = function() {
	this.state = this.faqInfo.style.display;
	if (this.faqItem.className == 'hidden') {
		this.show();
	}
	else { 
		this.hide(); 
	}
}
faqItem.prototype.show = function() {
	this.faqItem.className = 'shown';
}
faqItem.prototype.hide = function() {
	this.faqItem.className = 'hidden';
}