function load(section) {
	switch (section) {
		case "sales":
			var content = "<div style=\"width: 585px; height: 190px; float: left; \"><p style=\"margin-top: 0px;\">At Lexus of Maroochydore we have a range of vehicles available for your personal preview and test drive experience.</p>";
				content += "<p>Booking a test drive has never been as easy than at Lexus of Maroochydore. We accept that you are busy. Rather than you come to the car, we’ll bring the car to you. At an agreed date & time, we would be delighted to bring the car to your home or place of work, taking the stress out of purchasing your next vehicle. Alternatively, you can visit us at our temporary site located at <b style=\"color: #a7dcee;\">Shop 4 M1 building Duporth Avenue, Maroochydore</b>, enjoy an espresso and let Michael and the sales team look after your every need. For all your sales enquiries, <b style=\"color: #a7dcee;\">please contact 07 5452 8777 or \u006c\u0065\u0078\u0075\u0073\u002e\u006d\u0061\u0072\u006f\u006f\u0063\u0068\u0079\u0064\u006f\u0072\u0065\u0040\u006c\u0065\u0078\u0075\u0073\u006f\u0066\u006d\u0061\u0072\u006f\u006f\u0063\u0068\u0079\u0064\u006f\u0072\u0065\u002e\u0063\u006f\u006d\u002e\u0061\u0075</b>.</p></div>";
				content += "<div id=\"map_canvas\" style=\"width: 253px; height: 183px; float: left; margin-left: 18px; border: solid 2px;\">Google Map</div>"
			break;
		case "service":
			var content = "<p>All of your vehicle service and warranty requirements will be personalised to suit your needs and handled by our dedicated Lexus of Maroochydore team. To arrange your next appointment with our award winning service team, please contact David Durston on <strong>0419 702 880</strong> or email <strong>david.durston@lexusofmaroochydore.com.au</strong></p>";
				content += "<p>Upon your next visit to Brisbane Airport, instead of having your car sitting idly in the car park, we could be busy ensuring it remains in peak condition. As part of our Valet service, we will pick up your vehicle from Qantas Valet*, store it and deliver it back to Valet for your arrival. Included is a complimentary wash so your vehicle is pristine and ready for your return. You are welcome to use this facility to have your vehicle serviced whilst away, allowing even more time to enjoy your vehicle on your return.</p>";
				content += "<p><strong>*Charges apply</strong></p>"
			break;
		case "facility":
			var content = "<p>Welcome to forward thinking. Coming late 2010, our state of the art facility will provide the Sunshine Coast with a level of comfort and service not yet seen before. Our pursuit of perfection goes beyond the vehicles.</p>";
				content += "<p>This new dealership will embody two finely balanced concepts which are central to our design philosophy - 'leading edge' and 'finesse'. This dealership promises to be refined, embracing the casual elegance of its chic seaside location, while elevating the Lexus experience to new heights.</p>";
				content += "<p style=\"width: 300px; margin-top: 35px;\"><strong>Watch this space for further updates.</strong></p>";
				content += "<div id=\"gallery\"><a rel=\"lightbox[]\" href=\"images/001.JPG\" title=\"Lexus of Maroochydore\" ></a></div>";
				content += "<table cellspacing=\"0\" cellpadding=\"5\" border=\"0\" width=\"100%\" style=\"display:none;\">";
				content += "<tbody> <tr> ";
				content += "<td align=\"center\"><a rel=\"lightbox[]\" href=\"images/002.JPG\" title=\"Maroochydore Blvd \"></a></td> ";
				content += "<td align=\"center\"><a rel=\"lightbox[]\" href=\"images/003.JPG\" title=\"Reception\"></a></td>" ;
				content += "<td align=\"center\"><a rel=\"lightbox[]\" href=\"images/004.JPG\" title=\"Cafe\"></a></td>" ;
				content += "<td align=\"center\"><a rel=\"lightbox[]\" href=\"images/005.JPG\" title=\"Cafe\"></a></td>" ;
				content += "<td align=\"center\"><a rel=\"lightbox[]\" href=\"images/006.JPG\" title=\"Cafe lounge\"></a></td>" ;
				content += "<td align=\"center\"><a rel=\"lightbox[]\" href=\"images/007.JPG\" title=\"Sales office\"></a></td>" ;
				content += "<td align=\"center\"><a rel=\"lightbox[]\" href=\"images/008.JPG\" title=\"Sales desk\"></a></td>" ;
				content += "<td align=\"center\"><a rel=\"lightbox[]\" href=\"images/009.JPG\" title=\"World map\"></a></td>" ;
				content += "<td align=\"center\"><a rel=\"lightbox[]\" href=\"images/0010.JPG\" title=\"New car delivery room\"></a></td>";
				content += " </tbody> </tr> </table> ";
			break;
		default:
			section = "home";
			var content = "";
	}

	document.body.id = section;
	document.getElementById('content').innerHTML = content;

	if (section == "sales") {
		// setup map
		initialize();
	}

	if (section == "facility") {
		//Load slimbox
		var links = $$("a").filter(function(el) {
			return el.rel && el.rel.test(/^lightbox/i);
		});
		$$(links).slimbox({overlayOpacity: 0.8,loop:1}, null, function(el) {
			return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));
		});
	}
}


window.onload = function() {
	timer = false;
	var li = document.getElementById('nav').getElementsByTagName('LI');

	for (var i = 0; i < li.length; i++) {
		li[i].onmouseover = function() {
			if (timer) clearTimeout(timer);
			load(this.id.substr(3));
		};

		li[i].onmouseout = function() {
			timer = setTimeout("load('home')", 500);
		}

		li[i].onclick = function() {return false;};
	}

	document.getElementById('content').onmouseover = function() {
		clearTimeout(timer);
	}

	document.getElementById('content').onmouseout = function() {
		timer = setTimeout("load('home')", 1000);
	}

	// Preload the background images
	var img1 = new Image(); img1.src = "../images/bg-sales.jpg";
	var img2 = new Image(); img2.src = "../images/bg-service.jpg";
	var img3 = new Image(); img3.src = "../images/bg-facility.jpg";
}

function initialize() {
	if (GBrowserIsCompatible()) {
		var map = new GMap2(document.getElementById("map_canvas"));
		map.addControl(new GSmallMapControl());
		var center = new GLatLng(-26.65335, 153.09312);
		map.setCenter(center, 15);
		geocoder = new GClientGeocoder();
		var marker = new GMarker(center, {draggable: false});
		map.addOverlay(marker);
	}
}