var bannerAD=new Array();
var adNum=0;bannerAD[0]="homeimages/HDBGD1.jpg"; bannerAD[1]="homeimages/HDBGD2.jpg";bannerAD[2]="homeimages/HDBGD3.jpg";bannerAD[3]="homeimages/HDBGD4.jpg";bannerAD[4]="homeimages/HDBGD5.jpg";bannerAD[5]="homeimages/HDBGD1.jpg"; 

function LH(){ javascript:LoadShow();}
function RH(){ history.go(0)}
function LoadHandler(a){ if(a==1||a==3){onload=LH;}if(a>1){onresize=RH;}}
function IntLH(){ javascript:LoadShow();flevInitPersistentLayer('DynMENU',0,'','','','0','','',20,25)}
function IntRH(){history.go(0)}
function IntLoadHandler(a){if(a==1||a==3){onload=IntLH;}if(a>1){onresize=IntRH;}}
function LoadSlideMenu() {
var s=new Array();
var i;
s[6]='';
s[0]='<div class="NAV3" id="DynMENU"><a href="index.htm">&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><br>';
s[1]='<a href="WineToursStanthorpe.htm">&nbsp;&nbsp;About&nbsp;Us&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><br>';
s[2]='<a href="StanthorpeCont.htm">&nbsp;&nbsp;Contact&nbsp;Us&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><br><a href="WineCellarDoor.htm">&nbsp;&nbsp;Wines\Oil&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><br>';
s[3]='<a href="WineQueensland.htm">&nbsp;&nbsp;Sales&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><br><a href="StanthorpeFind.htm">&nbsp;&nbsp;Finding&nbsp;Us&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><br>';
s[4]='<a href="StanthorpeBallandean.htm#news">&nbsp;&nbsp;News&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><br>';
s[5]='<a href="StanthorpeBallandean.htm">&nbsp;&nbsp;Gallery&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></div>';

for(i=0;i<s.length-1;i++) {s[6]=s[6]+s[i]};
  document.write(s[6]);
}

// NS6 series test

	var xagt=navigator.userAgent.toLowerCase();
    var xappVer = navigator.appVersion.toLowerCase();
    var xis_minor = parseFloat(xappVer);
    var xis_major = parseInt(xis_minor);
                                      
    var xis_konq = false; var xkqPos   = xagt.indexOf('konqueror');
    if (xkqPos !=-1) { xis_konq  = true;is_minor = parseFloat(xagt.substring(xkqPos+10,xagt.indexOf(';',xkqPos)));xis_major = parseInt(xis_minor);}                                 
    var xis_safari = ((xagt.indexOf('safari')!=-1)&&(xagt.indexOf('mac')!=-1))?true:false;
 	var xis_khtml  = (xis_safari || xis_konq);
    var xis_gecko = ((!xis_khtml)&&(navigator.product)&&(navigator.product.toLowerCase()=="gecko"))?true:false;

    var xis_fb = ((xagt.indexOf('mozilla/5')!=-1) && (xagt.indexOf('spoofer')==-1) &&
                 (xagt.indexOf('compatible')==-1) && (xagt.indexOf('opera')==-1)  &&
                 (xagt.indexOf('webtv')==-1) && (xagt.indexOf('hotjava')==-1)     &&
                 (xis_gecko) && (navigator.vendor=="Firebird"));
    var xis_fx = ((xagt.indexOf('mozilla/5')!=-1) && (xagt.indexOf('spoofer')==-1) &&
                 (xagt.indexOf('compatible')==-1) && (xagt.indexOf('opera')==-1)  &&
                 (xagt.indexOf('webtv')==-1) && (xagt.indexOf('hotjava')==-1)     &&
                 (xis_gecko) && ((navigator.vendor=="Firefox")||(xagt.indexOf('firefox')!=-1)));
    var xis_moz   = ((xagt.indexOf('mozilla/5')!=-1) && (xagt.indexOf('spoofer')==-1) &&
                    (xagt.indexOf('compatible')==-1) && (xagt.indexOf('opera')==-1)  &&
                    (xagt.indexOf('webtv')==-1) && (xagt.indexOf('hotjava')==-1)     &&
                    (xis_gecko) && (!xis_fb) && (!xis_fx) &&
                    ((navigator.vendor=="")||(navigator.vendor=="Mozilla")||(navigator.vendor=="Debian")));

