//// Write the body end
//p('<td></tr></table></center>');


// Write a vertical space
p('<table border=0 cellpadding=0 cellspacing=0 height=10><tr height=10><td height=10><img alt="" width=1 height=1 src="/blank.gif"></td></tr></table>');


// Write the bottom thumbnail links
if (!thumbsPath) {var thumbsPath = "/thumbs/";}
if (!thumbsExt) {var thumbsExt = ".jpg";}
if (!hideThumbs) {var hideThumbs = 0;}
if (!thumbLinks) {
	var thumbLinks = new Array(8);
	for (var i=0; i<thumbLinks.length; i++) {
		thumbLinks[i] = '/portfolio' + (i+1) + '/';
	}
}


function round(n, x) {
	// Rounds n to x decimal places. Default to 0 decimals.
	x = (!x ? 0 : x);
	return Math.round(n*Math.pow(10, x)) / Math.pow(10, x);
}

if (useThumbs && !hideThumbs) {
	
	var averageThumbWidth = 70;
	if (thumbLinks.length > 8) averageThumbWidth = 60;
	
	var bottomBarWidth = 700;
	var spaceWidth = round((bottomBarWidth - averageThumbWidth * thumbLinks.length) / (thumbLinks.length + 1), 0);
	
	if (spaceWidth < 0) {spaceWidth = 1;}
	
	p('<center>');
	p('<table border=0 cellpadding=0 cellspacing=0>');
	p('<tr valign=top>');
	
	for (var i=1; i<=thumbLinks.length; i++) {
		if (i==1)
			p('<td width=' + spaceWidth + '><img alt="" width=1 height=1 src="/blank.gif"></td>');
		p('<td align=center><a href="' + thumbLinks[i-1] + '"><img border=0 ');
		if (averageThumbWidth != 70)
			p('width="' + averageThumbWidth + '" ');
		p('alt="" src="' + thumbsPath + 'thumb' + i + thumbsExt + '"></a></td>');
		p('<td width=' + spaceWidth + '><img alt="" width=1 height=1 src="/blank.gif"></td>');
	}
	
	p('</tr>');
	p('</table>');
	p('</center>');
}


// Write a vertical space
p('<table border=0 cellpadding=0 cellspacing=0 height=25><tr height=25><td height=25><img alt="" width=1 height=1 src="/blank.gif"></td></tr></table>');

p('<font style="font-size: 10px; color: #999999">Website by ');
p('<a style="font-size: 10px; color: #999999" href="mailto:gavinjackson@ntlworld.com">Jackson Computer Consultancy</a></font>');





var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

try {
var pageTracker = _gat._getTracker("UA-13012365-1");
pageTracker._trackPageview();
} catch(err) {}
