added js for finding document height