function openPictureWindow_Fever(imageName,imageWidth,imageHeight,alt,posLeft,posTop) {
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">'); 
	newWindow.document.write('<img src='+imageName+' width='+imageWidth+' height='+imageHeight+' alt='+alt+'>'); 
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}
function domenu(id){
id.className="active"
//id.style="#000000"
}
function undomenu(id){
id.className="nonactive"
}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}
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) { //v3.0
  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); 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];}
}


function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_changeProp(objName,x,theProp,theValue) { //v3.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)) eval("obj."+theProp+"='"+theValue+"'");
}
dayName = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")
monName = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")
now = new Date

function addbookmark(){
bookmarkurl="http://www.forest-lodge.co.nz/"
bookmarktitle="Welcome to Forest-Lodge"
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}
function close_window() {
    window.close();
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function donotes(){
if(document.hintbox.display.value==""){
MM_openBrWindow('LOTR_alert.htm','','width=500,height=500')
}
}
function filltariff(){
tarifftext.innerHTML=document.tariff.tariff.value
}
function doscleft(str){
document.getElementById('manga').scrollLeft=str
}
function launchlocator(strnm){
lockey.value=strnm
MM_openBrWindow('Whanganui_river_locator.htm','','width=600,height=600')
}
function openPhotowin(imageName,imageWidth,imageHeight,alt,posLeft,posTop){
	var imgW=eval(imageWidth)
	var imgH=eval(imageHeight)
	var winwidth = eval(imgW + 50);
	var winheight = eval(imgH + 50);
	var fwinheight = eval(winheight + 50);
	var dest = ("Photo_window.php?imgname=" + imageName + "&vimgW=" + imgW + "&vimgH=" + imgH + "&desctipt=" + alt + "&innertabH=" + winheight)
	var dims = ("width=" + winwidth + ",height=" + fwinheight)
	MM_openBrWindow(dest,'',dims)
}
function getwinsize() {
var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement &&
      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;

  }
  	newheight=eval(myHeight-80)
	spacerheight=eval(myHeight-77-261)
    document.getElementById('content').style.height=newheight
	}

function calmenuloc(Tid){
	ML = document.getElementById(Tid)
	xPos = eval(ML).offsetLeft;
	tempEl = eval(ML).offsetParent;
  	while (tempEl != null) {
  		xPos += tempEl.offsetLeft;
  		tempEl = tempEl.offsetParent;
  	}
	
	return xPos;
}
function calmenuloctop(Sid){
	ML = document.getElementById(Sid)
	yPos = eval(ML).offsetTop;
	tempEl = eval(ML).offsetParent;
  	while (tempEl != null) {
  		yPos += tempEl.offsetTop;
  		tempEl = tempEl.offsetParent;
  	}
	
	return yPos;
}
function reposmenus(){
   document.location.reload()
}
xpos = 0;
ypos = 0;

function mousecoords(e){
  if(document.all){
    xpos = event.clientX + document.body.scrollLeft;
    ypos = event.clientY + document.body.scrollTop;
  }
  else{
    xpos = e.pageX;
    ypos = e.pageY;
  }
  alert(xpos)
  alert(ypos)
}