if ((xis_moz)||(xis_fb)||(xis_fx)) {  
       var xis_moz_ver = (navigator.vendorSub)?navigator.vendorSub:0;
       if(xis_fx&&!xis_moz_ver) {xis_moz_ver = xagt.indexOf('firefox/');xis_moz_ver = xagt.substring(xis_moz_ver+8);xis_moz_ver = parseFloat(xis_moz_ver);}
       if(!(xis_moz_ver)) {xis_moz_ver = xagt.indexOf('rv:');xis_moz_ver = xagt.substring(xis_moz_ver+3);xis_paren   = xis_moz_ver.indexOf(')');xis_moz_ver = xis_moz_ver.substring(0,xis_paren);}
       xis_major = parseInt(xis_moz_ver);
    };

    var xis_nav  = ((xagt.indexOf('mozilla')!=-1) && (xagt.indexOf('spoofer')==-1) && (xagt.indexOf('compatible') == -1) && (xagt.indexOf('opera')==-1)
                && (xagt.indexOf('webtv')==-1) && (xagt.indexOf('hotjava')==-1) && (!xis_khtml) && (!(xis_moz)) && (!xis_fb) && (!xis_fx));

    if ((navigator.vendor)&& ((navigator.vendor=="Netscape6")||(navigator.vendor=="Netscape"))&& (xis_nav)) {xis_major = parseInt(navigator.vendorSub);}

    var xis_nav6   = (xis_nav && xis_major==6);  
// End of NS6 series test


function LoadShow(){
 	if(adNum<bannerAD.length-1)adNum++ ;
      else adNum=0;
	if (document.all) {
		document.images.imBG.filters.blendTrans.apply();
		document.images.imBG.src=bannerAD[adNum];
		document.images.imBG.filters.blendTrans.play();		
		}
	else if (document.layers || (document.getElementById && !document.all)) {
		document.images.imBG.src=bannerAD[adNum];  
		}
	setTimeout('LoadShow()',8000);
}

function go() {
OBj=(is.ie5up)?INTRO.style:(is.ns6)?document.getElementById("INTRO").style:0;
(is.ie5up)?INTRO.filters[0].Apply():0;
(is.ie5up)?vs="visible":vs="show";(is.ie5up)?vh="hidden":vh="hide";
if (OBj.visibility == "visible"){OBj.visibility = vh; (is.ie5up)?INTRO.filters.revealTrans.transition=12:0;} 
else {OBj.visibility = "visible"; (is.ie5up)?INTRO.filters[0].transition=12:0;} 
	(is.ie5up)?INTRO.filters[0].Play():0;
}

//Swipe Menu : 1.9

function Is() {
  agent       = navigator.userAgent.toLowerCase();
  this.major  = parseInt(navigator.appVersion);
  this.minor  = parseFloat(navigator.appVersion);
  this.ns     = ((agent.indexOf('mozilla')   != -1) &&
                (agent.indexOf('spoofer')    == -1) &&
                (agent.indexOf('compatible') == -1) &&
                (agent.indexOf('opera')      == -1) &&
                (agent.indexOf('webtv')      == -1) &&
                (agent.indexOf('hotjava')    == -1) &&
      (agent.indexOf("msie")  == -1));
  this.ns2    = (this.ns && (this.major      ==  2));
  this.ns3    = (this.ns && (this.major      ==  3));
  this.ns4    = (this.ns && (this.major      ==  4));
  this.ns6    = (this.ns && (this.major      >=  5));

  this.ie     = ((agent.indexOf("msie")      != -1) &&
                (agent.indexOf("opera")      == -1));
  this.ie3    = (this.ie && (this.major      <   4));
  this.ie4    = (this.ie && (this.major      ==  4) &&
                (agent.indexOf("msie 4")     != -1));
  this.ie5    = (this.ie && (this.major      ==  4) &&
                (agent.indexOf("msie 5")     != -1) &&
                (agent.indexOf("msie 5.5")   == -1) &&
                (agent.indexOf("mac")        == -1));
  this.iem5   = (this.ie && (this.major      ==  4) &&
                (agent.indexOf("msie 5.")    != -1) &&
               (agent.indexOf("mac")        != -1));
  this.ie55   = (this.ie && (this.major      ==  4) &&
                (agent.indexOf("msie 5.5")   != -1));
this.ie6    = (this.ie && (this.major      ==  4) &&
                (agent.indexOf("msie 6")     != -1 || agent.indexOf("msie 7") != -1 || agent.indexOf("msie 8") != -1));

  this.ie5up  = ( this.ie && !this.ie3 && !this.ie4);			
  this.moz = (agent.indexOf("gecko")!= -1)
  this.nsdom  = (this.ns4  || this.ns6);
  this.win = (agent.indexOf("win") != -1);
  this.iestrict = (this.win && this.ie6 && document.compatMode == "CSS1Compat");
  this.macstrict = (this.ie5 && this.iemac && document.doctype && document.doctype.name.indexOf(".dtd") != -1);
  this.strict = (this.iestrict || this.macstrict);
  this.iemac =(this.iem5);
  this.iewin = ((this.ie5 && !this.iemac || this.ie55 || this.ie6) && this.win);
  this.dom = (this.iewin || this.ns6 || this.moz);
}
var is = new Is();
var css_px = (is.ns4 || is.ie4) ?"" : "px";

