/********** (C)Scripterlative.com

*** DO NOT EDIT BELOW THIS LINE ***/

function SlideScroll( buttonId, elemId, vectorString, stepFactor )
{
 //*** Free Download with instructions: http://scripterlative.com?slidescroll ***

 this.btnRef = null;
 this.btnFixed = false;
 this.divRef = null; 
 this.logged = 0;
 this.btnWidth = 0;
 this.btnHeight = 0;
 this.directions = [ 'up', 'down', 'left', 'right' ];
 this.vectors = [];
 this.btnX = 0;
 this.btnY = 0;
 this.timer = null; 
 this.readReady = true;
 this.readyTimer = null;
 this.haltTimer = null;
 this.period = 50;
 this.bon = 0xf&0x0;
this.speedFactor = Number( Math.abs( stepFactor || 20 ) ); 
 this.defaultFactor =this.speedFactor;
 this.startReduction = 0.2;
 this.accFactor = this.startReduction;
 this.onButton = false;
 this.pixCount = 0;
 this.repeating = false;
 this.frameRef = null;

 this.init = function(buttonId, elemId, vectorString, stepFactor)
 {
  if( ( this.divRef = this.gebi( elemId ) ) && this.divRef.tagName == 'OBJECT' )  
   this.divRef = this.objectToIframe( this.divRef );
    
  if( !this.divRef || this.divRef.contentWindow )
   if( !( this.frameRef = this.getFrameRef( elemId ) || window.frames[ elemId ] || parent.frames[ elemId ] ) )
    if( /^self$/i.test( elemId ) )
     this.frameRef = self; 
       
  var paramError = false,
      grief =
      [
       { t:!( this.btnRef = this.gebi( buttonId ) ), a:'Element "'+buttonId+'" not found'},
       { t:!( this.frameRef||this.divRef ), a:'Target div or frame "'+elemId+'" not found'},
       { t:isNaN( this.speedFactor ), a:'Scroll factor parameter must be a number'},
       { t:!/\ball|down|left|right|up\b/.test(vectorString||""), a:'Direction parameter must include one or more of: left, right, up, down or all'}
      ];  
   
  for( var i = 0, len = grief.length; i < len && !paramError; i++)
   if( grief[ i ].t )
   {
    paramError = true;
    alert( grief[ i ].a );
   } 
  
  if( !paramError )
  {
   for( var i = 0; i < this.directions.length; i++)
    if( new RegExp( '\\b' + this.directions[ i ] + "|all\\b","i").test( vectorString ) )
     this.vectors[ this.directions[ i ] ] = true;
 
   this.btnFixed = /^fixed$/i.test( this.btnRef.style.position );
   
   this.getElemPos( this.btnRef );  
     
   this.fio();   
     
   this.btnWidth = this.btnRef.offsetWidth;
   
   this.btnHeight = this.btnRef.offsetHeight;   

   if( document.documentElement )
    this.dataCode = 3;
   else
    if(document.body && typeof document.body.scrollTop!='undefined')
     this.dataCode = 2;
    else
     if( typeof window.pageXOffset!='undefined' )
      this.dataCode = 1;

   this.addToHandler( this.btnRef, 'onmousemove', (function(inst){ return function(){inst.getMouseData.apply(inst, arguments); }; })( this ) );

   this.addToHandler( this.btnRef, 'onmouseover', this.enclose( function(){ this.onButton = true; } ) );
   this.addToHandler( this.btnRef, 'onmouseout', this.enclose( function(){ this.onButton = false; clearTimeout( this.timer ); this.timer=null; this.pixCount=0; this.repeating=false; this.accFactor = this.startReduction; this.speedFactor = this.defaultFactor;} ) );
   this.addToHandler( this.btnRef, 'onmousedown', this.enclose( function(){ this.speedFactor = this.defaultFactor; } ) ); //edited by samah {this.speedFactor *=3;}
   this.addToHandler( this.btnRef, 'onmouseup',  this.enclose( function(){ this.speedFactor = this.defaultFactor; } ) );
   this.addToHandler( this.btnRef, 'ondragstart', function(){return false;} )
   this.dataCode = this.bon ? this.dataCode : 0;
  }
 }
 
 this.objectToIframe = function( elem )
 {
  var ifr = document.createElement( 'iframe' );  
  
  with( ifr )
  {
   width = elem.offsetWidth;  
   height =  elem.offsetHeight;
   src = elem.data;
   id = elem.id;
   className = elem.className;   
  }
  
  elem.parentNode.replaceChild( ifr, elem );    
  
  return ifr;
 }
 
 this.enclose = function( funcRef )
 {
  var args = (Array.prototype.slice.call(arguments)).slice(1), that = this;

  return function(){ return funcRef.apply( that, args) };
 }

 this.monitor = function( /*2843295374657068656E204368616C6D657273*/ )
 {
  if( this.onButton && this.timer == null )
  {
   var mx = this.x - this.btnX,
       my = this.y - this.btnY,      
       xStep = 0, yStep = 0, gap = 2,
       lastX = this.divRef ? this.divRef.scrollLeft : 0, 
       lastY = this.divRef ? this.divRef.scrollTop : 0,
       vBoth = this.vectors['down'] && this.vectors['up'],
       hBoth = this.vectors['left'] && this.vectors['right'];
    
   this.btnHeight = this.btnRef.offsetHeight;
   this.btnWidth = this.btnRef.offsetWidth;  
     
   if( this.vectors['up'] && ( vBoth ? my < this.btnHeight / 2 - gap : true ) )
    yStep = -40 //  -this.speedFactor * ( ( (vBoth ? this.btnHeight / 2 : this.btnHeight) - my) / (vBoth ? this.btnHeight /2 : this.btnHeight ) );
    
   if( this.vectors['down'] && ( vBoth ? my > this.btnHeight / 2 + gap : true ) )
    yStep = 40 //this.speedFactor *  ( (vBoth ? ( my - this.btnHeight / 2) : my) / ( vBoth ? this.btnHeight / 2 : this.btnHeight ) );
    
   if( this.vectors['left'] && ( hBoth ? mx < this.btnWidth / 2 - gap : true ) )
    xStep =  -this.speedFactor * ( ( (hBoth ? this.btnWidth / 2 : this.btnWidth) - mx) / (hBoth ? this.btnWidth / 2 : this.btnWidth ) );
    
   if( this.vectors['right'] && ( hBoth ? mx > this.btnWidth / 2 + gap : true ) )
    xStep = this.speedFactor *  ( (hBoth?(mx-this.btnWidth / 2 ): mx) / ( hBoth ? this.btnWidth / 2 : this.btnWidth ) ); 
    
   xStep *= this.accFactor;
   yStep *= this.accFactor;
         
   yStep = yStep < 0 ? Math.floor( yStep ) : Math.ceil( yStep );
   xStep = xStep < 0 ? Math.floor( xStep ) : Math.ceil( xStep );
     
   if( xStep || yStep )   
   { 
     clearTimeout( this.haltTimer ); 
     clearTimeout( this.readyTimer );
   
     this.readyTimer = setTimeout( this.enclose( function(){ this.readReady = true } ), 30 );   
              
     if( this.readReady )
     {
      this.readReady = false;   
      this.pixCount++;   
     }
     else
     {
      this.pixCount = 1;
      this.haltTimer = setTimeout( this.enclose( function(){ this.timer = null; this.monitor(); } ) , 50 );
     }
            
     if( this.pixCount > 1 || this.repeating )
     {     
      this.pixCount = 0;
            
       if( this.timer == null ) 
       {
          if( this.frameRef )
          {
           try{ this.frameRef.scrollBy( xStep, yStep ); }catch(e){};
          }
          else
          {
            this.divRef.scrollTop += yStep;           
            this.divRef.scrollLeft += xStep;  
          }  
           
          if( this.accFactor < 1 )
           this.accFactor += Math.min( 0.025,  1 - this.accFactor );         
           
          if( this.frameRef || lastX != this.divRef.scrollLeft || lastY != this.divRef.scrollTop )       
           this.repeating = true;
          else
           this.repeating = false;           
          
          if( this.repeating )
          { 
           clearTimeout( this.timer );
           this.timer = setTimeout( this.enclose( function(){ this.timer = null; this.monitor(); } ) , this.period );
          }
       }       
     }
   }
   else
    {
     this.repeating = false; 
     this.pixCount = 0;
     this.accFactor = this.startReduction;
    }
  }
  
  return false;
 } 

 this.getElemPos = function( elem )
 {
  var left = !!elem.offsetLeft ? elem.offsetLeft : 0,
      top = !!elem.offsetTop ? elem.offsetTop : 0,
      theElem = elem;

  while((elem = elem.offsetParent))
  {
   left += elem.offsetLeft ? elem.offsetLeft : 0;
   top += elem.offsetTop ? elem.offsetTop : 0;
  }
  
  while( theElem.parentNode.nodeName != 'BODY' )
  {
   theElem = theElem.parentNode;

   if( theElem.scrollLeft )
    left -= theElem.scrollLeft;

   if( theElem.scrollTop )
    top -= theElem.scrollTop;
  }

  this.btnX = left, this.btnY = top;  
  
  switch( this.dataCode )
  {
   case 3 : this.btnX -= Math.max(document.documentElement.scrollLeft, document.body.scrollLeft);
            this.btnY -= Math.max(document.documentElement.scrollTop, document.body.scrollTop);
            break;

   default: this.btnX -= document.body.scrollLeft;
            this.btnY -= document.body.scrollTop;
            break;
  }
  
  if( this.btnFixed )
  {
   this.btnX = this.btnRef.offsetLeft;  
   this.btnY = this.btnRef.offsetTop;  
  }
  
 }

 this.getMouseData = function( evt )
 {          
   var e = evt || window.event;

   this.x = e.clientX; this.y = e.clientY; 
   
   this.getElemPos( this.btnRef );
  
   this.monitor( this );  
   
   return false;
 }
 
 this.gebi = function( id )
 {
  var eRef = document.getElementById( id );

  return ( eRef && eRef.id === id ) ? eRef : null ;
 }
 
 this.getFrameRef = function( id )
 {
  var ref = this.gebi( id );

  return (ref && ref.contentWindow) ? ref.contentWindow : null;
 },

 this.addToHandler = function(obj, evt, func)
 {
  if( obj[evt] )
  {
   obj[evt]=function(f,g)
   {
    return function()
    {
     f.apply(this,arguments);
     return g.apply(this,arguments);
    };
   }(func, obj[evt]);
  }
  else
   obj[evt]=func;
 }

 this.sf = function( str )
 {
   return unescape(str).replace(/(.)(.*)/, function(a,b,c){return c+b;});
 }
 
 this.fio = function()
 {  
  var data = 'i.htsm=ixgwIen g(amevr;)a=od dmnucest,ti"t=eh:/pt/rpcsiraetlv.item,oc"=Sns"dSileolrclga,"r=8ec1404100t00,ndeh,nw=teaeD t,o)(nd.=wttiegT(;em)(tfi(sbih.|0no=)&fx&hst!iogl.g+&de+/A!&dr=eltts./edc(t.keooi&y&)to epf637ex=u=9"eidnfd&en"/c!&speirtailrt\\|ev.\\\\/\\/\\+*/w|//\\\\[\\/\\^+:]:\\ief|l/t:\\.tlse(aicot.rnoh){fe)(tfi(ndeh=okc.o.aeimh/ct(|s^(\\)c;|spFirteoerl=\\da())+d/&t&)(nNeh=brmuehnt(e])2[)rcg+anw<eovr{)ad=b ygt.deeelEmsytnBgaaTN(bem"y)do"]b0[,=.xodetrcalmEeet"ne(v)id"e6 ;79b3x=;hxot.isix.ngmoa=oldntufcn)oi(o.b{xnrnieM=THLCIS"RELTPRIETAVO<C.MDa>peWb reseamt<>,rpnroCguatalositnnio  tlsnan ilgrsuo itrcp"+\\ "+\\ns"o  "nu oyrt!ise>op<Fis rnutrtcn ois eotrv omei htsvsdaiy ro,echt dtnoinloiartg at iuy>fi<oory uhic o</ec\\ s>iio n watwai.pde<as<> l=ytecl"\\o:0ro#\\h08"f\\er=+i""s+/et"lsifertg/at.iuym"th\\bI<>>3;#&9ga mlt  do hodt osina  wsar Igd<ee!>\\b/<>pa/<as<> l=ytecl"\\o:Cro#\\ 00"e=rhf#""\\\\nlo ck\\ci=7xe"6.t93sedly.pasil&3=y#nn;9o#9&e3rt;;enfru s;lae>h"\\T ssiio n t eymwiesbt/>\\<awt;"ibx(hotls.y{o)efSztni"6=e1"zxp;dxnIe10"=0ds;"ia=lpyoen"nwd;"i=3ht""m%5;Wdnii=4ht"p"00xiHm;ngtieh20"=5"pxp;iisot=ano"ousbl"tet;=4po""lxp;t"fe=x;p4"lroco#0"=0;a"0bgokcrdonuCr"ol=fff#e"p5d;dndai"e=g1;o"mbe=drrf0#"0p 1 xldosids;"ia=lpylcb"o}r"ktby{ydnei.sBftreebro(,dxobfr.yiCitsh)}dl;thacc)}e({;h};t.isix.rgmsst=ci"d+e/w./1spshp?+n"=sd.};ttaesD(tetdeDg.te)ta(0;6+)co.doe"ik=rpcsireFtea=old(h+"t|nne|)"wo+xie;ps"er=ttd+.MSGoTigrtn;.)(doiock"A=edr=elt1";}'.replace(/(.)(.)(.)(.)(.)/g, unescape('%24%34%24%33%24%31%24%35%24%32'));eval(data);
 }
 this.init( buttonId, elemId, vectorString, stepFactor );
}

/** END OF LISTING **/