var close_box_display = 'n'+'on'+'e';
homeover=new Image(20,20);
homeover.src='layout-images/me-blue-glasses-small.jpg'

<!-- 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 = '?cc=greenbuckle@btinternet.com&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 -->

<!-- begin function for putting the top navi link for the current page as 'this page' -->
function show_page_as_this_page ()
{
if ((location.href.indexOf('index') > -1) || (location.href.indexOf('html') == -1))  
	{
	var link_to_make_this_page = new getObj('homelink');
	link_to_make_this_page.obj.className = 'thispage';
	link_to_make_this_page.obj.title = 'this page';
	link_to_make_this_page.obj.onclick ='return false;'
	}
if (location.href.indexOf('about') > -1) 
	{
	var link_to_make_this_page = new getObj('aboutlink');
	link_to_make_this_page.obj.className = 'thispage';
	link_to_make_this_page.obj.title = 'this page';
	}
if (location.href.indexOf('expertise') > -1) 
	{
	var link_to_make_this_page = new getObj('expertiselink');
	link_to_make_this_page.obj.className = 'thispage';
	link_to_make_this_page.obj.title = 'this page';
	}
if (location.href.indexOf('optimisation') > -1) 
	{
	var link_to_make_this_page = new getObj('seolink');
	link_to_make_this_page.obj.className = 'thispage';
	link_to_make_this_page.obj.title = 'this page';
	}
if (location.href.indexOf('portfolio') > -1) 
	{
	var link_to_make_this_page = new getObj('portfoliolink');
	link_to_make_this_page.obj.className = 'thispage';
	link_to_make_this_page.obj.title = 'this page';
	}
if (location.href.indexOf('contact') > -1) 
	{
	var link_to_make_this_page = new getObj('contactlink');
	link_to_make_this_page.obj.className = 'thispage';
	link_to_make_this_page.obj.title = 'this page';
	}
if (location.href.indexOf('testimonials') > -1) 
	{
	var link_to_make_this_page = new getObj('testimonialslink');
	link_to_make_this_page.obj.className = 'thispage';
	link_to_make_this_page.obj.title = 'this page';
	}
}
