function slideshow() {
  a = document.getElementById("slide_belt");
  b = a.getElementsByTagName("a");
  c = b.length;
  h=c-1;
  i=0;
  j=1;
  interval = setInterval("nav_auto()", 5000);
  for (r=1; r<c; r++) {
    b[r].style.display = "none";
  }  
}
function nav_g() {
  clearInterval(interval);
  interval = setInterval("nav_auto()", 8000);
  new Effect.Fade(b[i], { duration: 0.5, queue: { position: 'front', scope: 'faddingtool', limit: 0 } } );
  new Effect.Appear(b[h], { duration: 0.5, queue: { position: 'front', scope: 'appeartool', limit: 0 } } );
  h--;
  i--;
  j--;
  if (h<0) { h=c-1; }
  if (i<0) { i=c-1; }
  if (j<0) { j=c-1; }
}
function nav_d() {
  clearInterval(interval);
  interval = setInterval("nav_auto()", 8000);
  new Effect.Fade(b[i], { duration: 0.5, queue: { position: 'front', scope: 'faddingtool', limit: 0 } } );
  new Effect.Appear(b[j], { duration: 0.5, queue: { position: 'front', scope: 'appeartool', limit: 0 } } );
  h++;
  i++;
  j++;
  if (h+1>c) { h=0; }
  if (i+1>c) { i=0; }
  if (j+1>c) { j=0; }
}
function nav_auto() {
  new Effect.Fade(b[i], { duration: 1, queue: { position: 'front', scope: 'faddingtool', limit: 0 } } );
  new Effect.Appear(b[j], { duration: 1, queue: { position: 'front', scope: 'appeartool', limit: 0 } } );
  h++;
  i++;
  j++;
  if (h+1>c) { h=0; }
  if (i+1>c) { i=0; }
  if (j+1>c) { j=0; }
}
function nav_to(n) {
  document.getElementsByClassName("nav_mm")[i].setAttribute("class", "nav_mm");
  document.getElementsByClassName("nav_mm")[i].setAttribute("className", "nav_mm");
  new Effect.Fade(b[i], { duration: 1.0 });
  new Effect.Appear(b[n], { duration: 1.0 });
  i=n;
  j=i+1;
  document.getElementsByClassName("nav_mm")[i].setAttribute("class", "nav_mm nav_mm_hover");
  document.getElementsByClassName("nav_mm")[i].setAttribute("className", "nav_mm nav_mm_hover");
  if (i+1>c) { i=0; }
  if (j+1>c) { j=0; }
  if (sldshwState == "play") {
    clearInterval(interval);
    interval = setInterval("nav_d()", 4000);
  }
}

function slide_names() {
  t = document.getElementById("quote_name");
  u = t.getElementsByTagName("p");
  v = u.length;
    
  for (x=0; x<v; x++) {
    u[x].style.display = "none";
  }
  x=Math.floor(Math.random()*v);  
  u[x].style.display = "";
  interval_2 = setInterval("switch_name()", 15000);
  
}
function switch_name() {
  new Effect.Fade(u[x], { duration: 1, queue: { position: 'front', scope: 'appeartool2', limit: 0 } } );
  x=Math.floor(Math.random()*v);
  new Effect.Appear(u[x], { duration: 1, queue: { position: 'front', scope: 'faddingtool2', limit: 0 } } );   
}
