	var isDomReady = false;
	
	var imagePath = 'images/home/';
	var sourceImages = [
		'Redesign1_Bathroom1.jpg',
		'Redesign1_Bathroom3.jpg',
		'DirtyPretty1.jpg',
		'DirtyPretty3.jpg',
		'IronHorse1.jpg',
		'IronHorse2.jpg',
		'Kitchen1.jpg',
		'Kitchen2.jpg',
		'Redesign2_Bathroom1.jpg',
		'Prohibition1.jpg',
		'Prohibition2.jpg'
	];
	
	function assignImages (containerID, arr_set) {
		var setSize = arr_set.length;
	
		var container = document.getElementById (containerID);
		var img1 = document.createElement ('img');
		var img2 = document.createElement ('img');
		
		var index1 = -1, index2 = -1;
		
		while ( index1 == index2 ) {
			index1 = Math.round (Math.random () * setSize-0.5);
			index2 = Math.round (Math.random () * setSize-0.5);
		}

		img1.src = imagePath + arr_set[index1];
		img2.src = imagePath + arr_set[index2];
		
		img1.setAttribute ('class', 'homeImg');
		img1.setAttribute ('className', 'homeImg');

		img2.setAttribute ('class', 'homeImg');
		img2.setAttribute ('className', 'homeImg');
		
		container.appendChild (img1);
		container.appendChild (img2);
	}
	//
	//	Borrowed from jQuery library with mods.
	//	http://jQuery.com
	//
	function domReady (callback){
		// Mozilla, Opera and webkit nightlies currently support this event
		if ( document.addEventListener ) {
			// Use the handy event callback
			document.addEventListener( "DOMContentLoaded", function(){
				document.removeEventListener( "DOMContentLoaded", arguments.callee, false );
				callback ();
			}, false );
	
		// If IE event model is used
		} else if ( document.attachEvent ) {
			// ensure firing before onload,
			// maybe late but safe also for iframes
			document.attachEvent("onreadystatechange", function(){
				if ( document.readyState === "complete" ) {
					document.detachEvent( "onreadystatechange", arguments.callee );
					callback();
				}
			});
	
			// If IE and not an iframe
			// continually check to see if the document is ready
			if ( document.documentElement.doScroll && typeof window.frameElement === "undefined" ) (function(){
				if ( isDomReady ) return;
	
				try {
					// If IE is used, use the trick by Diego Perini
					// http://javascript.nwbox.com/IEContentLoaded/
					document.documentElement.doScroll("left");
				} catch( error ) {
					setTimeout( arguments.callee, 0 );
					return;
				}
				
				isDomReady = true;
				// and execute any waiting functions
				callback ();
			})();
		} else {
			// A fallback to window.onload, that will always work
			window.load = callback ();
		}
	}
