// Change an element's css class
//
function classSwapper (obj,cssClass) {
    if (obj)  
    {
      if (obj.className) {
        obj.className = cssClass;
     }
    }
}
 

// Private function for creating functions that change an element's css class
//
 function _ChangeCSSClass (css) {
    return function (id) {
        if (document.getElementById) {
            var element = document.getElementById(id);
	    classSwapper(element,css);
        }
    }
}

// Create functions for manipulating css classes
//

 var show    = _ChangeCSSClass('Visible');   // make an element visible
var unshow  = _ChangeCSSClass('Hidden');    // make an element invisible


// Private function for creating functions that control tabs
//
function _TabController (numOfTabs,elementPrefix) {
    return function (element) {
        for (var i = 1; i <= numOfTabs; i++) {
	    menuName = elementPrefix + i;
            if (document.getElementById(menuName)){
	        if (element == menuName){
		    document.getElementById(element).style.display = 'block';
		} else {
		    document.getElementById(menuName).style.display = 'none';
		}
	    }
	}
    return;    
    }
}

//Itens
//
function toggleQuestion(tName, qName, aName)
    {
        var title = document.getElementById(tName);
        if (title == null) return;
        var ans = document.getElementById(aName);
        if (ans == null) return;
        var que = document.getElementById(qName);
        if (ans.style.display == '')
        {
          if (que != null) que.style.display = 'none';
         ans.style.display = 'none';
         var sa = document.getElementById("chkViewAll");
        }
        else
        {
            if (que != null) que.style.display = '';
         ans.style.display = '';
        }
    }

//Setinha
//
function ganhadores(alfa){
	if (document.getElementById(alfa).style.display == 'none'){
		document.getElementById(alfa).style.display = 'block';
	
	}else{
		document.getElementById(alfa).style.display = 'none';

	}
}