    function toDrag(el,main){this.el=el;this.main=main;}		
	toDrag.prototype={		
		ahhg:function(){
			this.v={x:0,y:0,oX:0,oY:0,init:true},
			this.e={x:this.el.offsetLeft,y:this.el.offsetTop},
			this.m={x:0,y:0}
		},
		init:function(){this.ahhg();
			this.mouseDown();this.mouseUp();
		},
		mouseDown:function(){
			this.el.onmousedown=c$(this,'mouseMove');
			return false; 
		},
		mouseUp:function(){
			this.main.onmouseup=c$(this,'stopMove');		
			this.el.onmouseup=  c$(this,'stopMove');				
		},		
		mouseMove:function(){
			this.setSelect(false);
			this.v.init=true;
			this.main.onmousemove=c$(this,'trackMove');
			return false;
		},
		stopMove:function(){	
		    //alert(this.x);
		    this.setSelect(true);	
			this.main.onmousemove=null;
		},
		setSelect:function(setr){
		    document.ondragstart=function(){return setr;}; 
		    document.onselectstart=function(){return setr;};  		
		},
		trackMove:function(e){  //check here - enable position change based on track click		
			this.getPos(e);						
			this.styleTop(this.el,this.y);
			
			//alert(this.e.x+"_____"+this.m.x);
			
			this.styleLeft(this.el,this.x);
			return false;
		},
		styleTop:function(el,val){el.style.top=val+'px';},
		styleLeft:function(el,val){el.style.left=val+'px';},
		getPos:function(e){					
			this.e=this.getElPos(this.el);	
			this.m=this.getMousePos(e);			
			if(this.v.init)this.setOffset();
			this.y=((this.m.y-this.e.y)+this.el.offsetTop)-this.v.oY;				
			this.x=((this.m.x-this.e.x)+this.el.offsetLeft)-this.v.oX;
			
			//alert(this.x+"____"+this.m.x+"_____"+this.e.x+"_____"+this.el.offsetLeft);
			
		},
		setOffset:function(){
			this.v.oX=this.m.x-this.e.x;
			this.v.oY=this.m.y-this.e.y;
			this.v.init=false;
		},
		getElPos:function(el){		
			var c={x:0,y:0};
			while(el.offsetParent){
				c.x+=el.offsetLeft;
				c.y+=el.offsetTop;
				el=el.offsetParent;
			}return c;						
		},			
		getMousePos:function(event){		
			var e=(window.event)?window.event:event;
			if(e.pageX||e.pageY){return({x:e.pageX,y:e.pageY});}
			else{return({x:e.clientX,y:e.clientY});}			
		}
	};	
	scroller.prototype=new toDrag();
	scroller.prototype.constructor=scroller;
	function scroller(sBlock,handle,container,toScroll,wrap,direction){	
		this.el=handle;
		this.main=document;
		this.toScroll=toScroll;	
		this.container=container;
		this.wrap=wrap;
		this.bounds={min:0,max:0};		
		this.dir=direction;
		this.sBlock=sBlock;
	    this.timer=new t();
		this.initStuff();
		this.setMouseWheel(wrap.id);		
	}
	scroller.prototype.setMouseWheel=function(wrap){
	    var mousewheelevt=(/Firefox/i.test(navigator.userAgent))? "DOMMouseScroll" : "mousewheel"; //FF doesn't recognize mousewheel as of FF3.x  
        if ($(wrap).attachEvent){ //if IE (and Opera depending on user setting)  
            $(wrap).attachEvent("on"+mousewheelevt,c$(this,'mouseWheel'));  
        }else if ($(wrap).addEventListener){ //WC3 browsers  
            $(wrap).addEventListener(mousewheelevt,c$(this,'mouseWheel'), false); 
        }
	}
	scroller.prototype.setBounds=function(min,max){
		this.bounds.min=min;
		this.bounds.max=max;
		this.dir=='styleTop'?this.offset=this.toScroll.offsetTop:this.offset=this.toScroll.offsetLeft;
		//alert(this.offset);
	}	
	scroller.prototype.initStuff=function(bool){
	    var minHandleVal=20;
	    this.x=0;this.y=0;this.useVal=0;this.bOffset=0;	 
	    this.dir=='styleTop'?
	    this.toScroll.offsetHeight<=this.wrap.offsetHeight?this.sBlock.style.display='none':this.sBlock.style.display='block'
	    :this.toScroll.offsetWidth<=this.wrap.offsetWidth?this.sBlock.style.display='none':this.sBlock.style.display='block';
	    if(bool!=true){
		    this[this.dir](this.el,0);					
		    this[this.dir](this.toScroll,0);			    		
		    if(this.dir=='styleTop'){
		        var a=this.toScroll.offsetHeight/this.wrap.offsetHeight;
		        var b=parseInt(this.container.offsetHeight/a);
		        this.el.style.height=(b>minHandleVal?b:minHandleVal)+'px';
		    }else{
		        var a=this.toScroll.offsetWidth/this.wrap.offsetWidth;
		        var b=parseInt(this.container.offsetWidth/a);
		        this.el.style.width=(b>minHandleVal?b:minHandleVal)+'px';		    
		    }
		} 
		this.dir=='styleTop'?
		    this.setBounds(0,this.container.offsetHeight-this.el.offsetHeight)
		    :this.setBounds(0,this.container.offsetWidth-this.el.offsetWidth);		
		this.bOffset=this.dir=='styleTop'?
		    (this.toScroll.offsetHeight-this.wrap.offsetHeight+this.offset)/((this.container.offsetHeight-this.el.offsetHeight))//-this.offset)
		    :(this.toScroll.offsetWidth-this.wrap.offsetWidth+this.offset)/((this.container.offsetWidth-this.el.offsetWidth))//-this.offset);		    		
	}
	scroller.prototype.trackMove=function(e){
		this.getPos(e);										
		this.doMove(this.x);
	}
	scroller.prototype.doMove=function(val){/**guffmultistyle-remake*/
		this.useVal=val;
		this.dir=='styleTop'?this.useVal=this.y:this.useVal=this.x;
		this.el.ondragstart=function(){return false;};
		this.el.onselectstart=function(){return false;};		
		if(this.useVal<this.bounds.min){this.useVal=this.bounds.min;}
		else if(this.useVal>this.bounds.max){this.useVal=this.bounds.max;}			
		this.x=this.useVal;
		this.y=this.useVal;
		this[this.dir](this.el,this.useVal);					
		this[this.dir](this.toScroll,((-Math.abs(this.useVal))*this.bOffset));	
		return false;	
	}
	scroller.prototype.startClickMove=function(obj){ /** make section intelligent */		
		var toDo=obj.id.substr(0,8)=='scrollUp'||obj.id.substr(0,10)=='scrollDown'?
		    obj.id.substr(0,8)=='scrollUp'?'clickMoveDown':'clickMoveUp':
		    obj.id.substr(0,10)=='scrollLeft'?'clickMoveRight':'clickMoveLeft';
		this.timer.intervaler(
			c$(this,toDo),
			1
		);
	}
	scroller.prototype.clickMoveDown=function(){ //change these 4:10 values to dynamic
        if(this.y<this.bounds.min){this.y=this.bounds.min;}		
		this.y-=this.bOffset<4?10:4;	
		this.doMove(this.y);	
	}
	scroller.prototype.clickMoveUp=function(){
		if(this.y>this.bounds.max){this.y=this.bounds.max;}		
		this.y+=this.bOffset<4?10:4;				
		this.doMove(this.y);	
	}
	scroller.prototype.clickMoveRight=function(){
        if(this.x<this.bounds.min){this.x=this.bounds.min;}		
		this.x-=this.bOffset<4?10:4;	
		this.doMove(this.x);	
	}
	scroller.prototype.clickMoveLeft=function(){
		if(this.x>this.bounds.max){this.x=this.bounds.max;}		
		this.x+=this.bOffset<4?10:4;				
		this.doMove(this.x);	
	}
	scroller.prototype.stopClickMove=function(){
		clearInterval(this.timer.interval);
	}
	scroller.prototype.mouseWheel=function(event){
	    if(this.sBlock.style.display=='block'){
            this.dir=='styleTop'?this.useVal=this.y:this.useVal=this.x;
            var e=(window.event)?window.event:event;
            var delta=e.detail?(e.detail*(-120)):e.wheelDelta;
            this.useVal=(delta<=-120)?(this.useVal+((this.bOffset<4?10:4))):this.useVal-((this.bOffset<4?10:4));
            this.x=this.useVal;
            this.y=this.useVal;
            this.timer.intervaler(
			    c$(this,'doMove'),
			    10
		    );
            this.timer.timer(
                c$(this,'stopClickMove'),
                20
            );
            if(e.preventDefault){e.preventDefault();}else{return false;}
        }
	}
