function MyScroll(o)
{
  this.z=document.getElementById(o);     
  this.n=document.getElementById(o+'W'); 
  this.sty=this.n.style;                 
  
  this.l=0;  //stoper
  this.y=0;  //pozycja

  this.w=this.n.offsetHeight-this.z.offsetHeight; 

  this.obj=o+"Ob"; //ten obiekt nazwiemy... jak warstwa + Objt
  eval(this.obj+"=this") //odwołanie do samego siebie
  
  this.krok=ScrollKrok;
  this.przesun=ScrollPrzesun;
  this.stop=ScrollStop;
  
  function ScrollStop()
  {
     clearInterval(this.l)
  }
    
  function ScrollPrzesun(k) 
  {
      this.stop();
      this.l=setInterval(this.obj+'.krok('+k+')',50);
  }
  
  function ScrollKrok(k) 
  {
   if (k<0 && this.y<0 )
   {
      this.y-=k;
      //this.sty.top=this.y;
		document.getElementById(o+'W').style.top=this.y+"px";  
		
   } else if (k>0 && this.y>-this.w)
   {
      this.y-=k;
      this.sty.top=this.y+"px"; 
		//obiekt=document.getElementById(o+'W');
		//obiekt.style.top=this.y+"px";
		//obiekt.style.setProperty("top",this.y+"px","");
		//document.defaultView.getComputedStyle(obiekt, "").setProperty("top","200","1");
		//alert (document.defaultView.getComputedStyle(obiekt, "").getPropertyValue("top"));
		//document.writeln (obiekt.style.top);
		//alert (gora);
		//gora
		//alert (gora);  
   }
	//alert ("this y:"+this.y+" document.getElementById(o+'W').style.top: "+document.getElementById(o+'W').style.top);
  }
  

} 