Imageloading code did not work, because the menuStart function were run before the images had finished loading (may depend on the speed of the computer/network), so the images were undefined when menu started to use them. Fixed it with a counter that starts the menu when everything is loaded, is probably not the best solution(?).