var x = 0;
var y = 0;
	var dest = 0;
	var distance = 0;
	var step = 0;
	var destination = 0;

function scrollit(eixo, destination) {
    step = 5;
    
    if ( eixo == 'h' ) {
        dest = x + destination;
		if (x<dest) {
    		dest = x + destination;
			while (x<dest) {
				step += (step / 2000);
				x += step;
				scroll(x,0);
			} 
			scroll(dest,0);
			x = dest;
		}
    	if (x > dest)  {
			while (x>dest) {
				step += (step / 2000);
                if(x >= (0+step))
				  {
				    x -= step; 
					scroll(x,0);
                  }
				    else { break;  }
			} 

			if(dest >= 0) { scroll(dest,0); }
			x = dest;
		}
		if (x<1) {x=1}
    } else if ( eixo == 'v' ) {
  		dest = y + destination;
		if (y<dest) {
			while (y<dest) {
				step += (step / 2000);
				y += step;
				scroll(0,y);
			} 
			scroll(0,dest);
			y = dest;
		}
    	if (y > dest)  {
			while (y>dest) {
				step += (step / 2000);
                if(y >= (0+step))
				  {
				    y -= step; 
					scroll(0,y);
                  }
				    else { break;  }
			} 

			if(dest >= 0) { scroll(0,dest); }
			x = dest;
		}
		if (y<1) {y=1}
    }
}

function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}
