function mmLoadMenus() {
  if (window.mm_menu_0) return;
  window.mm_menu_0 = new Menu("root",114,17,"Verdana, Arial, Helvetica, sans-serif",12,"#000066","#CCCCCC","#0099FF","#FFFFFF","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);
  mm_menu_0.addMenuItem("home","location='default.asp'");  
  mm_menu_0.addMenuItem("gosford","location='gosford.htm'");
  mm_menu_0.addMenuItem("kincumber","location='kincumber.htm'");  
   mm_menu_0.hideOnMouseOut=true;
   mm_menu_0.menuBorder=1;
   mm_menu_0.menuLiteBgColor='#CCCCCC';
   mm_menu_0.menuBorderBgColor='#CCCCCC';
   mm_menu_0.bgColor='#666666';

  window.mm_menu_1 = new Menu("root",150,17,"Verdana, Arial, Helvetica, sans-serif",12,"#000066","#CCCCCC","#0099FF","#FFFFFF","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);
  mm_menu_1.addMenuItem("history of beer","location='historybeer.htm'");
  mm_menu_1.addMenuItem("homebrew basics","location='homebrewfund.htm'");
  mm_menu_1.addMenuItem("beer brewing tips","location='beertips.htm'");
  mm_menu_1.addMenuItem("FAQ","location='faq.htm'");  
  mm_menu_1.addMenuItem("making beer from kits","location='beerkits.htm'");
  mm_menu_1.addMenuItem("partial mashes","location='partialmash.htm'");
  mm_menu_1.addMenuItem("full mashes","location='fullmash.htm'");
  mm_menu_1.addMenuItem("bottles vs kegs","location='bottlesvskegs.htm'");
  mm_menu_1.addMenuItem("our favourite recipes","location='beerrecipes.htm'");
   mm_menu_1.hideOnMouseOut=true;
   mm_menu_1.menuBorder=1;
   mm_menu_1.menuLiteBgColor='#CCCCCC';
   mm_menu_1.menuBorderBgColor='#CCCCCC';
   mm_menu_1.bgColor='#666666';
   
   window.mm_menu_2 = new Menu("root",155,17,"Verdana, Arial, Helvetica, sans-serif",12,"#000066","#CCCCCC","#0099FF","#FFFFFF","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);
  mm_menu_2.addMenuItem("wine making fundamentals","location='winemaking.htm'");
  mm_menu_2.addMenuItem("wine making tips","location='winetips.htm'");
  mm_menu_2.addMenuItem("wine making equipment","location='wineequipment.htm'");
  mm_menu_2.addMenuItem("wine accessories","location='wineaccess.htm'");
   mm_menu_2.hideOnMouseOut=true;
   mm_menu_2.menuBorder=1;
   mm_menu_2.menuLiteBgColor='#CCCCCC';
   mm_menu_2.menuBorderBgColor='#CCCCCC';
   mm_menu_2.bgColor='#666666';

 window.mm_menu_3 = new Menu("root",125,17,"Verdana, Arial, Helvetica, sans-serif",12,"#8E003A","#CCCCCC","#99E699","#FFFFFF","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);
  mm_menu_3.addMenuItem("spirit making fundamentals","location='spiritmaking.htm'");
  mm_menu_3.addMenuItem("spirit making tips","location='spirittips.htm'"); 
  mm_menu_3.addMenuItem("spirit recipes","location='spiritrecipes.htm'");  
   mm_menu_3.hideOnMouseOut=true;
   mm_menu_3.menuBorder=1;
   mm_menu_3.menuLiteBgColor='#CCCCCC';
   mm_menu_3.menuBorderBgColor='#CCCCCC';
   mm_menu_3.bgColor='#666666';

  mm_menu_1.writeMenus()
} // mmLoadMenus()

var counter, path, spath;
counter = 2;
path = ("images/street" + counter + ".jpg");
spath = "st" + (counter-1);

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_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_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];}
}
		var j = 0
        var i = 1
        images = new Array
        images[1] = "images/street1.jpg"
        images[2] = "images/street2.jpg"
        images[3] = "images/street3.jpg"
        images[4] = "images/street4.jpg"
		
        description = new Array
        description[1] = "1 of 4"
        description[2] = "2 of 4"
        description[3] = "3 of 4"
        description[4] = "4 of 4"

function setGallery(){
        if (i == 1){
                document.gallery.desc.value = description[1]}
}

function previmg(){
        if (i != 1) {
                i --
                document.img.src = images[i];
                document.gallery.desc.value = description[i]}
}

function nextimg(){
        if (i != 4) {
                i ++
                image = images[i]
                document.img.src = image
                document.gallery.desc.value = description[i];}
}

function zoom(){
        if (j == 0) {
                j ++
                document.getElementById('zoomImg').src = "images/zoom.gif"
                document.map.btnZoom.value = "zoom out"}
	    else if (j == 1) {
                j --
                document.getElementById('zoomImg').src = "images/map.gif"
                document.map.btnZoom.value = "zoom in"}
}

function GP_AdvOpenWindow(theURL,winName,features,popWidth,popHeight,winAlign,ignorelink,alwaysOnTop,autoCloseTime,borderless) { //v2.0
  var leftPos=0,topPos=0,autoCloseTimeoutHandle, ontopIntervalHandle, w = 480, h = 340;  
  if (popWidth > 0) features += (features.length > 0 ? ',' : '') + 'width=' + popWidth;
  if (popHeight > 0) features += (features.length > 0 ? ',' : '') + 'height=' + popHeight;
  if (winAlign && winAlign != "" && popWidth > 0 && popHeight > 0) {
    if (document.all || document.layers || document.getElementById) {w = screen.availWidth; h = screen.availHeight;}
		if (winAlign.indexOf("center") != -1) {topPos = (h-popHeight)/2;leftPos = (w-popWidth)/2;}
		if (winAlign.indexOf("bottom") != -1) topPos = h-popHeight; if (winAlign.indexOf("right") != -1) leftPos = w-popWidth; 
		if (winAlign.indexOf("left") != -1) leftPos = 0; if (winAlign.indexOf("top") != -1) topPos = 0; 						
    features += (features.length > 0 ? ',' : '') + 'top=' + topPos+',left='+leftPos;}
  if (document.all && borderless && borderless != "" && features.indexOf("fullscreen") != -1) features+=",fullscreen=1";
  if (window["popupWindow"] == null) window["popupWindow"] = new Array();
  var wp = popupWindow.length;
  popupWindow[wp] = window.open(theURL,winName,features);
  if (popupWindow[wp].opener == null) popupWindow[wp].opener = self;  
  if (document.all || document.layers || document.getElementById) {
    if (borderless && borderless != "") {popupWindow[wp].resizeTo(popWidth,popHeight); popupWindow[wp].moveTo(leftPos, topPos);}
    if (alwaysOnTop && alwaysOnTop != "") {
    	ontopIntervalHandle = popupWindow[wp].setInterval("window.focus();", 50);
    	popupWindow[wp].document.body.onload = function() {window.setInterval("window.focus();", 50);}; }
    if (autoCloseTime && autoCloseTime > 0) {
    	popupWindow[wp].document.body.onbeforeunload = function() {
  			if (autoCloseTimeoutHandle) window.clearInterval(autoCloseTimeoutHandle);
    		window.onbeforeunload = null;	}  
   		autoCloseTimeoutHandle = window.setTimeout("popupWindow["+wp+"].close()", autoCloseTime * 1000); }
  	window.onbeforeunload = function() {for (var i=0;i<popupWindow.length;i++) popupWindow[i].close();}; }   
  document.MM_returnValue = (ignorelink && ignorelink != "") ? false : true;
}

function moveToContact() {
  parent.opener.location = "contact.asp";
  window.close();
} 

function changeText() {
  var obj=document.getElementById('main');
  obj.style.fontSize = 14;
}
// more dynamic functions to change styles, delete if not used
function setStyle(obj,style,value){
  getRef(obj).style[style]= value;
}
	
function getRef(obj){
  return (typeof obj == "string") ? document.getElementById(obj) : obj;
}

 var isDHTML = 0;
 var isLayers = 0;
 var isAll = 0;
 var isID = 0;
 if (document.getElementById) {isID = 1; isDHTML = 1;}
 else {
   if (document.all) {isAll = 1; isDHTML = 1;}
   else {
      browserVersion = parseInt(navigator.appVersion);
   if ((navigator.appName.indexOf('Netscape') != -1) && (browserVersion == 4)) {isLayers = 1; isDHTML = 1;}
}}

 function findDOM (objectID, withStyle) {
   if (withStyle == 1) {
     if (isID) {return (document.getElementById(objectID).style);}
     else {
     if (isAll) {return (document.all[objectID].style);}
   else {
     if (isLayers) {return (document.layers[objectID]);}
   };}
}
else {
   if (isID) {return (document.getElementById(objectID));}
   else {
    if (isAll) {return (document.all[objectID]);}
   else {
    if (isLayers) {return (document.layers[objectID]);}
   };}
 }
}

  function findLeft(objectID) {
    var domStyle = findDOM(objectID,1);
	var dom = findDOM(objectID,0);
	 if (domStyle.left)
	   return domStyle.left;
	 if (domStyle.pixelLeft)
	   return domStyle.pixelLeft;
	 if (dom.offsetLeft)
	   return dom.offsetLeft;
	 return(null);
 }
    var leftPos;
   function showPos(objectID) {
    leftPos = findLeft(objectID);
 }
 
 // This function highlites the left nav item with an id of leftNavId
// It relies on the class definition for highlite.
function leftNavHighlite(leftNavId) {
	var leftNavItem	//Used to store the element with id leftNavId
	//Test the getElementByID function is supported.
	if(document.getElementById != null) leftNavItem = document.getElementById(leftNavId)
	//Test that the element was returned.
	if(leftNavItem != null) leftNavItem.id = "highlite"
}

 var doflash = false;

 var player = new MM_FlashInfo();
 if (player.installed) {
   if (player.version && player.version >= 5) { // NEEDS FLASH VERSION 5 OR GREATER
     doflash = true;
   }
 }
 function loadHomeFlash() {
 if (doflash) {
   document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='769' height='126' id='home_banner' align='middle'>");
   document.write("<param name='allowScriptAccess' value='sameDomain'><param name='movie' value='flash/home_banner.swf'>");
   document.write("<param name='quality' value='high'>");
   document.write("<param name='bgcolor' value='#49575a'>");
   document.write("<embed src='flash/home_banner.swf' quality='high' bgcolor='#49575a'");
   document.write(" width='769' height='126' name='home_banner' align='middle' allowScriptAccess='sameDomain'");
   document.write(" type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'>");
   document.write("<\/object>");
 }
 else {
   document.write("<img src='images/main_banner.jpg' width='769' height='126' border='0' alt=''>");
 }
}

 function loadFlash() {
 if (doflash) {
   document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='769' height='126' id='main_banner' align='middle'>");
   document.write("<param name='allowScriptAccess' value='sameDomain'><param name='movie' value='flash/main_banner.swf'>");
   document.write("<param name='quality' value='high'>");
   document.write("<param name='bgcolor' value='#49575a'>");
   document.write("<embed src='flash/main_banner.swf' quality='high' bgcolor='#49575a'");
   document.write(" width='769' height='126' name='main_banner' align='middle' allowScriptAccess='sameDomain'");
   document.write(" type='application/x-shockwave-flash' swLiveConnect='true' pluginspage='http://www.macromedia.com/go/getflashplayer'>");
   document.write("<\/object>");
 }
 else {
   document.write("<img src='images/main_banner.jpg' width='769' height='126' border='0' alt=''>");
 }
}


var picnum = 1

function genNumber () {
  
    picnum = Math.random()*6; 
    picnum = Math.round(picnum);    
	return picnum     
}


function changeImagea()
	  	  	   {			  
			   image = "url(Images/imageset" + picnum + ".jpg)";	   
		       document.getElementById('image1').style.backgroundImage = image;
		}
		
function changeImageb()
	  	  	   {			   
			   image = "url(Images/body750/pic" + picnum + "b.jpg)";	   
		       document.getElementById('bodypic1b').style.backgroundImage = image;
		}	

function changeImagec()
	  	  	   {			   
			   image = "url(Images/body750/pic" + picnum + "c.jpg)";	   
		       document.getElementById('bodypic1c').style.backgroundImage = image;
		}	
