if(typeof(onloads)=='undefined')
onloads=new Array();
onloads[onloads.length]=fotobanonload;

fdelta=1500;

function fotobanonload()
{
   var e=$('#banner5')[0];
   bannerY=e.offsetTop;
   $(window).scroll(function(e) {
      var h;
      if(typeof(window.innerHeight)=='undefined')
	h=document.documentElement.clientHeight;
      else
	h=window.innerHeight;
      if(h>=624) {
	 var y;
	 if(typeof(window.pageYOffset)=='undefined')
	   y=document.documentElement.scrollTop;
	 else
	   y=window.pageYOffset;
	 if(y>bannerY) {
	    $('#banner5').css("top",(y-bannerY)+"px");
	 }
	 else
	   $('#banner5').css("top","0px");
      }
   });
   var totalw=0;
   $('#fotoban a img').each(function(i,e) {
      totalw+=2+e.clientWidth;
   });
   if(totalw>740) {
      fbc=0;
      fbmax=-$('#fotoban a:first-child img')[0].clientWidth;
      fbt=parseInt(new Date().getTime()/fdelta);
      fbint=setInterval("fotobanmv();",10);
   }
}

function fotobanmv()
{
   var t=parseInt(new Date().getTime()/fdelta);
   fbc-=(t-fbt);
   if(fbc<=fbmax)
     {
	fbc-=fbmax;
	$('#fotoban > div').append($('#fotoban a:first-child')[0]);
	fbmax=-$('#fotoban a:first-child img')[0].clientWidth;
	fbt=parseInt(new Date().getTime()/fdelta);
     }
   $('#fotoban > div').css("left",fbc+"px");
}

