subover = function(ahrefid)
{
	document.getElementById('index').style.background="#3F2627 url('images/spacer.gif')";
	//document.getElementById('current').style.background="#171717 url('images/spacer.gif')";
	document.getElementById('aspect').style.background="#171717 url('images/spacer.gif')";
	document.getElementById('magnolia').style.background="#171717 url('images/spacer.gif')";
	document.getElementById('walkerst').style.background="#171717 url('images/spacer.gif')";
	//document.getElementById('pastprojects').style.background="#171717 url('images/spacer.gif')";
	document.getElementById('searenity').style.background="#171717 url('images/spacer.gif')";
	document.getElementById('theview').style.background="#171717 url('images/spacer.gif')";
	document.getElementById('oasis').style.background="#171717 url('images/spacer.gif')";
	document.getElementById('totoka').style.background="#171717 url('images/spacer.gif')";
	document.getElementById('neilson').style.background="#171717 url('images/spacer.gif')";
	document.getElementById('tantitha').style.background="#171717 url('images/spacer.gif')";
	document.getElementById('53walkerst').style.background="#171717 url('images/spacer.gif')";
	//document.getElementById('contact').style.background="#3F2627 url('images/spacer.gif')";
	
	//index current magnolia aspect pastprojects searenity theview oasis totoka walkerst tantitha contact

	document.getElementById(ahrefid).style.background="#171717 url('images/menu_sliderfwrd.gif') center right no-repeat";
	document.getElementById(ahrefid).style.color="#171717";
	//alert ('Subover'); //alert ("Subover");
}

suboff = function(ahrefid)
{
	//alert ('Suboff');
	document.getElementById(ahrefid).style.background="#171717 url('images/menu_sliderrev.gif') center right no-repeat";
	document.getElementById(ahrefid).style.color="#ffffff";
}
subclick = function(ahrefid)
{
	//alert ('Subclick');
	document.getElementById(ahrefid).style.background="#171717 url('images/spacer.gif')";
	document.getElementById(ahrefid).style.color="#ffffff";
}

subover2 = function(ahrefid)
{
	document.getElementById('index').style.background="#3F2627 url('images/spacer.gif')";
	//document.getElementById('current').style.background="#171717 url('images/spacer.gif')";
	document.getElementById('aspect').style.background="#171717 url('images/spacer.gif')";
	document.getElementById('magnolia').style.background="#171717 url('images/spacer.gif')";
	document.getElementById('walkerst').style.background="#171717 url('images/spacer.gif')";
	//document.getElementById('pastprojects').style.background="#171717 url('images/spacer.gif')";
	document.getElementById('searenity').style.background="#171717 url('images/spacer.gif')";
	document.getElementById('theview').style.background="#171717 url('images/spacer.gif')";
	document.getElementById('oasis').style.background="#171717 url('images/spacer.gif')";
	document.getElementById('totoka').style.background="#171717 url('images/spacer.gif')";
	document.getElementById('neilson').style.background="#171717 url('images/spacer.gif')";
	document.getElementById('tantitha').style.background="#171717 url('images/spacer.gif')";
	document.getElementById('53walkerst').style.background="#171717 url('images/spacer.gif')";
	//document.getElementById('contact').style.background="#3F2627 url('images/spacer.gif')";
	
	//index current magnolia aspect pastprojects searenity theview oasis totoka walkerst tantitha contact

	document.getElementById(ahrefid).style.background="#3F2627 url('images/menu_sliderfwrd2.gif') center right no-repeat";
	document.getElementById(ahrefid).style.color="#3F2627";
	//alert ('Subover'); //alert ("Subover");
}

suboff2 = function(ahrefid)
{
	//alert ('Suboff');
	document.getElementById(ahrefid).style.background="#3F2627 url('images/menu_sliderrev2.gif') center right no-repeat";
	document.getElementById(ahrefid).style.color="#ffffff";
}
subclick2 = function(ahrefid)
{
	//alert ('Subclick');
	document.getElementById(ahrefid).style.background="#3F2627 url('images/spacer.gif')";
	document.getElementById(ahrefid).style.color="#ffffff";
}


getWindowHeight = function()
{
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') {
		windowHeight = window.innerHeight;
	}
	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}
		else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}

setContent = function()
{
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
			var contentElement = document.getElementById('content');
			var contentHeight = contentElement.offsetHeight;
			if (windowHeight - contentHeight > 0) {
				contentElement.style.position = 'relative';
				contentElement.style.top = ((windowHeight / 2) - (contentHeight / 2)) + 'px';
			}
			else {
				contentElement.style.position = 'static';
			}
		}
	}
}

window.onload = function()
{
	setContent();
}
window.onresize = function()
{
	setContent();
}
	