function menuObj(obj, par, nst, p) {
    page = new Object();
    page.width = (is.ns6 || is.ns4 || is.moz) ? innerWidth : document.body.clientWidth;
    page.height = (is.ns6 || is.ns4 || is.moz) ? innerHeight : document.body.clientHeight;
    if (!is.ns4) {
        this.lyr = (is.dom || is.iemac) ? document.getElementById(obj) : document.all[obj];
    } else {
        this.lyr = (!nst) ? document.layers[obj] : document.layers[nst].document.layers[obj];
    }
    this.sty = (!is.ns4) ? this.lyr.style : this.lyr;
    this.parent = par;
    this.obj = obj + "SwipeLayer";
    eval(this.obj + "= this");
}
menuObj.prototype.timer = null;
menuObj.prototype.wipe = 0;
if (is.iemac){
menuObj.prototype.offX = Function('oX = this.lyr.offsetLeft -6+-(mAtt.border)+0; return oX');
menuObj.prototype.offY = Function('oY = this.lyr.offsetTop-2+-(mAtt.border)+0+(0);return oY;');
} else {
menuObj.prototype.offX = Function('oX = (is.dom || is.ie4) ? this.lyr.offsetLeft  : parseInt(this.sty.left);return oX');
menuObj.prototype.offY = Function('oY = (is.dom || is.ie4) ? this.lyr.offsetTop  : parseInt(this.sty.top);return oY;');
}
menuObj.prototype.offW = Function('oW = (!is.ns4) ? this.lyr.offsetWidth : this.lyr.clip.width; return oW;')
menuObj.prototype.offH = Function('oH = (!is.ns4) ? this.lyr.offsetHeight : this.lyr.clip.height; return oH;')
menuObj.prototype.maxWipe = function() {
   	if(!is.ns4) return this.offH()+10;
		else return (sAtt.height*this.lyr.document.layers.length)+10;
}
wipeMenu.prototype.addMain = function(name, hasSub, txt, url) {
	menuName = this.name, wipePos = this.pos, mAtt = this.mAtt, sAtt = this.sAtt;
	var pf = Math.ceil(((mAtt.height-mAtt.font_size)/2)-2);
	var pd = "padding:0px 6px 0px 6px;";
	var styStr2 = "position:absolute; visibility:hidden; clip:rect(0px 1000px 0px 0px); border:solid 1px "+sAtt.border_color+"; border-width:"+sAtt.border+"px 0px 0px 0px; cursor:default;z-index:200; ";
	if(this.main[name]) return;
	if(is.ns4) {
		var mainMenu = new Layer(mAtt.width);
		var styStr = "text-decoration:none; font-weight:"+mAtt.font_weight+"; z-index:200; color:"+mAtt.fg_off+"; padding:"+((mAtt.height/2)-(mAtt.font_size/2)-1)+"px 0px 0px 0px; font-size:"+mAtt.font_size+"px; font-family:"+mAtt.font+";"
		mainMenu.document.write('<div align="'+mAtt.align+'" style="'+pd+'"><a href="'+url+'" style="'+styStr+'">'+txt+'</a></div>');
		mainMenu.document.close();
		var mainMenu1 = new Layer(mAtt.width);
		mainMenu.captureEvents(Event.MOUSEUP);
		mainMenu.resizeTo(mAtt.width,mAtt.height);
		if(mAtt.bg_off.indexOf("url") != -1) {
			mainMenu.background.src = mAtt.bg_off.substring(4,mAtt.bg_off.length-1);
			mainMenu.background.src = mAtt.bg_off.substring(4,mAtt.bg_off.length-1);
		} else mainMenu.bgColor = mAtt.bg_off;
		mainMenu.visibility = "visible";
		}
	if(is.dom || is.iemac) {
		var mainMenu = document.createElement("DIV");
		var wf = (is.ns6 || is.moz || is.strict) ? 12 : 0;
		var pf2 = (mAtt.height%2 == 0) ? 1 : 0;
		var styStr = "position:absolute; font-weight:"+mAtt.font_weight+"; z-index:200; width:"+(mAtt.width-wf)+"px; border-right-width: "+mAtt.border+"px;border-left-width: "+mAtt.border+"px;border-right-style: solid;border-left-style: solid;border-right-color: "+mAtt.border_color+";border-left-color: "+mAtt.border_color+";  color:"+mAtt.fg_off+";                        text-align:"+mAtt.align+"; font-size:"+mAtt.font_size+"px; font-family:"+mAtt.font+"; padding:"+pf+"px 6px "+(pf+pf2)+"px 6px; background:"+mAtt.bg_off+"; cursor:pointer; cursor:hand;"
		mainMenu.innerHTML = txt;
		mainMenu.id = name+menuName;
		mainMenu.style.cssText = styStr;
		mainMenu.setAttribute("style", styStr);
		document.body.appendChild(mainMenu);
	}
	if(is.ie4) {
		var wf = 6; 
		var styStr = "position:absolute; width:"+(mAtt.width-wf)+"px; font-weight:"+mAtt.font_weight+"; z-index:200; border-right-width: "+mAtt.border+"px;border-left-width: "+mAtt.border+"px;border-right-style: solid;border-left-style: solid;border-right-color: "+mAtt.border_color+";border-left-color: "+mAtt.border_color+"; color:"+mAtt.fg_off+"; text-align:"+mAtt.align+"; font-size:"+mAtt.font_size+"px; font-family:"+mAtt.font+"; padding:"+pf+"px 6px "+(pf+pf2)+"px 6px; background:"+mAtt.bg_off+"; cursor:pointer; cursor:hand;"
		var mM = '<div id="'+name+menuName+'" style="'+styStr+'">'+txt+'</div>';
		document.body.insertAdjacentHTML("beforeEnd", mM);
		var mainMenu = document.all[name+menuName];
	}
	mainMenu.onmouseover = new Function('if('+hasSub+')'+menuName+'.subs["'+name+'"].show("'+wipePos+'"); over_out(this, "'+mAtt.bg_on+'", "'+mAtt.fg_on+'")');
	mainMenu.onmouseout = new Function('if('+hasSub+')'+menuName+'.subs["'+name+'"].hide();over_out(this, "'+mAtt.bg_off+'", "'+mAtt.fg_off+'")');
	mainMenu.onmousedown = new Function('location.href = "'+url+'"');
	this.main[name] = new menuObj(mainMenu.id);
	this.mainNum[this.mainNum.length] = this.main[name];
	if(!hasSub) return;
	if(is.ns4) {
		var subC = new Layer(sAtt.width);
		subC.resizeTo(sAtt.width,0);
		subC.visibility = "hidden";
	}
	if(is.dom || is.iemac) {
		var subC = document.createElement("DIV");
		subC.id = name+menuName+"Sub";
		var wf = (is.ns6 || is.moz) ? 4 : 0;
		subC.style.cssText = styStr2;
		subC.setAttribute("style", styStr2);
		document.body.appendChild(subC);
	}
	if(is.ie4) {
		var sC = '<div id="'+name+menuName+'Sub" style="'+styStr2+'"></div>';
		document.body.insertAdjacentHTML("beforeEnd", sC);
		var subC = document.all[name+menuName+"Sub"];
	}
	this.subs[name] = new menuObj(subC.id, this.main[name]);
	subC.onmouseover = new Function(menuName+'.subs["'+name+'"].show("'+wipePos+'");');
	subC.onmouseout = new Function(menuName+'.subs["'+name+'"].hide();');
}
wipeMenu.prototype.addSub = function(name, parent, txt, url) {
	var pf2 = (mAtt.height%2 == 0) ? 1 : 0;
	var pf = Math.ceil(((sAtt.height-sAtt.font_size)/2)-2);
	var pd = "padding:0px 6px 0px 6px;";
	if(is.ns4) {
		var tempsub = new Layer(sAtt.width, this.subs[parent].lyr);
		var styStr = "text-decoration:none; font-weight:"+sAtt.font_weight+"; z-index:200;color:"+sAtt.fg_off+"; padding:"+((sAtt.height/2)-(sAtt.font_size/2)-2)+"px 0px 0px 0px; font-size:"+sAtt.font_size+"px; font-family:"+sAtt.font+";"
		tempsub.document.write('<div align="'+sAtt.align+'" style="'+pd+'"><a href="'+url+'" style="'+styStr+'">'+txt+'</a></div>');
		tempsub.document.close();
		tempsub.captureEvents(Event.MOUSEUP);
		tempsub.resizeTo(sAtt.width,sAtt.height);
		tempsub.moveTo(0,(sAtt.height*(this.subs[parent].lyr.document.layers.length-1)));
		if(sAtt.bg_off.indexOf("url") != -1) {
			tempsub.background.src = sAtt.bg_off.substring(4,sAtt.bg_off.length-1);
			tempsub.background.src = sAtt.bg_off.substring(4,sAtt.bg_off.length-1);
		} 
		else tempsub.bgColor = sAtt.bg_off;
		tempsub.visibility = "inherit";
	}
	if(is.dom || is.iemac) {
		var tempsub = document.createElement("DIV");
		var wf = (is.ns6 || is.moz || is.strict) ? 12 : 0;
		var styStr = "width:"+(sAtt.width-wf)+"px; font-weight:"+sAtt.font_weight+"; z-index:200; border:solid "+sAtt.border+"px "+sAtt.border_color+"; border-top-width:0px; color:"+sAtt.fg_off+";  text-align:"+sAtt.align+"; font-size:"+sAtt.font_size+"px; font-family:"+sAtt.font+"; padding:"+pf+"px 6px "+(pf+pf2)+"px 6px; background:"+sAtt.bg_off+"; cursor:pointer; cursor:hand;"
		tempsub.id = name+menuName+"SubItem";
		tempsub.innerHTML = txt;
		tempsub.style.cssText = styStr;
		tempsub.setAttribute("style", styStr);
		this.subs[parent].lyr.appendChild(tempsub);
	}
	if(is.ie4) {
		var wf =  12; 
		var styStr = "width:"+(sAtt.width-wf)+"px; ; z-index:200;font-weight:"+sAtt.font_weight+"; border:solid "+sAtt.border+"px "+sAtt.border_color+"; border-top-width:0px; color:"+sAtt.fg_off+"; text-align:"+sAtt.align+"; font-size:"+sAtt.font_size+"px; font-family:"+sAtt.font+"; padding:"+pf+"px 6px "+(pf+pf2)+"px 6px; background:"+sAtt.bg_off+"; cursor:pointer; cursor:hand;"
		var ts = '<div id="'+name+menuName+'SubItem" style="'+styStr+'">'+txt+'</div>';
		this.subs[parent].lyr.insertAdjacentHTML("beforeEnd", ts);
		tempsub = document.all[name+menuName+"SubItem"];
	}
		tempsub.onmouseover = new Function('over_out(this, "'+sAtt.bg_on+'", "'+sAtt.fg_on+'")');
		tempsub.onmouseout = new Function('over_out(this, "'+sAtt.bg_off+'", "'+sAtt.fg_off+'")');
		tempsub.onmousedown = new Function('location.href = "'+url+'"');
}
menuObj.prototype.show = function(p) {
 if (p == "h") {
  	this.sty.left = this.parent.offX()+css_px;
  	this.sty.top = this.parent.offY()+this.parent.offH()+css_px;
 } else if(p == "v") {
 	if(is.iemac) {
 	this.sty.left = this.parent.offX()+mAtt.width+css_px;
  this.sty.top = this.parent.offY()+(mAtt.height%2);
 	} else {
  this.sty.left = this.parent.offX()+this.parent.offW()+css_px;
  this.sty.top = this.parent.offY()+css_px;
 	}
 }
 this.sty.zIndex = "1";
 this.sty.visibility = "visible";
 this.doShow();
}
menuObj.prototype.doShow = function() {
	clearTimeout(this.timer);
	this.clipIt(0, this.offW(), this.wipe, 0);
	this.wipe += 10;
	if(this.wipe <= this.maxWipe()) this.timer = setTimeout(this.obj + ".doShow()", 10);
}
menuObj.prototype.hide = function() {
	clearTimeout(this.timer);
	if(is.ns4 || is.iemac) this.clipIt(0, this.offW(), this.wipe-10, 0);
	else this.clipIt(0, this.offW(), this.wipe, 0);
	this.wipe -= 10;
	if(this.wipe >= 0) this.timer = setTimeout(this.obj + ".hide()", 10);
	else this.sty.visibility = "hidden";
}
function over_out(obj, bg, fg) {
	if(is.ns4) {
		if(bg.indexOf("url") != -1) obj.background.src = bg.substring(4,bg.length-1)
		else obj.background.src = "", obj.bgColor = bg;
	}
	else {
		if(bg.indexOf("url") != -1) obj.style.backgroundImage = bg;
		else obj.style.backgroundImage = "url(blank)", obj.style.backgroundColor = bg;
		obj.style.color = fg;
	}
}
menuObj.prototype.clipIt = function(t,r,b,l) {
	if(!is.ns4) this.sty.clip = "rect("+t+"px, "+r+"px, "+b+"px, "+l+"px)";
	else {
		this.sty.clip.top = t;
		this.sty.clip.right = r;
		this.sty.clip.bottom = b;
		this.sty.clip.left = l;
	}
}
wipeMenu.prototype.buildMenu = function(x,y,spacing) {
	x=ReAssignX(this.mainNum);
	this.mainNum[0].sty.left = x+css_px;
	this.mainNum[0].sty.top = y+css_px;
	if(!is.ns4 && spacing == 0) var spacing = -this.mAtt.border;
	for(i = 1; i < this.mainNum.length; i++) {
		if(this.pos == "h") {
			this.mainNum[i].sty.left = this.mainNum[i-1].offX()+this.mainNum[i-1].offW()+spacing+css_px;
			this.mainNum[i].sty.top = this.mainNum[i-1].offY()+css_px;
		} else {
			this.mainNum[i].sty.left = this.mainNum[i-1].offX()+css_px;
			this.mainNum[i].sty.top = this.mainNum[i-1].offY()+this.mainNum[i-1].offH()+spacing+css_px;
	}
	}
}

