// create the necessary Arrays

var mainSectionIdArray = new Array('home','lease','apply','maintenance','landlords','projects','about', 'contact','property');
var mainSectionNameArray = new Array('HOME','FOR LEASE','APPLY','MAINTENANCE','LANDLORDS','SPECIAL PROJECTS','ABOUT US', 'CONTACT','PROPERTY SALES');
var mainSectionUrlArray = new Array('index.php'
							,'properties.php?type=rent'
							,'apply.html'
							,'maintenance.html'
							,'landlords.html'
							,'special-projects.html'
							,'about-us.html'
							,'contact.php'
							,'http://www.jillanderson.com.au');

var mainNav = '<div id=\"topNav\">\n';
mainNav += '<ul id=\"mainNav\">\n';

for(var i=0; i<mainSectionIdArray.length; i++){
	if(section == mainSectionIdArray[i]){
		mainNav += '<li class=\"divide\" id=\"'+mainSectionIdArray[i]+'\"><a href=\"'+mainSectionUrlArray[i]+'\" class=\"selected\">'+mainSectionNameArray[i]+'</a></li>\n';
	}else{
		mainNav += '<li class=\"divide\" id=\"'+mainSectionIdArray[i]+'\"><a href=\"'+mainSectionUrlArray[i]+'\">'+mainSectionNameArray[i]+'</a></li>\n';
		
	}
	mainNav += '<li><img src="images/global/nav/nav-divider-green.png" alt=""/></li>\n';
};

mainNav += '</ul>\n';
mainNav += '</div>\n';

document.write(mainNav);

// Update the logo div to contain the agent's phone number and an email address.

var logoDiv = document.getElementById( 'logo' );
logoDiv.innerHTML += '<div id="agents-details"><span>03 9670 5444</span><a href="mailto:ja@leasingmelbourne.com.au">ja@leasingmelbourne.com.au</a></div>';