
//if (_version != '1.2') {
   // window.onerror = new Function("return true;");
//}
var isNS = (navigator.appName == "Netscape");
var isMacIE = ( (navigator.userAgent.indexOf("IE 4") > -1) && (navigator.userAgent.indexOf("Mac")  > -1) );
var layerRef = (isNS) ? "document" : "document.all";
var styleRef = (isNS) ? "" : ".style";
var isDynamic = ( ((document.layers && document.layers['testmenu']) || (document.all && document.all['testmenu'])) && !isMacIE );

var activeMenu = 0;

function activateMenu(menuLayerRef, offset) {
    if (isDynamic && activeMenu != menuLayerRef) {
	if (activeMenu) hideMenu("menu" + activeMenu); 
	menuID = "menu" + menuLayerRef;
	activeMenu = menuLayerRef;
	if (isNS) {
	    document[menuID].left = offset;
	    document[menuID].top = 128;
	} else {
	    document.all[menuID].style.pixelLeft =offset;
	    document.all[menuID].style.pixelTop = 128;
	}
	showMenu(menuID)
    }
}

function showMenu(layerID) {
    eval(layerRef + '["' + layerID + '"]' + 
    styleRef + '.visibility = "visible"');
}

function hideMenu(layerID) {
    eval(layerRef + '["' + layerID + '"]' + 
    styleRef + '.visibility = "hidden"');
}


function turnOff() {
    if (activeMenu) {
	menuID = "menu" + activeMenu;
	hideMenu(menuID);
	activeMenu = 0;
    }
}
function init() {
    if (isDynamic) {
	if (isNS) {
	    document.captureEvents(Event.MOUSEUP);
	}
	document.onmouseup = turnOff;
    }
}
function hideMe() {
    if (activeMenu) {
	menuID = "menu" + activeMenu;
	hideMenu(menuID);
	activeMenu = 0;
    }
}
// Work-around Netscape resize bug
if (isDynamic && isNS) {
    origWidth = innerWidth;
    origHeight = innerHeight;	
}
function reDo() {	
    if (innerWidth != origWidth || innerHeight != origHeight) {
	location.reload();
    }
}	

if (isDynamic && isNS) {
    onresize = reDo;
}


if (isDynamic) {
    c = [{"scs":["summary.asp?typeID=1","B & B / Guesthouses","summary.asp?typeID=5","Hotels / Motels","summary.asp?typeID=2","Self Catering","summary.asp?typeID=3","Pubs & Restaurants","summary.asp?typeID=4","Caravan & Camping","javascript:MM_openBrWindow('availability3.asp','photos','toolbar=no,location=no,status=no,scrollbars=yes,width=750,height=560,top=0,left=0')","Accommodation Availability","map.asp","Interactive Map"],"name":"Home/email","menu_id":1},
	{"scs":["events.asp?month1=January","January","events.asp?month1=February","February","events.asp?month1=March","March","events.asp?month1=April","April","events.asp?month1=May","May","events.asp?month1=June","June","events.asp?month1=July","July","events.asp?month1=August","August","events.asp?month1=September","September","events.asp?month1=October","October","events.asp?month1=November","November","events.asp?month1=December","December"],"name":"Recent Sightings","menu_id":2},
	{"scs":["xbi.html","About the garden & me"],"name":"Background","menu_id":4}]


	
document.open();
    il = c.length;
    for (i=0; i < il; i++) 
{ document.write("<div id=menu" + c[i].menu_id + " class=\"menu\">");
		  

        jl = c[i].scs.length;
	for (j = 0; j < jl; j = j+2) {
	    if (j != 0) { document.write("<br>"); }
		
		if (c[i].menu_id < 15) 
//if menu item is 1 to 14, make target "contents"
{document.write("<a href=\"" + c[i].scs[j] + "\"><img src=spacer2.gif width=120 height=2 border=0><br><font color=#ffffff>" + c[i].scs[j+1] + "</font></a>");}
//if menu item is 15 or 16, make target "_top"
else
{document.write("<a href=\"" + c[i].scs[j] + "\"><img src=spacer2.gif width=120 height=2 border=0><br><font color=#ffffff>" + c[i].scs[j+1] + "</font></a>");}
}
document.write("</div>\n");
}}



