// Identification of specific browsers

var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
// var is_epiphany = navigator.userAgent.toLowerCase().indexOf('epiphany') > -1;
// var is_firefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;

// Routine for popup windows with title, size and background colour parameter (5 parameters)

var newwindow;
var wheight = 0, wwidth = 0;

function popitup5(url, title, iwidth, iheight, colour) {
var pwidth, pheight;

if ( !newwindow || newwindow.closed ) {
	pwidth=iwidth+30;
	pheight=iheight+30;
	newwindow=window.open('','htmlname','width=' + pwidth +',height=' +pheight + ',resizable=yes,top=50,left=10,status=no,location=no');
	wheight=iheight;
	wwidth=iwidth;
}

if (wheight!=iheight || wwidth!=iwidth ) {
	pwidth=iwidth+30;
	pheight=iheight+70;
//	The resizeTo needs Javascript 1.2 or higher so the include for this javascript file should specify language="JavaScript1.2" 
	if (window.resizeTo) newwindow.resizeTo(pwidth, pheight);
wheight=iheight;
wwidth=iwidth;
}

newwindow.document.clear();
newwindow.document.writeln('<html> <head> <title>' + title + ' <\/title> <\/head> <body bgcolor= \"' + colour + '\"> <center>');
newwindow.document.writeln('<img src=' + url + '  title=\"' + title + '\"   alt=\"' + title + '\" >');
newwindow.document.writeln('<\/center> <\/body> <\/html>');
newwindow.document.close();

if (is_chrome) {newwindow.parent.blur();}

newwindow.focus();
}

//Routine to tidy up popup windows when page is left

function tidy()
{
if (newwindow.location && !newwindow.closed) { newwindow.close(); }

}


//Routine to write email address to avoid address harvisters.

function tf_email() { 

document.writeln("<A href=\"mailto:" + "mail" + "&#64;" + "thecraven.co.uk\">"  +    "carol" + "&#64;" + "thecraven.co.uk" + "\<\/A> ") ;}

// Based on JavaScript provided by Peter Curtis at www.pcurtis.com -->
