// The client side event NextButtonClicked takes two parameters, sender and e.
// Sender is the object which is raising the event
// e is the ImageViewerButtonEventArgs
function WebImageViewer_NextButtonClicked(sender, e) {
var imageViewer = $find("WebImageViewer1");
// Gets the HTML DOM element associated with the event
var buttonElement = e.getButtonElem();
// Get the scroll animation object
var scrollAnimations = imageViewer.get_scrollAnimations();
// Set the Animation type to continuous
scrollAnimations.set_type($IG.ScrollAnimation.Continuous);
// Specify the direction
imageViewer.navigateNext();
}