var close_box_display = 'n'+'on'+'e';

<!-- Begin function for opening a window - arg 1 is url, arg 2 is (arbitrary) name, args 3&4 are width & height, arg 5 is scrollbars required (yes or no)
var win=null;
function NewWindow(mypage,myname,w,h,scroll)
{
myleft=(screen.width)?(screen.width-w)/2:100;
mytop=(screen.height)?(screen.height-h)/2:100;
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=" + scroll + ",location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes";
win=window.open(mypage,myname,settings);
win.focus();
}
// End -->



<!-- Begin function for resizing enlargement screens - arg 1 is required width, arg 2 is required height

function ResizeScreen(Width,Height)
{window.moveTo(0,0);
var PageWidth = Width;	
if (Height == null) 
	{PageHeight = screen.availHeight} 	
else 
	{PageHeight = Height} 	 	
if (screen.availHeight < Height) 
	{PageHeight = screen.availHeight};
if (screen.availWidth < Width) 
	{PageWidth = screen.availWidth};
window.resizeTo(PageWidth,PageHeight);
}

// End -->

<!-- Begin function for getting correct object prefix, according to how browser treats document elements

function getObj(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
}

// End -->

<!-- Begin function for showing a help box (div) on screen -->

function show_help_box(divname,boxheight)
{
var divtoshow = new getObj(divname);
divtoshow.style.display = 'block';
}

<!-- End -->

<!-- Begin function for showing a help box (div) on screen, with display:inline -->

function show_help_box_inline(divname,boxheight)
{
var divtoshow = new getObj(divname);
divtoshow.style.display = 'inline';
}

<!-- End -->

// End -->
<!-- Begin function for hiding a help box (div) on screen

function close_help_box(divname)
{
var divtoclose = new getObj(divname);
divtoclose.style.display = close_box_display;  
}

<!-- Begin function for generating text email link 

// **************************************************************
// AUTHOR: Andrew Green (copyright 2004)
// URL: http://www.andrewgreen.biz
// Feel free to use this script - just leave this message intact.
// **************************************************************

function GenerateEmailLink(domain,emailrecipient,linktype,linktext,styleclass,atagtitle,emailsubject,emailbody,atagid)
{
var atsign = '@';
if (domain.substr(0,4) == 'www.')
	{domain = domain.substring(4,(domain.length+1));}
if (domain.substr(0,11) == 'http://www.')
	{domain = domain.substring(11,(domain.length+1));}
if (emailrecipient.indexOf('@') > -1)
	{emailaddress = emailrecipient} 
else
	{emailaddress = emailrecipient + atsign + domain} 
if (emailaddress.search(/[ \/;:,]/) > -1)
	{alert ('email addresses can\'t have a space or , or ; or : or / in them.\nYou used \'' + emailrecipient + '\', which is invalid'); return} 
if ((linktype != 'text') && (linktype != 'address')) 
	{alert ('the linktype argument must be \'text\' or \'address\'.\nYou used \'' + linktype + '\''); return;}
if ((atagid == '') || (atagid == undefined)) 
	{idattribute=''} 
else 
	{idattribute = 'id="' + atagid + '" '}
if ((emailsubject == '') || (emailsubject == undefined))  
	{emailsubjectsubattribute=''} 
else
	{emailsubjectsubattribute = '?subject=' + emailsubject};
if ((emailbody == '') || (emailbody == undefined))  
	{emailbodysubattribute=''} 
else
	{emailbodysubattribute = '&body=' + emailbody};
atagcode = '<a class="' 
	+ styleclass + '" ' 
	+ idattribute
	+ 'href="mailto:'
	+ emailaddress
	+ emailsubjectsubattribute 
	+ emailbodysubattribute
	+ '" title="'
	+ atagtitle
	+ '">';
(linktype == 'text')? 
	linkcode = linktext + '</a>' : 
	linkcode = emailrecipient + atsign + domain + '</a>';
document.write (atagcode);
document.write (linkcode);
}

// End -->

<!-- Begin function for generating email anchor tag for an image 

// **************************************************************
// AUTHOR: Andrew Green (copyright 2004)
// URL: http://www.andrewgreen.biz
// Feel free to use this script - just leave this message intact.
// **************************************************************

