basic play page javascript