// Remember to include commonfuncs.js before using this


var toTopFunc = function toTop() {
  var tag = getElement('top');
  if (tag != null && tag.scrollIntoView) {
    tag.scrollIntoView(true);
  }
  else window.location='#top';
}

function switchPic(elementName, url) {
  var tag = getElement(elementName);
  if (tag != null) {tag.src = url;}
}


var scroll, newpos, pos;
newpos=0;
function initScroll(element) {
  pos=parseInt(parseInt(getElement(element).style.top));
  setTimeout("scrollit('"+ element +"')",750);
}

function scrollit(element) {
  scroll=parseInt(getDocumentBody().scrollTop);
  if (scroll < 375) newpos=pos;
  else newpos=scroll-375;
  getElement(element).style.top=newpos +"px";
  setTimeout("scrollit('"+ element +"')",750);
}