function GenerateEmailAnchor(domain,emailrecipient,atagtitle,emailsubject,emailbody)
{
var atsign = '@';
if (domain.substr(0,4) == 'www.')
	{domain = domain.substring(4,(domain.length+1));}
if (domain.substr(0,11) == 'http://www.')
	{domain = domain.substring(11,(domain.length+1));}
if (emailrecipient.indexOf('@') > -1)
	{emailaddress = emailrecipient} 
else
	{emailaddress = emailrecipient + atsign + domain} 
if (emailaddress.search(/[ \/;:,]/) > -1)
	{alert ('email addresses can\'t have a space or , or ; or : or / in them.\nYou used \'' + emailrecipient + '\', which is invalid'); return} 
if ((emailsubject == '') || (emailsubject == undefined))  
	{emailsubjectsubattribute=''} 
else
	{emailsubjectsubattribute = '?subject=' + emailsubject};
if ((emailbody == '') || (emailbody == undefined))   
	{emailbodysubattribute=''} 
else 
	{emailbodysubattribute = '&body=' + emailbody};
atagcode = '<a class="' 
	+ '" href="mailto:'
	+ emailaddress
	+ emailsubjectsubattribute 
	+ emailbodysubattribute
	+ '" title="'
	+ atagtitle
	+ '">';
document.write (atagcode);
}

// End -->

<!-- Begin function for generating email anchor tag (for buttons) 

// **************************************************************
// AUTHOR: Andrew Green (copyright 2004)
// URL: http://www.andrewgreen.biz
// Feel free to use this script - just leave this message intact.
// **************************************************************

function GenerateEmailButtonAnchor(domain,emailrecipient,atagtitle,imgtagname,emailsubject,emailbody)
{
var atsign = '@';
if ((emailbody == '') || (emailbody == undefined))   
	{emailbodysubattribute=''} 
else 
	{emailbodysubattribute = '&body=' + emailbody};
atagcode = '<a class="' 
	+ '" href="mailto:'
	+ emailrecipient
	+ atsign
	+ domain
	+ '?subject='
	+ emailsubject 
	+ emailbodysubattribute
	+ '" title="'
	+ atagtitle
	+ '" '
	+ 'onmouseover="'
	+ imgtagname
	+ '.src=commover.src" onmouseout="'
	+ imgtagname
	+ '.src=commbutt.src">';
document.write (atagcode);
}

// End -->

<!-- Begin function for getting correct document body, to be used with checking the scroll position

function truebody()
{return (document.compatMode!="BackCompat")? document.documentElement : document.body}

// End -->

<!-- Begin function for add favorites/bookmark reminder link

function FavPrompt (PageUrl,PageTitle)
{
if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) 
	{
	var msg = '<a class="limebluebold12" href="javascript:window.external.AddFavorite(';
	msg += "'";
  	msg += PageUrl;
	msg += "'";
	msg += ',';
	msg += "'";
	msg += PageTitle;
	msg += "'";
	msg += ')">';
	document.write(msg);
  	document.write('Click here</a>');
  	document.write(' to add this page to your Favorites!');
	}

else 
	{
  	var msg = "Don't forget to bookmark this page!";
  	if(navigator.appName == "Netscape") 
  		{  
    		msg += "  (CTRL+SHIFT+D)";
    		document.write(msg);
  		}
  	else
  		{
    		var msg = "Don't forget to add this page to your favorites!";
    		document.write(msg);
		}
	}
}
// End -->

<!-- Begin function for image favorites reminder link, with alert if Netscape

function ImageFavPrompt (PageUrl,PageTitle)

{
if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) 
	{
	window.external.AddFavorite(PageUrl,PageTitle);
  	}
else 
	{
  	var msg = "On Netscape, you should press CTRL+SHIFT+D to bookmark this page";
  	if(navigator.appName == "Netscape") 
  		{  
    		alert(msg);
    		}
  	else
  		{
		alert("Unfortunately, your browser can't do this automatically ... but don't forget to add this page to your favorites now");   		
		}
	}
}
// End -->

<!-- Begin function for generating links --> 

// **************************************************************
// AUTHOR: Andrew Green (copyright 2004)
// URL: http://www.andrewgreen.biz
// Feel free to use this script - just leave this message intact.
// **************************************************************

