var faq_selected = null;
function clickQuestion(i) {
	if ( !document.getElementById ) {
		return;
	}
	if (faq_selected != null) {
		document.getElementById("vraag"+ faq_selected).className = "vraag";
		document.getElementById("antwoord"+ faq_selected).className = "antwoord";
	}
	if (faq_selected == i)
		faq_selected = null;
	else {
		if (document.getElementById('vraag'+ i)) {
			/*
			var strloc = 'document.location.href = \'' + document.location.pathname + document.location.search + '#vraag' + i + '\';';
			*/
			var strloc = '';
			setTimeout('document.getElementById("vraag'+ i +'").className = "vraag selected"; document.getElementById("antwoord'+ i +'").className = "antwoord selected"; faq_selected = "'+ i +'";' + strloc, 150);
		} else {
			window.status = '(Cannot expand question)';
		}
	}
}


function handleAnchoredQuestion()
{
	var str = new String(document.location.href)
	if (str.indexOf('#') > 0) {
		var name = str.substring(str.indexOf('#') + 1)
		if (name) {
			str = name.substring('vraag'.length)
			clickQuestion(str)
		}
	}
}

 
function popup(sHref, sTarget, x, y, w, h, opts)
{
    if (x < 0) x = self.screen ? (screen.width - w) >> 1 : 0;
    if (y < 0) y = self.screen ? (screen.height - h) >> 1 : 0;
    var args = 'width=' + w + ',height=' + h + ',left=' + x + ',top=' + y;
    if (opts != '') args = args + ',' + opts;
    window.open(sHref, sTarget, args).focus();
}
