var runme = "false";
var ns = (document.layers)?1:0;
var ie = (document.all)?1:0;
var nb = (document.getElementById)?1:0;

/*
Home
	About The Site
	About Us
	Who We Are
The Estate
	Farm
	Woodlands
	Nursery
	Properties
House & Gardens
	History
	Photos
	Hire the House
Weddings
	Photos
	License
	Catering
Corporate Facilities
	Conferences
	Seminars
	Corporate Weekends
Christmas Trees
	Types of Supply
News
Contact Us
*/
var menuArray 	= new Array(5,10)

if ( document.all ) {
	menuArray[0]= new Array("76","About The Site", "aboutsite.asp","About Us","about.asp","Where we are","whereweare.asp")
	menuArray[1]= new Array("131","The Farm", "farm.asp", "Woodlands", "woodlands.asp", "Properties", "properties.asp","The Stables and Riding", "stables.asp")
	menuArray[2]= new Array("212","The House", "house.asp", "The Gardens", "gardens.asp", "Photo Gallery", "photos.asp", "Hire the House", "hire.asp")
	menuArray[3]= new Array("346","Ceremonies", "ceremonies.asp", "Wedding Photographs", "photos2.asp", "Receptions", "reception.asp", "Catering", "catering.asp", "Wedding Planning", "weddingplan.asp")
	menuArray[4]= new Array("392","Conferences and Seminars", "conferences.asp","Residential Facilities", "residential2.asp","Product Launch", "product.asp", "Film Location Photo Shoot", "film.asp", "Activities", "activities.asp")
	menuArray[5]= new Array("470","Christmas Trees","xmas.asp", "Prices", "prices.asp", "Terms & Conditions", "termsandcondit.asp")
} else {
	menuArray[0]= new Array("103","About The Site", "aboutsite.asp","About Us","about.asp","Where we are","whereweare.asp")
	menuArray[1]= new Array("151","The Farm", "farm.asp", "Woodlands", "woodlands.asp", "Properties", "properties.asp","The Stables and Riding", "stables.asp")
	menuArray[2]= new Array("225","The House", "house.asp", "The Gardens", "gardens.asp", "Photo Gallery", "photos.asp", "Hire the House", "hire.asp")
	menuArray[3]= new Array("340","Ceremonies", "ceremonies.asp", "Wedding Photographs", "photos2.asp", "Receptions", "reception.asp", "Catering", "catering.asp", "Wedding Planning", "weddingplan.asp")
	menuArray[4]= new Array("390","Conferences and Seminars", "conferences.asp","Residential Facilities", "residential2.asp","Product Launch", "product.asp", "Film Location Photo Shoot", "film.asp", "Activities", "activities.asp")
	menuArray[5]= new Array("459","Christmas Trees","xmas.asp", "Prices", "prices.asp", "Terms & Conditions", "termsandcondit.asp")
}


function change_content(divname, newtext,arrayIndex) {
	if (ie) var div = document.all[divname]
	if (ns) var div = document.layers[divname]
	if (nb) var div = document.getElementById(divname)
    
	if (ns) {
		div.document.write(newtext)
       	div.document.close()
		div.visibility = "show"
		div.left = ((document.body.clientWidth-760)/2) + parseInt(menuArray[arrayIndex][0])
    }
    if (ie || nb) {
		div.innerHTML = newtext
		var objHeight = 95;
		var iAdd = (ie) ? 236 : 226;
		div.style.left = ((document.body.clientWidth-760) / 2) + parseInt(menuArray[arrayIndex][0] - 9 ) + "px"
		div.style.top =  (document.body.scrollTop + iAdd) + "px"
		div.style.visibility = "visible"
	}
}

function createMenu(arrayIndex) {
	var newtext = "<table width='150'cellpadding='0' cellspacing='0'>";
	for (var i = 1; i < 1000;) {
		if (menuArray[arrayIndex][i]) {
			if (menuArray[arrayIndex][i].length > 2) {
				newtext = newtext + "<tr><td class='subMenu'><a href='/" + menuArray[arrayIndex][i+1] + "'  onMouseOver='runme=\"true\";' onMouseOut='runme=\"false\";' style='color: white;'>" + menuArray[arrayIndex][i] + "</a></td></tr>";
			}
		}
		else {
			i = 1001;
		}
		i = i +2;
	}
	newtext = newtext + "</table>";
	return newtext;
}
