//javascript for CSS menus
startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}
window.onload=startList;
//MM functions for rollover
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//end MM functions

//MM_preloadImages('global/gui/images/menuButtons/home_ov.gif','global/gui/images/menuButtons/lake_living_ov.gif','global/gui/images/menuButtons/conservation_community_ov.gif','global/gui/images/menuButtons/amenities_ov.gif','global/gui/images/menuButtons/homesites_ov.gif','global/gui/images/menuButtons/location_ov.gif','global/gui/images/menuButtons/contact_us_ov.gif');

function drawMainNav(selected) {
	if (selected == void(0)) {selected = -1;}
	htmlBuff = "<div id=\"menu\" style=\"z-index:10\">";
	htmlBuff = htmlBuff+"<ul id=\"nav\">";
	
	//******************Main menu item 0
	htmlBuff = htmlBuff+"<li>";
	if (selected == 0) {
	htmlBuff = htmlBuff+"<div><a class= \"one_sel\" href=\"about_neighborhood.php\" alt=\"About the Neighborhood\" name=\"about_neighborhood\"></a></div>";
	} else {
	htmlBuff = htmlBuff+"<div><a class= \"one\" href=\"about_neighborhood.php\" alt=\"About the Neighborhood\" name=\"about_neighborhood\"></a></div>";
	}
	htmlBuff = htmlBuff+"<ul>";
	htmlBuff = htmlBuff+"<li><a href=\"about_neighborhood.php\">About the Neighborhood</a></li>";
	htmlBuff = htmlBuff+"<li><a href=\"about_activities.php\">Activities</a></li>";
	htmlBuff = htmlBuff+"<li><a href=\"about_conservation_community.php\">Conservation Community</a></li>";
	htmlBuff = htmlBuff+"<li><a href=\"about_association.php\">Tii Gavo Community Association</a></li>";
	htmlBuff = htmlBuff+"</ul>";
	htmlBuff = htmlBuff+"</li>";

	//******************menu item 1
	htmlBuff = htmlBuff+"<li>";
	if (selected == 1) {	
	htmlBuff = htmlBuff+"<div><a class= \"two_sel\" href=\"FAQ_tii_gavo.php\" alt=\"FAQ\"></a></div>";
	} else {
	htmlBuff = htmlBuff+"<div><a class= \"two\" href=\"FAQ_tii_gavo.php\" alt=\"FAQ\"></a></div>";
	}
	/* 
	htmlBuff = htmlBuff+"<ul>";
	htmlBuff = htmlBuff+"<li><a href=\"conservation_community.php\">Conservation Community</a></li>";
	htmlBuff = htmlBuff+"<li><a href=\"geothermal.php\">Geothermal Technology</a></li>";
	htmlBuff = htmlBuff+"</ul>";
	 */
	htmlBuff = htmlBuff+"</li>";
	
	//******************Main menu item 2
	htmlBuff = htmlBuff+"<li>";
	if (selected == 2) {	
	htmlBuff = htmlBuff+"<div><a class= \"three_sel\" href=\"area_big_marine_lake.php\" alt=\"Big Marine Lake\"></a></div>";
	} else {
	htmlBuff = htmlBuff+"<div><a class= \"three\" href=\"area_big_marine_lake.php\" alt=\"Big Marine Lake\"></a></div>";
	}

	htmlBuff = htmlBuff+"<ul>";
	htmlBuff = htmlBuff+"<li><a href=\"area_big_marine_lake.php\">Big Marine Lake</a></li>";
	htmlBuff = htmlBuff+"<li><a href=\"area_city_of_scandia.php\">City of Scandia</a></li>";
	htmlBuff = htmlBuff+"<li><a href=\"area_marine_on_st_croix.php\">Marine on St. Croix</a></li>";
	htmlBuff = htmlBuff+"<li><a href=\"area_parks.php\">Parks</a></li>";
	htmlBuff = htmlBuff+"<li><a href=\"area_local_links.php\">Local/Community Links</a></li>";
	htmlBuff = htmlBuff+"</ul>";

	htmlBuff = htmlBuff+"</li>";

	//******************Main menu item 3
htmlBuff = htmlBuff+"<li>";
if (selected == 3) {	
	htmlBuff = htmlBuff+"<div><a class= \"four_sel\" href=\"homesites.php\" alt=\"Homesites\" name=\"homesites\"></a></div>";
	} else {
	htmlBuff = htmlBuff+"<div><a class= \"four\" href=\"homesites.php\" alt=\"Homesites\" name=\"homesites\"></a></div>";
	}
	/* 
	htmlBuff = htmlBuff+"<ul>";
	htmlBuff = htmlBuff+"<li><a href=\"homesites.php\">Homesites</a></li>";
	htmlBuff = htmlBuff+"</ul>";
	 */
	htmlBuff = htmlBuff+"</li>";

	//******************Main menu item 4

htmlBuff = htmlBuff+"<li>";
	if (selected == 4) {	
	htmlBuff = htmlBuff+"<div><a class= \"five_sel\" href=\"location.php\" alt=\"Location\" name=\"locatn\" width=\"68\" height=\"30\" border=\"0\"></a></div>";
	} else {
	htmlBuff = htmlBuff+"<div><a class= \"five\" href=\"location.php\" alt=\"Location\" name=\"locatn\" width=\"68\" height=\"30\" border=\"0\"></a></div>";
	}

	htmlBuff = htmlBuff+"<ul>";
	htmlBuff = htmlBuff+"<li><a href=\"location.php\">Location</a></li>";
	htmlBuff = htmlBuff+"<li><a href=\"drive_times.php\">Metro Drive Times</a></li>";
	htmlBuff = htmlBuff+"</ul>";

	htmlBuff = htmlBuff+"</li>";

		//******************Main menu item 5
htmlBuff = htmlBuff+"<li>";
	if (selected == 5) {	
	htmlBuff = htmlBuff+"<div><a class= \"six_sel\" href=\"contact_us.php\" alt=\"Contact Us\" name=\"contact_us\"></a></div>";
	} else {
	htmlBuff = htmlBuff+"<div><a class= \"six\" href=\"contact_us.php\" alt=\"Contact Us\" name=\"contact_us\"></a></div>";
	}
	/*
	htmlBuff = htmlBuff+"<ul>";
	htmlBuff = htmlBuff+"<li><a href=\"tenant.html\">Tenant Requests</a></li>";
	htmlBuff = htmlBuff+"<li><a href=\"request_login.cfm\">Facilities Manager Login</a></li>";
	htmlBuff = htmlBuff+"<li><a href=\"request_room.html\">Conf Room Reservations</a></li>";
	htmlBuff = htmlBuff+"<li><a href=\"request_work.cfm\">Work Order Requests</a></li>";
	htmlBuff = htmlBuff+"<li><a href=\"request_card.cfm\">Card Access Requests</a></li>";
	htmlBuff = htmlBuff+"</ul>";
	*/
	htmlBuff = htmlBuff+"</li>";

		//******************End menu items


	
	htmlBuff = htmlBuff+"</li>";
		
	htmlBuff = htmlBuff+"</ul>";
	htmlBuff = htmlBuff+"</div>";
	document.write(htmlBuff);
}