function ReAssignX(y) {
	// Calculating the position from left for NAV bar
	var WW=(is.ie5up)?document.body.clientWidth:(is.ns6)?innerWidth:0;;//window width
	var NW=(y.length*hMenu1Att["width"])+Math.floor(0.02*WW);//nav bar width + right edge offset(%, eg 0.06 = 6%)
	var CW=Math.floor((WW<767)?766:(WW<1001)?(0.99*WW):1000);//container width
	var MV=(WW<=NW)?766-(NW):Math.floor(((WW+CW)/2)-(NW));//setting nav left limit or pos
	return MV;
//  End of calculate
}

function wipeMenu(menu, p, ma, sa) {
    this.name = menu;
    this.pos = p;
    this.mAtt = ma;
    this.sAtt = (!sa) ? ma : sa;
    this.main = [];
    this.mainNum = [];
    this.subs = [];
}
function wipeMenu(menu, p, ma, sa) {
    this.name = menu;
    this.pos = p;
    this.mAtt = ma;
    this.sAtt = (!sa) ? ma : sa;
    this.main = [];
    this.mainNum = [];
    this.subs = [];
}
function macGo(){
 if (is.iemac){history.go(0);}
}
  if(document.layers) { 
var pX = innerWidth;
var pY = innerHeight; 
	onresize= function(){ 
		if(pX!= innerWidth || pY!= innerHeight) history.go(0);}
}
image1 = new Image()
image1.src = ""
image2 = new Image()
image2.src = ""
image3 = new Image()
image3.src = ""
image4 = new Image()
image4.src = ""
//M2Preload
//FinishM2

