var newPos;
function switchBio(direction) {
   var origPos = 0;
   var startPoint = -165;
   var endPoint = 825; // for 8 bios
   var bioWidth = 165; // width of each bio
   if (direction == "right") { 
      document.getElementById('bioNavLeft').style.visibility = "visible";
      if (newPos == 495) document.getElementById('bioNavRight').style.visibility = "hidden";
      else document.getElementById('bioNavRight').style.visibility = "visible";
      if (newPos == null) newPos = bioWidth; // first run
      else if (newPos >= endPoint) newPos = endPoint; // if it reaches the end on the right
      else newPos = newPos + bioWidth; // add 165 for each bio
      if (newPos != endPoint) document.getElementById('bioWrap').style.left = "-" + newPos + "px"; // if it's not the last bio on right
   }
   if (direction == "left") { 
      document.getElementById('bioNavRight').style.visibility = "visible";
      if (newPos == null || newPos == 165) document.getElementById('bioNavLeft').style.visibility = "hidden";
      else document.getElementById('bioNavLeft').style.visibility = "visible";
      if (newPos == null) newPos = bioWidth; // first run
      else if (newPos <= startPoint) newPos = startPoint; // if it comes back to the first bio on left
      else newPos = newPos - bioWidth; // add 165 for each bio
      if (newPos != startPoint) document.getElementById('bioWrap').style.left = "-" + newPos + "px"; // if it's not the first bio on left
  }
}
