var rslt;
var loaded = false; // Declares that images have not been loaded.

function loadImg(){ // Passes the urls to the newImg function. Called from the <BODY> tag: <BODY ONLOAD="loadImg();">
	if (document.images){ // Checks for the existence of the images[] array (JavaScript 1.1 and higher).

		// Begin Images Sources
		var img1 = newImg("images/contact_cal.gif");
		var img2 = newImg("images/contact_van_on.gif");
		var img3 = newImg("images/firm_our_philosophy_on.gif");
		var img4 = newImg("images/law_employment_on.gif");
		var img5 = newImg("images/law_faq_on.gif");
		var img6 = newImg("images/law_insurance_on.gif");
		var img7 = newImg("images/law_labour_on.gif");
		var img8 = newImg("images/law_links_on.gif");
		var img9 = newImg("images/law_recent_on.gif");
		var img10 = newImg("images/law_summary_on.gif");
		var img11 = newImg("images/lawyers_articling_on.gif");
		var img12 = newImg("images/lawyers_counsel_on.gif");
		var img13 = newImg("images/lawyers_employment_on.gif");
		var img14 = newImg("images/lawyers_profile_on.gif");
		var img15 = newImg("images/lawyers_summer_on.gif");
		var img16 = newImg("images/menu_02_on.gif");
		var img17 = newImg("images/menu_03_on.gif");
		var img18 = newImg("images/menu_04_on.gif");
		var img19 = newImg("images/menu_05_on.gif");
		var img20 = newImg("images/menu_06_on.gif");
		var img21 = newImg("images/menu_07_on.gif");
		var img22 = newImg("images/rotate_01.jpg");
		var img23 = newImg("images/rotate_02.jpg");
		var img24 = newImg("images/rotate_03.jpg");
		var img25 = newImg("images/rotate_04.jpg");
		var img26 = newImg("images/rotate_05.jpg");
		var img27 = newImg("images/rotate_06.jpg");
		// End Images Sources

		loaded = true; // Lets the swapImg funtion know the images are loaded.
	}
}

function newImg(img_src){ // Creates new image objects and loads the urls imto the browser's memory cache. Called by the loadImg function.
	if (document.images){ // Checks for the existence of the images[] array (JavaScript 1.1 and higher).
		rslt = new Image(); // Creates the image object.
		rslt.src = img_src; // Assigns the image source url to the new image object.
		return rslt; // Returns the result to the loadImg funtion.
	}
}