function initSwipeMenu() {
	hMenu1Att = new Array();
	hMenu1Att["width"] = 93,
	hMenu1Att["height"] = 20,
	hMenu1Att["align"] = "center";
	hMenu1Att["font"] = "Verdana";
	hMenu1Att["font_size"] = 12;
	hMenu1Att["font_weight"] = "normal";
	hMenu1Att["bg_off"] = "#000000";
	hMenu1Att["bg_on"] = "#FFFFFF";
	hMenu1Att["fg_off"] = "#FFFFFF";
	hMenu1Att["fg_on"] = "#FF0000";
	hMenu1Att["border"] = 1;
	hMenu1Att["border_color"] = "#B1861F";

	hMenu1SubAtt = new Array();
	hMenu1SubAtt["width"] = 93,
	hMenu1SubAtt["height"] = 20,
	hMenu1SubAtt["align"] = "center";
	hMenu1SubAtt["font"] = "Arial";
	hMenu1SubAtt["font_size"] = 11;
	hMenu1SubAtt["font_weight"] = "normal";
	hMenu1SubAtt["bg_off"] = "#000000";
	hMenu1SubAtt["bg_on"] = "#910E1C";
	hMenu1SubAtt["fg_off"] = "#ffffff";
	hMenu1SubAtt["fg_on"] = "#ffff00";
	hMenu1SubAtt["border"] = 1;
	hMenu1SubAtt["border_color"] = "#B1861F";

hMenu1 = new wipeMenu("hMenu1", "h", hMenu1Att, hMenu1SubAtt);
//MenuTypeEnd
//xMenu1
hMenu1.addMain("Menu1", true, "Home", "index.htm");
//xMenu1End
//xMenu2
hMenu1.addMain("Menu2", true, "About Us", "WineToursStanthorpe.htm");
if(!is.ie5 && !xis_nav6) {
hMenu1.addSub("Menu2Sub2", "Menu2", "The Vineyard", "WineToursStanthorpe.htm#VINEYARD");
hMenu1.addSub("Menu2Sub3", "Menu2", "The Winery", "WineToursStanthorpe.htm#WINERY");
hMenu1.addSub("Menu2Sub4", "Menu2", "The Gardens", "WineToursStanthorpe.htm#GARDENS");
hMenu1.addSub("Menu2Sub5", "Menu2", "Opening Hours", "WineToursStanthorpe.htm#OPENING");
};
//xMenu2End
//xMenu3
hMenu1.addMain("Menu3", true, "Contact Us", "StanthorpeCont.htm");
//xMenu3End
//xMenu4
hMenu1.addMain("Menu4", true, "Wines/Oils", "WineCellarDoor.htm");
if(!is.ie5 && !xis_nav6) {
hMenu1.addSub("Menu4Sub1", "Menu4", "White", "WineCellarDoor.htm#ANCH0");
hMenu1.addSub("Menu4Sub2", "Menu4", "Red", "WineCellarDoor.htm#ANCH1");
hMenu1.addSub("Menu4Sub3", "Menu4", "Sparkling", "WineCellarDoor.htm#ANCH2");
hMenu1.addSub("Menu4Sub4", "Menu4", "Fortified", "WineCellarDoor.htm#ANCH3");
hMenu1.addSub("Menu4Sub5", "Menu4", "Liqueur", "WineCellarDoor.htm#ANCH4");
hMenu1.addSub("Menu4Sub6", "Menu4", "Olive Oil", "WineCellarDoor.htm#ANCH5");
};
//xMenu4End
//xMenu5
hMenu1.addMain("Menu5", true, "Sales", "WineQueensland.htm");
if(!is.ie5 && !xis_nav6) {
hMenu1.addSub("Menu5Sub1", "Menu5", "How to Buy", "WineQueensland.htm");
hMenu1.addSub("Menu5Sub2", "Menu5", "Shipping", "WineQueensland.htm#SHIPPING");
hMenu1.addSub("Menu5Sub3", "Menu5", "Privacy", "WineQueensland.htm#PRIVACY");
};
//xMenu5End
//xMenu6
hMenu1.addMain("Menu6", true, "Finding Us", "StanthorpeFind.htm");
//xMenu6End
//xMenu7
hMenu1.addMain("Menu7", true, "News", "StanthorpeBallandean.htm#news");
//xMenu7End
//xMenu8
hMenu1.addMain("Menu8", true, "Gallery", "StanthorpeBallandean.htm");
//xMenu8End
//XtraMenusEnd
hMenu1.buildMenu(30,175,0);
//Additional
}
//SwipeMenuEnd

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

