//show/hide text used in NEWS block

function showHide(shID) {
   if (document.getElementById(shID)) {
      if (document.getElementById(shID+'-show').style.display != 'none') {
         document.getElementById(shID+'-show').style.display = 'none';
         document.getElementById(shID).style.display = 'block';
      }
      else {
         document.getElementById(shID+'-show').style.display = 'inline';
         document.getElementById(shID).style.display = 'none';
      }
   }
}
//END show/hide text***********

// show/hide text as used in BOD page***************
function HideContent(d) {
	document.getElementById(d).style.display = "none";
}
function ShowContent(d) {
	document.getElementById(d).style.display = "block";
}
function ReverseDisplay(d) {
	if(document.getElementById(d).style.display == "none") { document.getElementById(d).style.display = "block"; }
	else { document.getElementById(d).style.display = "none"; }
}
//END show/hide text***********

//image rotator on home page
  var imgs = new Array(
  "http://www.cbtnva.org/images/home-RCCContemp.jpg",
  "http://www.cbtnva.org/images/Summer-12-home.jpg",
  "http://www.cbtnva.org/images/bb-12-home.jpg",
  "http://www.cbtnva.org/images/masterclass1112.jpg",
  "http://www.cbtnva.org/images/home-membership.jpg",
  "http://www.cbtnva.org/images/Season1112.jpg",
  "http://www.cbtnva.org/images/CBT-home-2.jpg",
  "http://www.cbtnva.org/images/home-yagp-12-1.jpg"
  );
  var lnks = new Array(
  "RCC-EveningOfContemporaryDance",
  "summer-12",
  "bordeaux",
  "masterclass",
  "donate",
  "performances",
  "corevalues",
  "yagp"
  );
  var alt = new Array(
  "Evening of Contemporary Dance at Reston Community Center",
  "Summer Intensives and Classes 2012",
  "Ballet and Bordeaux",
  "Master Class Series 2011-2012",
  "Donate to our Capital Campaign",
  "CBT Season 2011-12",
  "The Core Values of CBT",
  "Congratulations to our YAGP Contestants!"
  );
  var currentImage = 0;
  var imgCt = 8;
  function cycle() {
  if (currentImage == imgCt) {
  currentImage = 0;
  }
  var rotator = document.getElementById('rotator');
  var imagelink = document.getElementById('imageLink');
  rotator.src=imgs[currentImage]
  rotator.alt=alt[currentImage]
  document.getElementById('imageLink').href=lnks[currentImage]
  currentImage++;
  }
  window.setInterval("cycle()",7000);
//END image rotator


