title: scroll page so that element is visible
body: <p>I've just tried prototype's <a href="http://www.prototypejs.org/api/element/scrollto" rel="noreferrer">scrollTo</a> function and as the documentation states, it </p>
  
  <blockquote>
    <p>Scrolls the window so that element
    appears at the top of the viewport</p>
  </blockquote>
  
  <p>I'd like a function that </p>
  
  <ol>
  <li>only scrolls if the element is not entirely visible within the viewport</li>
  <li>scrolls so that the element appears at the center of the viewport</li>
  </ol>
  
  <p>does anyone know of such a function in prototype, scriptaculous or stand-alone?</p>