Okay I\'m using jQuery and currently getting max value of scrollbar doing this:
var $body = $(\'body\'); $body.scrollLeft(99999); // will give me the max val
You can use $(document).width() to get the full width of your document, and $(window).width() to get the width of the window/viewport.
$(document).width()
$(window).width()
http://api.jquery.com/width/