viewability -- Drag and resize the red box around

This is a dragging-based solution. Check out the timer solution.

			
viewability.horizontal(document.getElementById('draggable'));
viewability.vertical(document.getElementById('draggable'));