function GenerateLink(linktype,linkurl,linktext,atagtitle,htmlimgtag)
{
var displayedlinkurl = linkurl;
if (linkurl.indexOf('www') == -1) {displayedlinkurl = 'http://' + linkurl};
var htmlatagend = 'href="http://' + linkurl + '" target="_blank" title="' + atagtitle + '">';
document.write('<div style="float:left;display:inline;margin:0px 40px 10px 0px;width:420px;">');
document.write('<a class="hover" ' + htmlatagend); 
if (linktype == 'image')
	{
	document.write(htmlimgtag + ' ');
	}
document.write(linktext + '</a>');
document.write('</div><div style="float:left;display:inline;width:150px;">');
styleclassdefn = 'class="hover" ' 
document.write('<a ' + htmlatagend); 
document.write(displayedlinkurl + '</a></div>');
}

<!-- End -->

function ShowEnlargement(imageUrl,imageWidth,imageHeight,imageName,bgcolor,hugger,hugMargin,flag) 
{
// by E Michael Brandt of ValleyWebDesigns.com - Please leave these comments intact.
// version 3.0.4 
// modified by Andrew Green - www.andrewgreen.biz - to remove automatic close and include stylesheet in html source 

	if (bgcolor=="") {
		bgcolor="#FFFFFF";
	}
	var adj=10
	var w = screen.width;
	var h = screen.height;
	var byFactor=1;

	if(w<740){
	  var lift=0.90;
	}
	if(w>=740 & w<835){
	  var lift=0.91;
	}
	if(w>=835){
	  var lift=0.93;
	}
	if (imageWidth>w){	
	  byFactor = w / imageWidth;			
	  imageWidth = w;
	  imageHeight = imageHeight * byFactor;
	}
	if ((imageHeight)>h-adj){
	  byFactor = h / imageHeight;
	  imageWidth = (imageWidth * byFactor);
	  imageHeight = h; 
	}
	   
	var scrWidth = w-adj;
	var scrHeight = (h*lift)-adj;

	if ((imageHeight)>scrHeight){
  	  imageHeight=imageHeight*lift;
	  imageWidth=imageWidth*lift;
	}

	var posLeft=0;
	var posTop=0;

	if (hugger == "hug image"){
	  if (hugMargin == ""){
	    hugMargin = 0;
	  }
	  var scrHeightTemp = imageHeight - 0 + 2*hugMargin;
	  if (scrHeightTemp < scrHeight) {
		scrHeight = scrHeightTemp;
	  } 
	  var scrWidthTemp = imageWidth - 0 + 2*hugMargin;
	  if (scrWidthTemp < scrWidth) {
		scrWidth = scrWidthTemp;
	  }
	  
	  if (scrHeight<100){scrHeight=100;}
	  if (scrWidth<100){scrWidth=100;}

	  posTop =  ((h-(scrHeight/lift)-adj)/2);
	  posLeft = ((w-(scrWidth)-adj)/2);
 	}

	if (imageHeight > (h*lift)-adj || imageWidth > w-adj){
		imageHeight=imageHeight-adj;
		imageWidth=imageWidth-adj;
	}
	posTop = parseInt(posTop);
	posLeft = parseInt(posLeft);		
	scrWidth = parseInt(scrWidth); 
	scrHeight = parseInt(scrHeight);
	
	var agt=navigator.userAgent.toLowerCase();
	if (agt.indexOf("opera") != -1){
	  var args= new Array();
	  args[0]='parent';
	  args[1]=imageName;
	  var i ; document.MM_returnValue = false;
	  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
	} else {
	newWindow = window.open("enlargement.html","newWindow","width="+scrWidth+",height="+(scrHeight+30)+",left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+imageName+'</title><link rel="stylesheet" type="text/css" href="new-style.css"><body>');  
	newWindow.document.write('<table width='+imageWidth+' border="0" cellspacing="0" cellpadding="0" align="center" height='+scrHeight+' ><tr><td>');
	if (flag=="allsop")
		{newWindow.document.write('<center>' +
		'<script type="text/javascript" src="javascript/fade-images-allsop.js"></script>' +
		'</center>')}	
	else
		{newWindow.document.write('<img src="'+imageUrl+'" width='+imageWidth+' height='+imageHeight+' alt="' +imageName+ '" title="' +imageName+ '">');} 
	newWindow.document.write('</td></tr></table><center><a href="javascript:self.close()" title="click here to close this window">close</a></center></body></html>');
	newWindow.document.close();
	newWindow.focus();
	}
}

function abbotsbury_link () {document.write('<a href="http://www.abbotsbury.co.uk" target="_blank" title="click here to visit the Abbotsbury Village website (opens in a new window)">')}