var close_box_display = 'non'+'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 -->

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+80)+',left='+posLeft+',top='+posTop+',resizable');
	newWindow.document.open();
	newWindow.document.write('<html><head><title>'+imageName+'</title><link rel="stylesheet" type="text/css" href="style.css"></head><body class="enlargement">');  
	newWindow.document.write('');
	newWindow.document.write('<table width='+imageWidth+' border="0" cellspacing="0" cellpadding="0" height='+scrHeight+' ><tr><td align="center" width='+imageWidth+'>');
	{newWindow.document.write('<h5>'+imageName+'</h5></td></tr><tr><td align="center" width='+imageWidth+'><img style="margin:0 20px 20px 20px;" align="center" src="'+imageUrl+'" width='+imageWidth+' height='+imageHeight+' alt="' +imageName+ '" title="' +imageName+ '">');} 
	newWindow.document.write('<br><center><a href="javascript:self.close()" title="click here to close this window">close</a></center></td></tr></table></body></html>');
	newWindow.document.close();
	newWindow.focus();
	}
}

function ShowEnlargement_with_text(imageUrl,imageWidth,imageHeight,imageName,bgcolor,hugger,hugMargin,text,height_reduction,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
// plus lots of changes to the HTML code and to allow text with the image
// height_reduction is to reduce the height of window (and bottext div), to remove white space if there isn't much text - not used if no text
 
	if (bgcolor=="") {
		bgcolor="#FFFFFF";
	}
	var adj=10
	var w = screen.width;
	var h = screen.height;
	var byFactor=1;
	var landscape_image = (imageWidth>imageHeight ? true : false)

	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;}
	
	 if ( text!='none')
		 if (landscape_image) 
			{scrWidth += 20; scrHeight +=290; scrHeight -=height_reduction}
	 	else
			{scrWidth += 320; scrHeight +=40;}
	 else
		 if (landscape_image) 
			{scrWidth += 20; scrHeight +=50;}
	 	else
			{scrWidth += 20; scrHeight +=50;}
	
	  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+',left='+posLeft+',top='+posTop+',scrollbars,resizable');
	newWindow.document.open();
	newWindow.document.write('<html><title>'+imageName+'</title><link rel="stylesheet" type="text/css" href="style.css">');  
	newWindow.document.write('<body class="enlargement_with_text">')
	newWindow.document.write('<div class="maincontainer" width="100%" height="100%" >');
	newWindow.document.write('<h5>'+imageName+'</h5>');
	 if (landscape_image) 
		{
		newWindow.document.write('<img class="landscape" align="center" src="'+imageUrl+'" width='+imageWidth+' height=" '+imageHeight+' " alt="' +imageName+ '" title="' +imageName+ '">');
		if ( text!='none')
			{
			newWindow.document.write('<center><div class="bottext" ')
			if (height_reduction>0) {newWindow.document.write('style="height:'+(240-height_reduction)+'px;" ')} 
			newWindow.document.write('>'+text)
			newWindow.document.write('</div></center>')
			}
		else
			{
			newWindow.document.write('<br>&nbsp;')
			}
		}
	else
		{
		newWindow.document.write('<div class="leftcolumn" width="'+imageWidth+' " height=" '+imageHeight+' ">')
		newWindow.document.write('<div class="left_inner">');
		newWindow.document.write('<img align="left" src="'+imageUrl+'" width='+imageWidth+' height=" '+imageHeight+' " alt="' +imageName+ '" title="' +imageName+ '">');
		newWindow.document.write('</div></div>')
		if ( text!='none')
			{
			newWindow.document.write('<div class="rightcolumn" style="height:'+imageHeight+'px;">')
			newWindow.document.write('<div class="right_inner" style="height:'+imageHeight+'px;">'+text)
			newWindow.document.write('</div></div>')
			}
		}
	newWindow.document.write('</div>')
	newWindow.document.write('<div class="close"><a href="javascript:self.close()" title="click here to close this window">close</a></div>');
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
	}
}

<!-- 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 -->

var size_increase = 0;
var unit = 'pt';
var fontsize = 9;

function FontSizer(inc) 
{
	if (!document.getElementById) return;
	size_increase += inc;
	getBody = document.getElementsByTagName('body')[0];
	getBody.style.fontSize = (fontsize + size_increase) + unit
}

function FontDefaults() 
{
	if (!document.getElementById) return;
	show_help_box('sizer')	
	size_increase = 0;
	getBody = document.getElementsByTagName('body')[0];
	getBody.style.fontSize = fontsize + unit	
}
