function preloadImages(imgs){ var picArr = []; for (i = 0; i