Well, it seems JavaScript does not know what "documetn" is, no matter how hard I try. Guess I'll have to fix my code. #fail