// begin menubar positioning code
var offsetleft=0
var offsettop=0

var ns4=document.layers?1:0
var ie4=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0

// end menubar positioning code

// begin menu control code
var theTimeOutItem = "";
var theOpenTimeOutPointer = null;
var theCloseTimeOutPointer = null;

function menuObject(id,leftoffset,topoffset)
{
	this.id = id;
	this.leftoffset = leftoffset;
	this.topoffset = topoffset;
	this.show = showMenu;
	this.hide = hideMenu;
}

function showMenu()
{
	if(ie4)
	{
		if(theTimeOutItem != "")
		{
			document.all[theTimeOutItem].style.visibility = "hidden";
		}
		document.all[this.id].style.visibility = "visible";
	}
	if(ns6)
	{
		if(theTimeOutItem != "")
		{
			document.getElementById(theTimeOutItem).style.visibility = "hidden";
		}
		document.getElementById(this.id).style.visibility = "visible";
	}
	if(ns4)
	{
		if(theTimeOutItem != "")
		{
			document.layers[theTimeOutItem].visibility = "hide";
		}
		document.layers[this.id].visibility = "show";
	}
}
var theTimeOutItem = "";
var theTimeOutPointer = null;
var theCurrentMenu = null;
function hideMenu()
{
	if(ie4)
	{
		theTimeOutItem = this.id;
		theCloseTimeOutPointer = setTimeout('document.all[theTimeOutItem].style.visibility = "hidden"',50);
	}
	if(ns6)
	{
		theTimeOutItem = this.id;
		theCloseTimeOutPointer = setTimeout('document.getElementById(theTimeOutItem).style.visibility = "hidden"',100);
	}
	if(ns4)
	{
		theTimeOutItem = this.id;
		theCloseTimeOutPointer = setTimeout('document.layers[theTimeOutItem].visibility = "hide"',50);
	}
}

function doMenuMouseOver(id)
{
	if(ie4)
	{
		clearTimeout(theCloseTimeOutPointer);
		document.all[id].style.visibility = "visible";
	}
	if(ns6)
	{
		clearTimeout(theCloseTimeOutPointer);
		document.getElementById(id).style.visibility = "visible";
	}
	if(ns4)
	{
		clearTimeout(theCloseTimeOutPointer);
		document.layers[id].visibility = "show";
	}
}
function doMenuMouseOut(id)
{
	if(ie4)
	{
		document.all[id].style.visibility = "hidden";
	}
	if(ns6)
	{
		document.getElementById(id).style.visibility = "hidden";
	}
	if(ns4)
	{
		document.layers[id].visibility = "hide";
	}
}

function doItemMouseOver(obj,c)
{
	if(ie4 || ns6)
	{
		obj.style.backgroundColor=c;
	}
	if(ns4)
	{
		obj.bgColor=c;
	}
}

function doItemMouseOut(obj,c)
{
	if(ie4 || ns6)
	{
		obj.style.backgroundColor=c;
	}
	if(ns4)
	{
		obj.bgColor=c;
	}
	
}

var menu_aboutus = new menuObject("aboutus",2,2);
var menu_estates = new menuObject("estates",1,1);
var menu_aboutushome = new menuObject("aboutushome",3,3);
var menu_estateshome = new menuObject("estateshome",4,4);


// begin menu control code

// onload initialisation
window.onload=init;
function init()
{
	if(ns4)
	{
		document.aboutus.onmouseover = new Function("doMenuMouseOver('aboutus')");
		document.aboutus.onmouseout = new Function("doMenuMouseOut('aboutus')");
		
		document.estates.onmouseover = new Function("doMenuMouseOver('estates')");
		document.estates.onmouseout = new Function("doMenuMouseOut('estates')");

		document.aboutushome.onmouseover = new Function("doMenuMouseOver('aboutushome')");
		document.aboutushome.onmouseout = new Function("doMenuMouseOut('aboutushome')");

		document.estates.onmouseover = new Function("doMenuMouseOver('estateshome')");
		document.estates.onmouseout = new Function("doMenuMouseOut('estateshome')");


	}
}

