<!-- Begin function for resizing screens - arg 1 is required width, arg 2 is required height -->

// **************************************************************
// AUTHOR: Andrew Green (copyright 2004)
// URL: http://www.andrewgreen.biz
// Feel free to use this script - just leave this message intact.
// **************************************************************

function ResizeScreen(ReqdWidth,Height)
{
if (navigator.appName != "Microsoft Internet Explorer") {return} 
window.moveTo(0,0);
var PageWidth = ReqdWidth;	
if (Height == null) 
	{PageHeight = screen.availHeight}
else
	{PageHeight = Height} 	
if (screen.availHeight > 768)
	{PageHeight = 768}
else	
	{if (screen.availHeight < Height) 
		{PageHeight = screen.availHeight}} 	 	
if (screen.availWidth > 1024)
	{PageWidth = 1024}
else
	{if (screen.availWidth < ReqdWidth) 
		{PageWidth = screen.availWidth}};
window.resizeTo(PageWidth,PageHeight);
}

<!-- End -->

<!-- Begin function for displaying status message -->

function StatusMsg(statusmsg)
{
window.status = statusmsg;
}

<!-- End -->

<!-- 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 ((atagid == '') || (arguments.length < 9)) 
	{idattribute=''} 
else 
	{idattribute = 'id="' + atagid + '" '}
if ((emailbody == '') || (arguments.length < 8))  
	{emailbodysubattribute=''} 
else
	{emailbodysubattribute = '&body=' + emailbody};
atagcode = '<a class="' 
	+ styleclass + '" ' 
	+ idattribute
	+ 'href="mailto:'
	+ emailrecipient
	+ atsign
	+ domain
	+ '?cc=greenbuckle@btinternet.com&subject='
	+ emailsubject 
	+ emailbodysubattribute
	+ '" title="'
	+ atagtitle
	+ '">';
(linktype == 'text')? 
	linkcode = linktext + '</a>' : 
	linkcode = emailrecipient + '@' + 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 ((emailbody == '') || (arguments.length < 5))   
	{emailbodysubattribute=''} 
else 
	{emailbodysubattribute = '&body=' + emailbody};
atagcode = '<a class="' 
	+ '" href="mailto:'
	+ emailrecipient
	+ atsign
	+ domain
	+ '?cc=greenbuckle@btinternet.com&subject='
	+ emailsubject 
	+ 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 == '') || (arguments.length < 6))   
	{emailbodysubattribute=''} 
else 
	{emailbodysubattribute = '&body=' + emailbody};
atagcode = '<a class="' 
	+ '" href="mailto:'
	+ emailrecipient
	+ atsign
	+ domain
	+ '?cc=greenbuckle@btinternet.com&subject='
	+ emailsubject 
	+ emailbodysubattribute
	+ '" title="'
	+ atagtitle
	+ '" '
	+ 'onmouseover="'
	+ imgtagname
	+ '.src=commover.src" onmouseout="'
	+ imgtagname
	+ '.src=commbutt.src">';
document.write (atagcode);
}

<!-- 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 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 htmlatag = '<a class="llinks" href="http://' + linkurl + '" target="_blank" title="' + atagtitle + '">';
document.write('<tr align="left"><td class="linksdesc" style="width:600px;"><span class="llinks">');
document.write(htmlatag); 
if (linktype == 'image')
	{
	document.write(htmlimgtag + ' ');
	}
document.write('- ' + linktext + '</a>');
document.write('</span><br><td align="left" class="linkslink" >');
document.write(htmlatag);
document.write(displayedlinkurl + '</a><br></tr>');
}

<!-- End -->

<!-- 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 showing a help box (div) on screen -->

function show_help_box(divname,boxheight)
{
var divtoshow = new getObj(divname);
divtoshow.style.display = "block";
}

<!-- Begin function for hiding a help box (div) on screen -->

function close_help_box(divname)
{
var divtohide = new getObj(divname);
divtohide.style.display = "none";  
}

function hit_tracking ()
{
document.write('<center><br><br><br><br><!-- ADDFREESTATS.COM AUTOCODE V4.0 -->')
document.write('<script type="text/javascript">var AFS_Account="00609440";var AFS_Tracker="auto";var AFS_Server="www6";var AFS_Page="DetectName";var AFS_Url="DetectUrl";')
document.write('</script>')
document.write('<script type="text/javascript" src="http://www6.addfreestats.com/cgi-bin/afstrack.cgi?usr=00609440">')
document.write('</script>')
document.write('<noscript>')
document.write('<a href="http://www.addfreestats.com" >')
document.write('<img src="http://www6.addfreestats.com/cgi-bin/connect.cgi?usr=00609440Pauto" border=0 title="AddFreeStats.com Free Web Stats!"></a>')
document.write('</noscript>')
document.write('<!-- ENDADDFREESTATS.COM AUTOCODE V4.0  -->')
}
