function init()
{
var agent = navigator.userAgent.toLowerCase();
var menuHeight;
var width = screen.width / 2
if (screen.width <= 800) {
	width = screen.width - 125; 
}
else if (screen.width <= 1152) {
	width = screen.width - 460; 
}
else if (screen.width <= 1280) {
	width = screen.width - 575; 
}
else if (screen.width <= 1600) {
	width = screen.width - 875; 
}

if (document.all)
{
	var version = parseFloat(agent.substr(agent.indexOf("msie")+5, 3));
	if (version >= 4) 
		menuHeight = 93;
}
else if (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 4) {
	menuHeight = 86;
	width = width + 20;
}

	//Main Menu items:
	menus[0] = new menu(22, "horizontal", 0, menuHeight, -2, -2, "#008000", "white", "Arial,Helvetica,sans-serif", 10, 
		"bold", "bold", "white", "black", 1, "black", 2, "rollover:images/tri-down2.gif:images/tri-down1.gif", false, true, true, true, 5, true, 4, 4, "black");
	menus[0].addItem("http://www.vireb.com/home.html", "", 60, "center", "Home", 0);
	menus[0].addItem("http://www.vireb.com/news.shtml", "", 60, "center", "News", 0);
	menus[0].addItem("http://www.vireb.com/aboutVireb.html", "", 120, "center", "About VIREB", 1);
	menus[0].addItem("http://www.vireb.com/findListing.html", "", 120, "center", "Find a Listing", 0);
	menus[0].addItem("http://www.vireb.com/articles.html", "", 130, "center", "Consumer Info", 6);
	menus[0].addItem("#", "", 70, "center", "MLS®", 2);
	menus[0].addItem("#", "", 80, "center", "Links", 3);

	//Allows the menu to be centered depending on the resolution
	menus[0].floatMenu(width, screen.height, 10, 0);

//Menu for "About VIREB":
	menus[1] = new menu(130, "vertical", 0, 0, 0, 0, "#008000", "white", "MS Sans Serif,Arial,Helvetica,sans-serif", 8, "bold", "bold", "white", "black", 1, "black", 2, ">>", false, true, false, false, 0, true, 4, 4, "black");
	menus[1].addItem("http://www.vireb.com/pastpres.php#pres", "", 22, "left", "Past Presidents", 9);
	menus[1].addItem("http://www.vireb.com/officeRealtor.html", "", 22, "left", "Office/Realtor", 0);
	menus[1].addItem("http://www.vireb.com/virebprivacypolicy.html", "", 22, "left", "Privacy Policy", 0);
	menus[1].addItem("http://www.vireb.com/copyright.html", "", 22, "left", "VIREB Copyright", 0);
	menus[1].addItem("http://www.vireb.com/poll.html", "", 22, "left", "Poll", 0);

	menus[2] = new menu(130, "vertical", 0, 0, 0, 0, "#008000", "white", "MS Sans Serif,Arial,Helvetica,sans-serif", 8, "bold", "bold", "white", "black", 1, "black", 2, ">>", false, true, false, false, 0, true, 4, 4, "black");
	menus[2].addItem("http://www.vireb.com/sales.html", "", 22, "left", "MLS® Statistics", 0);
	menus[2].addItem("http://www.vireb.com/whatIsMLS.html", "", 22, "left", "What is MLS®", 0);

//Menu for Links
	menus[3] = new menu(150, "vertical", 0, 0, 0, 0, "#008000", "white", "MS Sans Serif,Arial,Helvetica,sans-serif", 8, "bold", "bold", "white", "black", 1, "black", 2, ">>", false, true, false, false, 0, true, 4, 4, "black");
	menus[3].addItem("http://www.vireb.com/communities.html#general", "", 22, "left", "General Links", 8);
	menus[3].addItem("http://www.vireb.com/communities.html", "", 22, "left", "Communities", 4);
	menus[3].addItem("", "", 22, "left", "Quick Links", 5);
	menus[3].addItem("http://www.vireb.com/complaintProcess.html", "", 22, "left", "Complaints Process", 7);

//Menu for Sub Menu "Communities":
	menus[4] = new menu(220, "vertical", 0, 0, 0, 0, "#E1E1E1", "black", "MS Sans Serif,Arial,Helvetica,sans-serif", 8, "bold", "bold", "black", "white", 1, "black", 2, 62, false, true, false, false, 0, true, 4, 4, "black");
	menus[4].addItem("http://www.vireb.com/comm_cr-ni.html", "", 22, "left", "Campbell River/North Islands", 0);
	menus[4].addItem("http://www.vireb.com/comm_pa-pk-qu.html", "", 22, "left", "Port Alberni", 0);
	menus[4].addItem("http://www.vireb.com/comm_cv.html", "", 22, "left", "Comox Valley", 0);
	menus[4].addItem("http://www.vireb.com/comm_pa-pk-qu.html", "", 22, "left", "Parksville/Qualicum", 0);
	menus[4].addItem("http://www.vireb.com/comm_na.html", "", 22, "left", "Nanaimo", 0);
	menus[4].addItem("http://www.vireb.com/comm_du.html", "", 22, "left", "Duncan", 0);

//Menu for "MLS":
	menus[5] = new menu(135, "vertical", 0, 0, 0, 0, "#E1E1E1", "black", "MS Sans Serif,Arial,Helvetica,sans-serif", 8, "bold", "bold", "black", "white", 1, "black", 2, 62, false, true, false, false, 0, true, 4, 4, "black");
	menus[5].addItem("http://www.mls.ca/", "", 22, "left", "MLS.ca", 0);
	menus[5].addItem("http://www.realtorlink.org/", "", 22, "left", "RealtorLink", 0);

//Menu for Sub Menu "Communities":
	menus[6] = new menu(150, "vertical", 0, 0, 0, 0, "#008000", "white", "MS Sans Serif,Arial,Helvetica,sans-serif", 8, "bold", "bold", "white", "black", 1, "black", 2, ">>", false, true, false, false, 0, true, 4, 4, "black");
	menus[6].addItem("http://www.vireb.com/CodeOfEthics.html", "", 22, "left", "Code of Ethics ", 10);
	menus[6].addItem("", "", 22, "left", "Staff Members", 11);

//Menu for Sub Menu "File a Complaint":
	menus[7] = new menu(175, "vertical", 0, 0, 0, 0, "#E1E1E1", "black", "MS Sans Serif,Arial,Helvetica,sans-serif", 8, "bold", "bold", "black", "white", 1, "black", 2, 62, false, true, false, false, 0, true, 4, 4, "black");
	menus[7].addItem("http://www.vireb.com/Complaints Process-Form.doc", "", 22, "left", "File a Complaint (DOC)", 0);
	menus[7].addItem("http://www.vireb.com/Complaints Process-Form.pdf", "", 22, "left", "File a Complaint (PDF)", 0);

//Menu for Sub Menu "General Links":
	menus[8] = new menu(175, "vertical", 0, 0, 0, 0, "#E1E1E1", "black", "MS Sans Serif,Arial,Helvetica,sans-serif", 8, "bold", "bold", "black", "white", 1, "black", 2, 62, false, true, false, false, 0, true, 4, 4, "black");
	menus[8].addItem("http://www.vireb.com/communities.html#transport", "", 22, "left", "Transportation", 0);
	menus[8].addItem("http://www.vireb.com/communities.html#otherboards", "", 22, "left", "Other Boards", 0);
	menus[8].addItem("http://www.vireb.com/communities.html#other", "", 22, "left", "Other", 0);

//Menu for Sub Menu "Directors":
	menus[9] = new menu(175, "vertical", 0, 0, 0, 0, "#E1E1E1", "black", "MS Sans Serif,Arial,Helvetica,sans-serif", 8, "bold", "bold", "black", "white", 1, "black", 2, "62", false, true, false, false, 0, true, 4, 4, "black");
	menus[9].addItem("http://www.vireb.com/pastpres.php#honour", "", 22, "left", "Honourary Members", 0);
	menus[9].addItem("http://www.vireb.com/pastpres.php#realtor", "", 22, "left", "REALTOR of the Year", 0);
	menus[9].addItem("http://www.vireb.com/pastpres.php#EO", "", 22, "left", "Managers/Officers", 0);

//Menu for Sub Menu "Code of Ethics":
	menus[10] = new menu(175, "vertical", 0, 0, 0, 0, "#E1E1E1", "black", "MS Sans Serif,Arial,Helvetica,sans-serif", 8, "bold", "bold", "black", "white", 1, "black", 2, "62", false, true, false, false, 0, true, 4, 4, "black");
	menus[10].addItem("http://www.vireb.com/CodeOfEthics.html#clients", "", 22, "left", "Clients and Customers", 0);
	menus[10].addItem("http://www.vireb.com/CodeOfEthics.html#public", "", 22, "left", "The Public", 0);
	menus[10].addItem("http://www.vireb.com/CodeOfEthics.html#realtors", "", 22, "left", "REALTORS", 0);

//Menu for Sub Menu "Code of Ethics":
	menus[11] = new menu(175, "vertical", 0, 0, 0, 0, "#E1E1E1", "black", "MS Sans Serif,Arial,Helvetica,sans-serif", 8, "bold", "bold", "black", "white", 1, "black", 2, "62", false, true, false, false, 0, true, 4, 4, "black");
	menus[11].addItem("http://www.vireb.com/contactUs.html", "", 22, "left", "Staff Contact Info", 0);
	menus[11].addItem("http://www.vireb.com/directors.html", "", 22, "left", "Directors", 0);
	menus[11].addItem("http://www.vireb.com/commercialDiv.html", "", 22, "left", "Commercial Division", 0);
} //OUTER CLOSING BRACKET. EVERYTHING ADDED MUST BE ABOVE THIS LINE.
