			var cbody=document.getElementById('cbody');			
			var cbodycontheight=parseInt(document.getElementById('cbodycontainer').style.height);
			var cbodyheight=cbody.clientHeight -cbodycontheight;	
			var scrpos=0;
			var cpip=0;//content div's position in percentage
			var scrollbar=document.getElementById('scrollbar');
			var scrollbutton=document.getElementById('scrollbutton');		
			var scrollbarheight=(cbodycontheight-(parseInt(scrollbutton.height)));
			
			function ondrag(){
					if(parseInt(scrollbutton.style.top)<0)scrollbutton.style.top='0px';
					if(parseInt(scrollbutton.style.top)>scrollbarheight)scrollbutton.style.top=scrollbarheight+'px';
					scrollbutton.style.left='0px';
					cpip=parseInt(scrollbutton.style.top)/scrollbarheight;
					cbody.style.top=-(cpip*cbodyheight)+'px';
			};
			
			function initpage(){
				//if((cbodycontheight-350)<cbodyheight){
				if(cbodyheight>0){
					if(window.addEventListener) document.addEventListener('DOMMouseScroll', fmousewheel, false);
					document.onmousewheel = fmousewheel;	
				}else{//görgetősáv eltüntetése
					scrollbutton.style.display="none";
				};
					
			};
				
			function fmousewheel(event){
				var delta = 0;
				if (!event) event = window.event;
				// normalize the delta
				if (event.wheelDelta){
					// IE & Opera
					delta = event.wheelDelta / 120;
				}else if (event.detail){// W3C
					delta = -event.detail / 3;
				};
				addwheeldata(delta);
			};			
				
			
			function addwheeldata(delta){	 		
				cbody.style.top=(parseInt(cbody.style.top)+(delta*30))+'px';
				
				if(cbodyheight<(-parseInt(cbody.style.top)))cbody.style.top=-cbodyheight+'px';
				if(-parseInt(cbody.style.top)<0)cbody.style.top='0px';
				
				cpip=(parseInt(cbody.style.top)/-cbodyheight);
				scrollbutton.style.top=(scrollbarheight*cpip)+'px';
			};
			
			DragHandler.attach(scrollbutton);	
			scrollbutton.onDrag=ondrag;
			initpage();
		
