Added "window" keyword to JavaScript