// Initiate the image count variable
var imageCount = 0;
// create an array to contain the preloaded image files
var preloadImages = new Array();

// Main function to load new image into browser
function preload(imageFile)
{
imageCount++;
preloadImages[imageCount] = new Image();
preloadImages[imageCount].src = imageFile;
}

// Basic function to load the images when the browser has loaded the webpage.
window.onload = function() {
preload('../img/ico-facebook-final.gif');
preload('../img/ico-twiter-final.gif');
preload('../img/ico-rss-final.gif');
preload('../assets/images/slideshow/burlington-church-mission.jpg');
preload('../img/dwell-church-gathering.jpg');
preload('../img/hope_for_haiti.jpg');
preload('../img/dwells-story.jpg');
preload('../img/dwell-missional-church-blog.jpg');
}
