function peeper(n) {
  // Scroll it.
  scrolly('peephole', n, 500);
  // Get the links.
  if      (document.getElementById('peep_list_case')) {var faqlnks = document.getElementById('peep_list_case').getElementsByTagName("a");}
  else if (document.getElementById('faq_list_case'))  {var faqlnks = document.getElementById('faq_list_case').getElementsByTagName("a");}
  // Run through the links
  for (e = 0; e < faqlnks.length; e++) {
	if (e != n) {faqlnks[e].className = '';}
	else {faqlnks[e].className = 'olnk';}
  }
}
peeper(0);


/* Start scroll functions */
function scrollx(div, vpos, secs) {
  var shiftDiv = document.getElementById(div);
  var speed = Math.round(secs / 100);
  var timer = 0;
  var vrepos = (550 * vpos); /* the first number is the width of the framing elements */
  var z = 50; /* and this should be a multiple of it */

  if (shiftDiv.scrollLeft > vrepos) {
	for (var i = shiftDiv.scrollLeft; i >= vrepos; i -= z) { 
	  setTimeout("shiftit('" + div + "', " + i + ")", (timer * speed));
	  timer++;
	}
  }
  else {
	for (var i = shiftDiv.scrollLeft; i <= vrepos; i += z) {
	  setTimeout("shiftit('" + div + "', " + i + ")", (timer * speed));
	  timer++;
	}
  }
}
function scrolly(div, hpos, secs) {
  var shiftDiv = document.getElementById(div);
  var speed = Math.round(secs / 100);
  var timer = 0;
  var hrepos = (600 * hpos); /* the first number is the height of the framing elements */
  var z = 25; /* and this should be a multiple of it */

  //alert(shiftDiv.id + ' ' + shiftDiv.scrollTop + ' ' + shiftDiv.offsetHeight);

  if (shiftDiv.scrollTop > hrepos) {
	for (var i = shiftDiv.scrollTop; i >= hrepos; i -= z) {
	  setTimeout("liftit('" + div + "', " + i + ")", (timer * speed));
	  timer++;
	}
  }
  else {
	for (var i = shiftDiv.scrollTop; i <= hrepos; i += z) { 
	  setTimeout("liftit('" + div + "', " + i + ")", (timer * speed));
	  timer++;
	}
  }
}
function liftit(div, y) {
  document.getElementById(div).scrollTop = y;
}
function shiftit(div, x) {
  document.getElementById(div).scrollLeft = x;
}
/* End scroll functions */
