Random imagery that resizes

Can anyone tell me how this site did this? They have a different image showing up each time you refresh the page. They also have the page set to a specific size so when you make the window bigger the rest of the background image shows itself. On top of the random image question how are they able to load all of these gigantic background images without it taking forever to load?