function showCaption() {

	document.getElementById('banner-caption').style.display = 'inline';

}

function hideCaption() {

	document.getElementById('banner-caption').style.display = 'none';

}

function getId(whichLayer) {
  var elem, vis;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( whichLayer );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all[whichLayer];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[whichLayer];
  vis = elem.style;
  return [elem, vis];
}

function toggleLayer( whichLayer )
{
	elemvis = getId(whichLayer);
	
  // if the style.display value is blank we try to figure it out here
	if(elemvis[1].display==''&&elemvis[0].offsetWidth!=undefined&&elemvis[0].offsetHeight!=undefined)
		elemvis[1].display = (elemvis[0].offsetWidth!=0&&elemvis[0].offsetHeight!=0)?'block':'none';
	elemvis[1].display = (elemvis[1].display==''||elemvis[1].display=='block')?'none':'block';
}

function toggleAllAnswers(choice) {
	var copyDiv = document.getElementById('copy');
	var answers = copyDiv.getElementsByTagName('div');
	
	for (i=0; i < answers.length; i++) {
		vis = answers[i].style;
		vis.display = choice;
	}
}

function show(whichLayer) {
	elemvis = getId(whichLayer);
	elemvis[1].display = 'block';

}

function hide(whichLayer) {
	elemvis = getId(whichLayer);
	elemvis[1].display = 'none';
	
}