var nrOfTabs = 0;
var nrOfSubTabs = 0;

function WindowOnload(funcName)
{
   if(window.attachEvent)
   {
      window.attachEvent('onload',funcName);
   }
   else
   {
      window.addEventListener('load',funcName,false);
   }
}

WindowOnload(hideAnswers);

function hideAnswers() {
	if (document.getElementById) {
		var parentId = document.getElementById('content');
		if (parentId != null) {
			var Items = parentId.getElementsByTagName('div');
			var max = Items.length;
			for (i=0; i<max; i++) {
				if (Items.item(i).className == 'answer') {
					Items.item(i).style.display = 'none';
				}
				if (Items.item(i).className == 'question') {
					Items.item(i).onmouseover = setMouseHand;
					if (Items.item(i).captureEvents) { 
						Items.item(i).captureEvents(Event.MOUSEOVER);
					}
				}
			} 
			
			if (window.location.hash.length > 0) {
				var e = document.getElementById('a-' + window.location.hash.substring(1))
				e.style.display = "block"
			}
		}
	}
}

function toggleAnswer(a) {
	if (document.getElementById) {
		b = document.getElementById(a);
		if (b.style.display == 'none') {
			b.style.display = 'block';
		} else {
			b.style.display = 'none';
		}
	}
}

function setMouseHand() {
	this.style.cursor = 'pointer';
}
