var faq_selected=null;
function clickQuestion(i) {
    if( !document.getElementById ) {
        return;
    }
    if(faq_selected != null) {
        document.getElementById('vraag'+ faq_selected).className='FaqVraag';
        document.getElementById('antwoord'+ faq_selected).className='FaqAntwoord';
    }
    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="FaqVraag selected"; document.getElementById("antwoord'+ i +'").className = "FaqAntwoord 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)
        }
    }
}

 window.onload = handleAnchoredQuestion;