function flevDivPositionValue(sDiv, sProperty) { // v2.1, Marja Ribbers-de Vroed, FlevOOware
	this.opera = (window.opera); // Opera 5+
	this.ns4 = (document.layers); // Netscape 4.x
	this.ns6 = (document.getElementById && !document.all && !this.opera); // Netscape 6+
	this.ie = (document.all);  // Internet Explorer 4+
    var sValue = ""; docObj = eval("MM_findObj('" + sDiv + "')"); if (docObj == null) {return 0;}
	if ((sProperty == "left") || (sProperty == "top")) {
		if (!this.ns4) {docObj = docObj.style;} 
		sValue = eval("docObj." + sProperty);
		if ((this.ie) && (sValue == "")) { // IE (on PC) bug with nested layers
			if (sProperty == "top") { sValue = eval(sDiv + ".offsetTop"); } 
			else { sValue = eval(sDiv + ".offsetLeft"); } 
		};
	}
	else {
		if (this.opera) {
			docObj = docObj.style;
			if (sProperty == "height") { sValue = docObj.pixelHeight; } 
			else if (sProperty == "width") { sValue = docObj.pixelWidth; } 
		}
		else if (this.ns4) {sValue = eval("docObj.clip." + sProperty);} 
		else if (this.ns6) {sValue = document.defaultView.getComputedStyle(docObj, "").getPropertyValue(sProperty); } 
	    else if (this.ie) { 
			if (sProperty == "width") { sValue = eval(sDiv + ".offsetWidth"); } 
			else if (sProperty == "height") { sValue = eval(sDiv + ".offsetHeight"); } 
		}
   	}
	sValue = (sValue == "") ? 0 : sValue; 
	if (isNaN(sValue)) { if (sValue.indexOf('px') > 0) { sValue = sValue.substring(0,sValue.indexOf('px')); } } 
	return parseInt(sValue); 
}

