replaced scrollX with pageYOffset for better IE support