javascript return document readystate