writemenu = function()
{
	document.write('<div style="background:#ffffff; height:21px;"><div style="background:url(images/spacer_white.gif) top right repeat-y #3F2627; height:20px;"><div class="menu"><ul>');
	document.write('<li><a href="index.html" style="border-top-width:0px; border-bottom-width:0px;" id="index" onMouseOver="subover2(\'index\');" onMouseOut="suboff2(\'index\');" onmouseup="subclick2(\'index\');">HOME</a></li>');
	document.write('<li><a href="#" style="border-top-width:0px; border-bottom-width:0px;"'); /* id="current" onMouseOver="subover(\'current\');" onMouseOut="suboff(\'current\');" onmouseup="subclick(\'current\');" */ document.write('>CURRENT PROJECTS<!--[if IE 7]><!--></a>');
	document.write('<!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]--><ul>');
	//document.write('<li><h3>Subdivisions</h3></li><li><a href="aspect.html" title="a horizontal vertical menu" id="aspect" onMouseOver="subover(\'aspect\');" onMouseOut="suboff(\'aspect\');" onmouseup="subclick(\'aspect\');" style="background:#171717 url(images/spacer.gif);">&bull; Aspect</a></li>');
	document.write('<li><h3>Units/Apartments</h3></li><li><a href="magnolia.html" title="a coded list of spies" id="magnolia" onMouseOver="subover(\'magnolia\');" onMouseOut="suboff(\'magnolia\');" onmouseup="subclick(\'magnolia\');" style="background:#171717 url(images/spacer.gif);">&bull; Magnolia Place</a></li>');
	document.write('<li><a href="aspect.html" title="Aspect" id="aspect" onMouseOver="subover(\'aspect\');" onMouseOut="suboff(\'aspect\');" onmouseup="subclick(\'aspect\');" style="background:#171717 url(images/spacer.gif);">&bull; Aspect</a></li>');
	//document.write('<li><h3>Offices</h3></li><li><a href="218walker.html" title="Walker St Offices" id="walkerst" onMouseOver="subover(\'walkerst\');" onMouseOut="suboff(\'walkerst\');" onmouseup="subclick(\'walkerst\');" style="background:#171717 url(images/spacer.gif);">&bull; 218 Walker St</a></li>');
	document.write('</ul><!--[if lte IE 6]></td></tr></table></a><![endif]--></li>');
	document.write('<li><a href="#" style="border-top-width:0px; border-bottom-width:0px;"'); /* id="pastprojects" onMouseOver="subover(\'pastprojects\');" onMouseOut="suboff(\'pastprojects\');" onmouseup="subclick(\'pastprojects\');"*/ document.write('>PAST PROJECTS<!--[if IE 7]><!--></a>');
	document.write('<!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]--><ul><li><h3>Units/Apartments</h3></li>');
	document.write('<li><a href="searenity.html" title="Searenity villas" id="searenity" onMouseOver="subover(\'searenity\');" onMouseOut="suboff(\'searenity\');" onmouseup="subclick(\'searenity\');" style="background:#171717 url(images/spacer.gif);">&bull; Searenity</a></li>');
	document.write('<li><a href="theview.html" title="The View apartments" id="theview" onMouseOver="subover(\'theview\');" onMouseOut="suboff(\'theview\');" onmouseup="subclick(\'theview\');" style="background:#171717 url(images/spacer.gif);">&bull; The View</a></li>');
	document.write('<li><h3>Subdivisions</h3></li><li><a href="oasis.html" title="Oasis estate" id="oasis" onMouseOver="subover(\'oasis\');" onMouseOut="suboff(\'oasis\');" onmouseup="subclick(\'oasis\');" style="background:#171717 url(images/spacer.gif);">&bull; Oasis</a></li>');
	document.write('<li><a href="totoka.html" title="Totoka Subdivision" id="totoka" onMouseOver="subover(\'totoka\');" onMouseOut="suboff(\'totoka\');" onmouseup="subclick(\'totoka\');" style="background:#171717 url(images/spacer.gif);">&bull; Totoka</a></li>');
	document.write('<li><a href="neilson_beach.html" title="Neilson Beach estate" id="neilson" onMouseOver="subover(\'neilson\');" onMouseOut="suboff(\'neilson\');" onmouseup="subclick(\'neilson\');" style="background:#171717 url(images/spacer.gif);">&bull; Neilson Beach</a></li>');
	document.write('<li><h3>Offices</h3></li><li><a href="218walker.html" title="Walker St Offices" id="walkerst" onMouseOver="subover(\'walkerst\');" onMouseOut="suboff(\'walkerst\');" onmouseup="subclick(\'walkerst\');" style="background:#171717 url(images/spacer.gif);">&bull; 218 Walker St</a></li>');
	document.write('<li><a href="tantitha.html" title="Tantitha St Offices" id="tantitha" onMouseOver="subover(\'tantitha\');" onMouseOut="suboff(\'tantitha\');" onmouseup="subclick(\'tantitha\');" style="background:#171717 url(images/spacer.gif);">&bull; Tantitha St</a></li>');
	document.write('<li><a href="53walkerst.html" title="53 Walker St offices" id="53walkerst" onMouseOver="subover(\'53walkerst\');" onMouseOut="suboff(\'53walkerst\');" onmouseup="subclick(\'53walkerst\');" style="background:#171717 url(images/spacer.gif);">&bull; 53 Walker St</a></li>');
	document.write('</ul><!--[if lte IE 6]></td></tr></table></a><![endif]--></li></ul></div></div></div>');
}
			






