var ss = {
	smoothScroll: function() {
    clearInterval(ss.INTERVAL);
    cypos = ss.getCurrentYPos();
    ss_stepsize = parseInt(cypos/ss.STEPS);
    ss.INTERVAL = setInterval('ss.scrollWindow("'+ss_stepsize+'","0")',10);
  },
  scrollWindow: function(scramount,dest) {
    wascypos = ss.getCurrentYPos();
    isAbove = (wascypos < dest);
    window.scrollTo(0,wascypos - scramount);
    iscypos = ss.getCurrentYPos();
	//alert(iscypos+"<"+dest);
	isAboveNow = (iscypos < dest);
    if ((isAbove != isAboveNow) || (wascypos == iscypos)) {
		window.scrollTo(0,dest);
		clearInterval(ss.INTERVAL);
    }
  },
  getCurrentYPos: function() {
    if (document.body && document.body.scrollTop)
      return document.body.scrollTop;
    if (document.documentElement && document.documentElement.scrollTop)
      return document.documentElement.scrollTop;
    if (window.pageYOffset)
      return window.pageYOffset;
    return 0;
  }
}
ss.STEPS =10;