use addEventListener if available
fix wrong page height in IE
rename height to pageHeight