// JavaScript Document
function changeActive(IdBox,status) {
	var box=document.getElementById(IdBox);
	if (box.className != "AlwaysActive") {
		if(status == "active")
		{
			box.className = "Active";
		}
		else
		{
			box.className = "UnActive";
		}
	}
}

function openPopup(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function changeDivVisible(articleId, summaryId)
{
    var divArticle = document.getElementById(articleId);
    var divSummary = document.getElementById(summaryId);
    if (divArticle.style.display == "block" || divArticle.style.display == "") {
        divArticle.style.display = "none";
        divSummary.style.display = "block";
    } 
    else {
        divSummary.style.display = "none";
        divArticle.style.display = "block";            
    }
}


function questionsReponses(mainID, currentQuestionID, currentReponseID){
	var mainID = document.getElementById(mainID);
	var currentQuestionID = document.getElementById(currentQuestionID);
	var currentReponseID = document.getElementById(currentReponseID);
	var getTagDT = mainID.getElementsByTagName("DT");
	var getTagDD = mainID.getElementsByTagName("DD");
	var i;
	
	if (currentReponseID.className != "ActiveReponse") {
		
		/* Collapse All */
		for (i=0; i<getTagDT.length; i++) {
			getTagDT[i].className = "";
		}
		for (i=0; i<getTagDD.length; i++) {
			getTagDD[i].className = "";
		}
	
		/* Expand Current Question */
		currentQuestionID.className = "ActiveQuestion";
		currentReponseID.className = "ActiveReponse";
		
	}
	else {
		
		/* Collapse Current Question and  Reponse */
		currentQuestionID.className = "";
		currentReponseID.className = "";
	}
}