// works with IE6, Mozilla 1.4, Firebird 0.6.1, Safari 1.0, Netscape 7.1

// toggle visibility of specified answer

var tempElement ="";

function toggle(el) {
    tempColl = document.getElementsByTagName("DIV");
    for (i=0; i<tempColl.length; i++) {
      if (tempColl.item(i).className == "default") tempColl.item(i).style.display = "none";
    }
	
	whichEl = document.getElementById("answer"+el);
	if (tempElement !="") {
  	 tempElement.style.display ="none";
	}

    if (whichEl.style.display == "none") {
      whichEl.style.display = "block";
     } else {
      whichEl.style.display = "none";
     
    }
	
	tempElement = whichEl;
			
}

// showall hideall
function hideall() {
    tempColl = document.getElementsByTagName("DIV");
    for (i=0; i<tempColl.length; i++) {
      if (tempColl.item(i).className == "answer") tempColl.item(i).style.display = "none";
    }
	tempColl = document.getElementsByTagName("DIV");
    for (i=0; i<tempColl.length; i++) {
      if (tempColl.item(i).className == "default") tempColl.item(i).style.display = "block";
    }
    tempColl = document.images;
    for (i=0; i<tempColl.length; i++) {
      if (tempColl.item(i).className == "hideshow")
        tempColl.item(i).src = "show.gif";
    }
}

function showall() {
    tempColl = document.getElementsByTagName("DIV");
    for (i=0; i<tempColl.length; i++) {
      if (tempColl.item(i).className == "answer")
        tempColl.item(i).style.display = "block";
    }
    tempColl = document.images;
    for (i=0; i<tempColl.length; i++) {
      if (tempColl.item(i).className == "hideshow")
        tempColl.item(i).src = "hide.gif";
    }
}


