
var MAX_TOPIC = 100
var MAX_QUESTION = 100

function ShowDiv(id){
   try {
    if (document.getElementById){
        obj = document.getElementById(id);
        obj.style.display = "";
    }
   } catch (Exception) {}
}

function HideDiv(id){
   try {
    if (document.getElementById){
        obj = document.getElementById(id);
        obj.style.display = "none";
    }
   } catch (Exception) {}
}

function ShowTopic(topic) {    
    var id = parseInt(topic.substring(topic.indexOf('_')+1,topic.length));
    var name = topic.substring(0,topic.indexOf('_')+1)
    for (var i = 1;i<=MAX_TOPIC;i++) {
        if (i == id) {
              ShowDiv(name + i);  
        } else {
              HideDiv(name + i);          
        }           
    }
    ShowQuestion("q_0");
    return false;
}

function ShowQuestion2(question) {    
    var id = parseInt(question.substring(question.indexOf('_')+1,question.length));
    var name = question.substring(0,question.indexOf('_')+1)
    for (var i = 1;i<=MAX_QUESTION;i++) {
        if (i == id) {
              ShowDiv(name + i);  
        } else {
              HideDiv(name + i);          
        }           
    }
    return false;
}


function ShowQuestion(id) {    
   try {
    if (document.getElementById){
        obj = document.getElementById(id);
        if (obj.style.display == "") {
            obj.style.display = "none";        
        } else {
            obj.style.display = "";
        }
    }
   } catch (Exception) {}
}