function flevPersistentLayer() { // v3.3, Marja Ribbers-de Vroed, FlevOOware
	var sD = arguments[0], oD = eval("MM_findObj('" + sD + "')"), iWW, iWH, iSX, iSY, iT = 10, sS = "";
	if (!document.layers) {oD = oD.style;}
	if (oD.tmpTimeout != null) {clearTimeout(oD.tmpTimeout);}
	var sXL = arguments[1], sXC = arguments[2], sXR = arguments[3], sYT = arguments[4], sYC = arguments[5], sYB = arguments[6];
	var iS = (arguments.length > 7) ? parseInt(arguments[7]) : 0, iPx = (arguments.length > 8) ? parseInt(arguments[8]) : 0;
	if (window.innerWidth) { // NS4, NS6 and Opera
		var oW = window; iWW = oW.innerWidth; iWH = oW.innerHeight; iSX = oW.pageXOffset; iSY = oW.pageYOffset; }
	else if (document.documentElement && document.documentElement.clientWidth) { // IE6 in standards compliant mode
		var oDE = document.documentElement; iWW = oDE.clientWidth; iWH = oDE.clientHeight; iSX = oDE.scrollLeft; iSY = oDE.scrollTop; }
	else if (document.body) { // IE4+
		var oDB = document.body; iWW = oDB.clientWidth; iWH = oDB.clientHeight; iSX = oDB.scrollLeft; iSY = oDB.scrollTop; }
	else {return;}
	var iCX = iNX = flevDivPositionValue(sD, 'left'), iCY = iNY = flevDivPositionValue(sD, 'top');
	if (sXL != "") {iNX = iSX + parseInt(sXL);} 
	else if (sXC != "") {iNX = Math.round(iSX + (iWW/2) - (flevDivPositionValue(sD, 'width')/2));}
	else if (sXR != "") {iNX = iSX + iWW - (flevDivPositionValue(sD, 'width') + parseInt(sXR));}
	if (sYT != "") {iNY = iSY + parseInt(sYT);}
	else if (sYC != "") {iNY = Math.round(iSY + (iWH/2) - (flevDivPositionValue(sD, 'height')/2));}
	else if (sYB != "") {iNY = iSY + (iWH - flevDivPositionValue(sD, 'height') - parseInt(sYB));}
	if ((iCX != iNX) || (iCY != iNY)) {
		if (iS > 0) {
			if (iPx > 0) { iT = iS;
				var iPxX = iPx, iPxY = iPx, iMX = Math.abs(iCX - iNX), iMY = Math.abs(iCY - iNY);
				// take care of diagonal movement
				if (iMX < iMY) {iPxY = (iMX != 0) ? ((iMY/iMX)*iPx) : iPx;}
				else {iPxX = (iMY != 0) ? ((iMX/iMY)*iPx) : iPx;}
				if (iPxX >= iMX) {iPxX = Math.min(Math.ceil(iPxX), iPx);}
				if (iPxY >= iMY) {iPxY = Math.min(Math.ceil(iPxY), iPx);}
				// temporary X/Y coordinates
				if ((iCX < iNX) && (iCX + iPxX < iNX)) {iNX = iCX + iPxX;}
				if ((iCX > iNX) && (iCX - iPxX > iNX)) {iNX = iCX - iPxX;}
				if ((iCY < iNY) && (iCY + iPxY < iNY)) {iNY = iCY + iPxY;}
				if ((iCY > iNY) && (iCY - iPxY > iNY)) {iNY = iCY - iPxY;} }
			else { 
				var iMX = ((iNX - iCX) / iS), iMY = ((iNY - iCY) / iS); 
				iMX = (iMX > 0) ? Math.ceil(iMX) : Math.floor(iMX); iNX = iCX + iMX; 
				iMY = (iMY > 0) ? Math.ceil(iMY) : Math.floor(iMY); iNY = iCY + iMY; } }
		if ((parseInt(navigator.appVersion)>4 || navigator.userAgent.indexOf("MSIE")>-1) && (!window.opera)) {sS="px";}
		if (iMX != 0) {eval("oD.left = '" + iNX + sS + "'");}
		if (iMY != 0) {eval("oD.top = '" + iNY + sS + "'");} }
	var sF = "flevPersistentLayer('" + sD + "','" + sXL + "','" + sXC + "','" + sXR + "','" + sYT + "','" + sYC + "','" + sYB + "'," + iS + "," + iPx + ")";
	oD.tmpTimeout = setTimeout(sF,10);
}

function flevInitPersistentLayer() { // v3.3, Marja Ribbers-de Vroed, FlevOOware
	if (arguments.length < 8) {return;}
	var sD = arguments[0]; if (sD == "") {return;}
	var	oD = eval("MM_findObj('" + sD + "')"); if (!oD) {return;}
	var iCSS = parseInt(arguments[1]);
	var sXL = arguments[2], sXC = arguments[3], sXR = arguments[4], sYT = arguments[5], sYC = arguments[6], sYB = arguments[7];
	var iS = (arguments.length > 8) ? parseInt(arguments[8]) : 0, iPx = (arguments.length > 9) ? parseInt(arguments[9]) : 0;
	if (iCSS != 0) { if (!document.layers) {oD = oD.style;} sXL = parseInt(oD.left), sYT = parseInt(oD.top);}
	var sF = "flevPersistentLayer('" + sD + "','" + sXL + "','" + sXC + "','" + sXR + "','" + sYT + "','" + sYC + "','" + sYB + "'," + iS + "," + iPx + ")";
	eval(sF);
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

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;
}