$("#btnDown").click(function(){
var a = $(document).height() - $(window).height()
$('body').animate( { scrollTop : $(document).height() - $(window).height() }, 1000);
//$(document).scrollTop($(document).height() - $(window).height());
});
$("#btnUp").click(function(){
$('body').animate( { scrollTop : 0 }, 1000);
//$(document).scrollTop(0);
});