// This file contains functions that load XML content and places such content on the website.
		
	function loadHomesXML()
	{
		// This section takes care of loading the XML file.
		var xmlDoc=null;

		if (window.XMLHttpRequest)
		{
			xhttp=new XMLHttpRequest();
		}
		else // Internet Explorer 5/6
		{
			xhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
		xhttp.open("GET","documents/homes.xml",false); // Be sure to change this filename to the source file you want.
		xhttp.send("");
		xmlDoc=xhttp.responseXML;
		
		// If the source file exists and loaded properly, proceed with function.
		if (xmlDoc!=null)
		{
			var nov_homes;
			var nov_title;
			var nov_price;
			var nov_photo;
			var nov_pdf;
			
			var nov_htmlContent="";

			// Load all homes.
			var nov_homes=xmlDoc.getElementsByTagName("HOME");
			
			// Extract the information from the XML file.
			for (j=0;j<nov_homes.length;j++)
			{
				nov_title=nov_homes[j].getElementsByTagName("TITLE")[0].childNodes[0].nodeValue;
				nov_price=nov_homes[j].getElementsByTagName("PRICE")[0].childNodes[0].nodeValue;
				nov_photo=nov_homes[j].getElementsByTagName("PHOTO")[0].childNodes[0].nodeValue;
				nov_pdf=nov_homes[j].getElementsByTagName("PDF")[0].childNodes[0].nodeValue;
				
				nov_htmlContent=nov_htmlContent + '<img class="float-left" name="photo" alt="Novera Homes - Home for Sale" src="images/homes/' + nov_photo + '" /> \n' + '<h2>' + nov_title + '</h2> \n <h5>Price: '+ nov_price + '</h5> \n <a href="documents/' + nov_pdf + '" target="_blank"><img alt="View PDF Info Sheet" name="button" src="images/structure/nov-button-homepdf_noshad.png" /></a> \n <br /><br /><br /> \n';
			}
			
			// Instert the content into the html file.
			document.getElementById("nov-homes-container").innerHTML = nov_htmlContent;
		}
		else
		{
			alert("Error loading XML");
		}
	}
