//
// header.js
// statewidepaint.com
// REQUIRES config.js
// REQUIRES stclib.js
// REQUIRES footer.js

///////////////////////////////////////////////////////////////////////////////
// START: VARIABLES
///////////////////////////////////////////////////////////////////////////////
var i;
var agt = navigator.userAgent.toLowerCase();
var aname = navigator.appName;
var aver = parseInt(navigator.appVersion.substring(0,1));
var mie = false;

var gbAnnounceOk = "T";
var gbCookiesOn = "T";
var gbCurrentHome = "F";
var gbDebugMode = "F";
var gbExplorer = false;

var gnAnnLimit = 1;
var gnAnnDays = 1; // NUMBER OF DAYS THE ANNOUNCEMENT COOKIE SHOULD LAST
var gnAnnounceLines = 0;
var gnBrowserVers = parseInt(navigator.appVersion.substring(0,1));
var gnDateEnd;
var gnDateCur;;
var gnDocuments = 1;
var gnYearCur;
var gnYearEnd;

var gasAnnounceLine = new createDocList (10, '');
var gasAnnounceStyle = new createDocList (10, '');
var gasDateEnd;
var gasDocumentName = new createDocList (10, '');
var gasDocumentTitle = new createDocList (10, '');

var gsAnnExpires = new Date();
var gsBrowserAgent = navigator.userAgent.toLowerCase();
var gsBrowserName = navigator.appName;
var gsCurrentDoc;
var gsCurrentPath = '';
var gsDateCur = new Date ();
var gsDateModified = new Date (document.lastModified);   
var gsDefaultName = '';
var gsDomainName = "";
var gsDomainURL = "";
var gsIcon = "";
var gsLT_ARROW = '&#9668;';
var gsRT_ARROW = '&#9658;';
var gsUP_ARROW = '&#9650;';
var gsDN_ARROW = '&#9660;';

if ((STC_DOMAIN == null) || (STC_DOMAIN == ""))
{
    gsDomainName = window.location.hostname;
    gsDomainURL = 'http://' + window.location.hostname;// + '/';
    tnPosWWW = gsDomainURL.indexOf ("www."); 
    if (tnPosWWW < 0)
    {
	gsDomainURL = 'http://www.' + window.location.hostname;// + '/';
    }
}
else
{
    gsDomainName = STC_DOMAIN;
    gsDomainURL = STC_DOMAIN;
    tnPosWWW = STC_DOMAIN.indexOf ("www."); 
    if (tnPosWWW < 0)
    {
	gsDomainURL = 'http://www.' + STC_DOMAIN + '/';
    }
}
var gnDomainLen = gsDomainURL.length;
tnPosWWW = gsDomainName.indexOf ("www."); 
if (tnPosWWW > -1)
{
    gsDomainName = gsDomainName.substring(tnPosWWW + 4, 9999);
}

// CONVERT TO LOWERCASE TO FUNCTION
STC_COMMAND = STC_COMMAND.toLowerCase();

var MONArray = new initArray ("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");   

String.prototype.tld = function()
{
	return (m = this.match(new RegExp("\.([a-z,A-Z]{2,6})$") )) ? m[1] : false;
}

NS6 = (document.getElementById && !document.all)
IE = (document.all)
NS = (navigator.appName == "Netscape" && navigator.appVersion.charAt(0) == "4")

tempBar = '';
barBuilt = 0;
gasItems = new Array();
moving = setTimeout('null',1)
    
///////////////////////////////////////////////////////////////////////////////
// FINISH: VARIABLES
///////////////////////////////////////////////////////////////////////////////

checkBrowser();

document.write ('<TITLE>' + LOC_SHORT_NAME + '</TITLE>'); 

// ASSUME COOKIES ARE ENABLED, BUT IF NOT, SET FLAG FOR ALL COOKIE-RELATED FUNCTIONS
if (navigator.cookieEnabled == 0) 
{
    gbCookiesOn = "F";
}
if ((STC_STYLE == null) || (STC_STYLE == ""))
{
    gsStyleSheet = gsDomainURL + '/include/style.css';
    gsStyleSheet = LOC_HOME_URL + '/include/style.css';
}
else
{
    gsStyleSheet = STC_STYLE;
}
document.write ('<link rel="stylesheet" href="' + gsStyleSheet + '" type="text/css">');

gbAdminMode = STC_getCookie("Admin");
if (gbAdminMode == "F")
{
    document.write ('<table Border=3 BgColor=Red CellPadding=3 CellSpacing=0>');
    document.write ('<tr>');
    document.write ('<TH Align=Center>');
    document.write ('gbAdminMode='+gbAdminMode);
    document.write ('</TH>');
    document.write ('</tr>');
    document.write ('</table>');
}

if ((LOC_ICON_LOGO == null) || (LOC_ICON_LOGO == ""))
{
    // STANDARD ICON NAME
    gsIcon = "favicon.ico";
}
else
{
    // LOCALLY DEFINED ICON PATH & NAME (config.js)
    gsIcon = LOC_ICON_LOGO;
}
//document.write ('<LINK Rel="shortcut icon" href="' + gsDomainURL + "/" + gsIcon + '">');
document.write ('<link rel="shortcut icon" href="' + LOC_HOME_URL + "/" + gsIcon + '">');

gsCurrentDoc = document.location.href.toLowerCase ();
gnLenDoc = gsCurrentDoc.length;
if (gsCurrentDoc.substr(gnLenDoc-1, 1) == "/")
{
    gsCurrentDoc = gsCurrentDoc.substr(0, gnLenDoc - 1);
}
tsCurrentPath = gsCurrentDoc.substring(gnDomainLen, 9999) + "/";
tnCurrentPos = tsCurrentPath.indexOf ("/");
gsCurrentPath = tsCurrentPath.substr(0,tnCurrentPos+1);

// TEST IF CURRENT PAGE IS SAME AS DOMAIN (MEANING HOME PAGE) OR...
// IF CURRENT PAGE IS STANDARD HOME PAGE (index.html). 
// THIS WORKS WITH OR WITHOUT "www"
//if ((gsCurrentDoc == gsDomainURL) || (gsCurrentDoc == gsDomainURL + "index.html"))
if ((gsCurrentDoc == gsDomainURL) || (gsCurrentDoc == gsDomainURL + gsCurrentPath + LOC_HOME_PAGE))
{
    gbCurrentHome = "T";
}

gnLenDoc = gsCurrentDoc.length;

gsTLD = window.location.hostname.tld();

gnPosTLD = gsCurrentDoc.indexOf (gsTLD);
gnDocCurrentPos = gsCurrentDoc.indexOf (gsTLD) + 3;

gnPosDoc = gnLenDoc - gnDocCurrentPos;

gsCurrentName = gsCurrentDoc.substr (gnDocCurrentPos, gnPosDoc);
gnDocHostPos = gsCurrentDoc.indexOf ("://www.");
gnDocNamePos = gnDocHostPos + 11;
if (gnDocHostPos > -1)
{
    gnDocHostPos = gsCurrentDoc.indexOf ("://");
    gnDocNamePos = gnDocHostPos + 7;
}

gsDOM = gsCurrentDoc.substr (gnDocNamePos, gnLenDoc - (gnLenDoc - gnPosTLD) - 12);

if (gbDebugMode == "T")
{
    dispDebug();
}

gasDocumentName[gnDocuments] = gsDefaultName + '/news.html';
gasDocumentTitle[gnDocuments] = 'News';
gnDocuments++;

gasDocumentName[gnDocuments] = gsDefaultName + '/scripts/calpage.php';
gasDocumentTitle[gnDocuments] = 'Calendar';
gnDocuments++;

gasDocumentName[gnDocuments] = gsDefaultName + '/gallery';
gasDocumentTitle[gnDocuments] = 'Photos';
gnDocuments++;

gasDocumentName[gnDocuments] = gsDefaultName + '/rules.html';
gasDocumentTitle[gnDocuments] = 'Rules';
gnDocuments++;

gasDocumentName[gnDocuments] = gsDefaultName + '/members.html';
gasDocumentTitle[gnDocuments] = 'Membership' ;
gnDocuments++;

//document.write ('<LINK Rel=stylesheet HREF="' + gsDomainURL + 'include/style.css" type="text/css">');

gsCSSBrow = "def";
if (BrowserDetect.browser == "Firefox")
{
    gsCSSBrow = "mo";
    gsCSSVers = BrowserDetect.version.toString();
    gsCSSVers = gsCSSVers.substring(0,1);
}
else
{
    if (BrowserDetect.browser == "Explorer")
    {
	gsCSSBrow = "ie";
	gsCSSVers = BrowserDetect.version;
    }
}
//document.write ('<LINK Rel=stylesheet HREF="' + gsDomainURL + 'include/site-' + gsCSSBrow + gsCSSVers + '.css" type="text/css">');
document.write ('<link rel="stylesheet" href="' + LOC_HOME_URL + '/include/site-' + gsCSSBrow + gsCSSVers + '.css" type="text/css">');

if (gsCurrentName == '/')
{
    gsCurrentName = '/';
}
gnDocCurrentLength = gsCurrentName.length;
gsCurrentPage = gsCurrentName.substring(1, gnDocCurrentLength);
gsCurrentTitle = document.title + '(' + gsCurrentPage + ')';

var agt=navigator.userAgent.toLowerCase();
this.major = parseInt(navigator.appVersion);
this.minor = parseFloat(navigator.appVersion);

this.ie = (agt.indexOf("msie") != -1);
this.ie3 = (this.ie && (this.major < 4));

this.nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1))

this.nav4 = (this.nav && (this.major == 4));

var DOWArray = new initArray ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");   
var MOYArray = new initArray ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");   

var hours = gsDateModified.getHours ();
var minutes = gsDateModified.getMinutes ();
var seconds = gsDateModified.getSeconds ();
var timeValue = "" + ((hours > 12) ? hours - 12 : hours);

var currname = document.location.pathname.toLowerCase ();

timeValue += ((minutes < 10) ? ":0" : ":") + minutes;
timeValue += (hours >= 12) ? " p.m." : " a.m.";

function dispHeader()
{
    if (LOC_BG_BANNER != "")
    {
	document.write ('<div id="divBanner" style="background-color: ' + LOC_BG_BANNER + '; border: 0px solid yellow;">');
    }
    document.write ('<table class=tiny border="0" width="100%" cellpadding=10 cellspacing=0>');
    document.write ('<tr>');

    document.write ('<td width=35% align=left valign=middle class=spnBannerLarge style="color: ' + LOC_FG_BANNER + ';">');
    document.write (LOC_SHORT_NAME);
    document.write ('</td>');

    // DATA CELL 1,2
    document.write ('<td width="30%" Align="Center" VALIGN="middle" class=spnBannerLarge Style="color: ' + LOC_FG_BANNER + ';">');
    if (LOC_LARGE_LOGO != "")
    {
	document.write ('<img align="bottom" align="left" border=0 src="' + LOC_HOME_URL + LOC_LARGE_LOGO + '" width=100 Title="' + LOC_SHORT_NAME + ' Banner" alt="Small ' + LOC_SHORT_NAME + ' Banner" />');
    }
    else
    {
	document.write ('&nbsp;');
    }
    document.write ('</td>');

    if (LOC_UPDATE_TM != "")
    {
	// DATA CELL 1,3
	document.write ('<td width=30% Align=Right VALIGN=middle class=spnBannerSmall Style="color: ' + LOC_FG_BANNER + ';">');
	document.write ('Updated: ');   
	sDay = DOWArray[(gsDateModified.getDay()+1)];
	sMonth = MOYArray[(gsDateModified.getMonth()+1)];
	document.write (sDay.substring(0, 3) + ', ');
	document.write (sMonth.substring(0, 3) + ' ');
	document.write (gsDateModified.getDate (), ', '); 
	if (navigator.appName == ("Netscape"))
	{
	    document.write (gsDateModified.getYear () + 1900);
	}
	else
	{
	    document.write (gsDateModified.getYear ());
	}
 
	document.write (', ', timeValue);
    }
    if ((LOC_UPDATE_TM != "") && (LOC_CREATE_TM != ""))
    {
	document.write ('<br />');
    }

    if (LOC_CREATE_TM != "")
    {
	document.write ('Created:&nbsp;' + LOC_CREATE_TM);
    }
    else
    {
	document.write ('&nbsp;');
    }
 
    document.write ('</td>');

    // DATA CELL 1,3
    document.write ('<td width=5% Align=Center vAlign=Middle class=spnBannerSmall Style="color: ' + LOC_FG_BANNER + ';">');
    doc_name = document.location.pathname.toLowerCase ();
    if (gbCurrentHome == "T")
    {
	document.write ('<a class="spnBannerSmall" href="' + LOC_HOME_URL + '/admin" style="cursor: default;"><img align="bottom" align="left" border="0" src="' + LOC_HOME_URL + LOC_SMALL_LOGO + '" width="50"></a>');
//	document.write ('<img align="bottom" align="left" border="0" src="' + LOC_HOME_URL + LOC_SMALL_LOGO + '" width="50" title="' + LOC_SHORT_NAME + ' Logo" alt="Small ' + LOC_SHORT_NAME + ' Logo">');
    }
    else
    {
	document.write ('<a class="spnBannerSmall" href="' + LOC_HOME_URL + '/' + LOC_HOME_PAGE + '" onmouseover="linkPopIn(\'Return to<br />' + LOC_SHORT_NAME + ' Home Page\', \'\');" onmouseout="linkPopOff();"><img align="bottom" align="left" border="0" src="' + LOC_HOME_URL + LOC_SMALL_LOGO + '" width="50" title="' + LOC_SHORT_NAME + '" alt="Small ' + LOC_SHORT_NAME + ' Logo"><br />Home</a>');
    }

    document.write ('</td>');
    document.write ('</tr>');
    document.write ('</table>');

    if (LOC_BG_BANNER != "")
    {
	document.write ('</div> <!-- divBanner -->');
    }
    if (LOC_BG_COLOR == LOC_BG_HEADER)
    {
//	document.write ('<HR id=linHead>');
    }
    for (i = 0; i < LOC_HR_HEADER; i++)
    {
//	document.write ('<HR id=linHead>');
    }
    if (gsCurrentPath.indexOf ("test") == -1)
    {
	 //MenuBar();
    }
}

dispHeader();

function initBody()
{
    document.write ('<div id="divPop"></div>');

    document.write ('<div id="divBody" style="border: 10px solid red; margin: 0 0 0 0; '); 

    if (LOC_BG_COLOR != "")
    {
	document.write ('background-color: ' + LOC_BG_COLOR + ';');
    }

    if (LOC_PG_BORDER != "")
    {
	document.write (LOC_PG_BORDER);
    }

    if ((LOC_BG_IMAGE != "") && (gbCurrentHome == "T"))
    {
	document.write ('background-image: url(' + LOC_BG_IMAGE + ');');
    }

    document.write ('">');

    if (ns4)
    {
	gsPopStyle = document.divPop
    }
    else if (ns6)
    {
	gsPopStyle = document.getElementById("divPop").style
    }
    else if (ie4)
    {
	gsPopStyle = document.all.divPop.style
    }

    if (ns4)
    {
	document.captureEvents(Event.MOUSEMOVE);
    }
    else
    {
	gsPopStyle.visibility = "visible"
	gsPopStyle.display = "none"
    }

    document.onmousemove = get_mouse;

}

function dispFooter()
{
    document.write ('</div> <!-- divBody -->');
    document.write ('<div id="divFooter" style="background-color: ' + LOC_BG_FOOTER + ';">');
    if (LOC_HR_FOOTER != 0)
    {
	document.write ('<HR id=linFoot size=' + LOC_HR_FOOTER + '>');
    }

    document.write ('<TABLE id=tblFooter class=tiny bgcolor=' + LOC_BG_FOOTER + ' class=FootLinkBold style="color: ' + LOC_FG_FOOTER + ';" border=0 width="100%" cellpadding=5 cellspacing=0>');
    document.write ('<TR id=tr1Footer>');

    ////////////////////////////////////////////////////////////////////////
    // LT: WEB SERVICE
    document.write ('<TD id=td1Footer width=35% align="left" valign="middle">');
    document.write ('Web <A href="/scripts/partners.php" style="text-decoration: none; color: ' + LOC_FG_FOOTER + '; cursor: text;">Services</A> provided by: <A href="http://www.stcllp.com" target="_blank" title="Internet, Web and E-mail Services by STC Network Systems" style="color: ' + LOC_FG_FOOTER + '; text-decoration: none; cursor: pointer;"> <IMG src="/images/stc.gif" border="0" align="middle" align="right" title="Internet, Web and E-mail Services by STC Network Systems" alt="[STC Star Logo]"><SPAN style="text-decoration: underline;">STC Systems</SPAN></A>');
    document.write ('</TD> <!-- td1Footer -->');
    
    ////////////////////////////////////////////////////////////////////////
    // CT: BUTTONS
    document.write ('<TD id=td2Footer width=30% align="center" valign="middle">');
    if (gbCurrentHome == "F")
    {
	document.write ('<FORM name=frmFoot>');
	document.write ('<BR>');
	document.write ('<INPUT type="Button" name="btnHome" value="' + gsUP_ARROW + '&nbsp;Home" class=button2 onclick="document.location.href=\'' + LOC_HOME_URL + '\';">');
    }
    else
    {
	// IF NO ALTERNATE CODE FOR HOME BUTTON, DISPLAY SPACE
	if ((LOC_HOME_ALT == null) || (LOC_HOME_ALT == ""))
	{
	    document.write ('&nbsp;');
	}
	else
	{
	    document.write (LOC_HOME_ALT);
	}
    }

    document.write ('&nbsp;');
    document.write ('&nbsp;');
    
    // IF NOT ON THE HOME PAGE, DISPLAY BACK BUTTON
    if (gbCurrentHome == "F")
    {
	document.write ('<INPUT type="Button" name="btnBack" value="' + gsLT_ARROW + '&nbsp;Back" class=button2 onclick="history.go(-1);">');
	document.write ('</FORM>');
    }
    else
    {
	// IF NO ALTERNATE CODE FOR BACK BUTTON, DISPLAY SPACE
	if ((LOC_BACK_ALT == null) || (LOC_BACK_ALT == ""))
	{
	    document.write ('&nbsp;');
	}
	else
	{
	    document.write (LOC_BACK_ALT);
	}
    }
    document.write ('</TD> <!-- td2Footer -->');

    ////////////////////////////////////////////////////////////////////////
    // RT: COPYRIGHT NOTICE
    document.write ('<TD id=td3Footer width=35% align="right" valign="middle">');
    tsToday = new Date();
    tsYear = tsToday.getFullYear();
    if (LOC_COPY_YEAR == tsYear)
    {
	document.write ('Copyright &copy; ' + LOC_COPY_YEAR + '&nbsp;' + LOC_LONG_NAME);
    }
    else
    {
	document.write ('Copyright &copy; ' + LOC_COPY_YEAR + '-' + tsYear + '&nbsp;' + LOC_LONG_NAME);
    }
    if (LOC_FOOT_LOGO != "")
    {
	if (gbCurrentHome == "F")
	{
	    document.write ('<A href="' + LOC_HOME_URL + '"><IMG src="' + LOC_FOOT_LOGO + '" width=20 height=20 border=0"></A>');
	}
	else
	{
	    document.write ('<IMG src="' + LOC_FOOT_LOGO + '" width=20 height=20 border=0">');
	}
    }
    document.write ('<A href="email.html"><IMG src="/images/mail_lst.gif" width=1 height=1 border=0 alt="e-mail"></A>');
    document.write ('<A href="members.html"><IMG src="/images/mail_lst.gif" width=1 height=1 border=0 alt="e-mail"></A>');
    document.write ('</TD> <!-- td3Footer -->');

    document.write ('</TR> <!-- tr1Footer -->');

    document.write ('</TABLE> <!-- tblFooter -->');
    document.write ('</div> <!-- divFooter -->');
}

function dispFooterold()
{
    document.write ('<br />');
    document.write ('<div id="divFooter" style="border: 0px solid yellow; clear: both; position: relative;">');

//    if (LOC_BG_COLOR == LOC_BG_FOOTER)
//    {
//	document.write ('<HR id=linFoot>');
//    }
//    for (i = 0; i < LOC_HR_FOOTER; i++)
    if (LOC_HR_FOOTER > 0)
    {
	document.write ('<hr id="linFoot" />');
    }
    document.write ('<table class=tiny BgColor=' + LOC_BG_FOOTER + ' Class=FootLinkBold Style="color: ' + LOC_FG_FOOTER + ';" Border=0 width="100%" CellPadding=5 CellSpacing=0>');
    document.write ('<tr>');

    ////////////////////////////////////////////////////////////////////////
    // LT: WEB SERVICE
    document.write ('<td width=35% Align="left" vAlign="middle">');
    document.write ('<a href="' + LOC_HOME_URL + '/scripts/partners.php" style="text-decoration: none; cursor: default; color: #FFFFFF;">Web Services Provided by</a>: <a href="http://www.stcllp.com" Target="_blank" Title="Internet, Web and E-mail Services by STC Network Systems" Style="color: ' + LOC_FG_FOOTER + '; text-decoration: none; cursor: pointer;"> <img src="' + LOC_HOME_URL + '/images/stc.gif" Border="0" Align="Middle" Align="Right" Title="Internet, Web and E-mail Services by STC Network Systems" Alt="[STC Star Logo]" />STC Systems</a>');
    document.write ('</td>');
    
    ////////////////////////////////////////////////////////////////////////
    // CT: BUTTONS
    document.write ('<td width=30% Align="center" vAlign="middle">');
    if (gbCurrentHome == "F")
    {
	document.write ('<form name=frmFoot>');
	document.write ('<br />');
	document.write ('<input type="Button" name="btnHome" value="' + gsUP_ARROW + '&nbsp;Home" class=button2 onClick="document.location.href=\'' + LOC_HOME_URL + '\';">');
    }
    else
    {
	// IF NO ALTERNATE CODE FOR HOME BUTTON, DISPLAY SPACE
	if ((LOC_HOME_ALT == null) || (LOC_HOME_ALT == ""))
	{
	    document.write ('&nbsp;');
	}
	else
	{
	    document.write (LOC_HOME_ALT);
	}
    }

    document.write ('&nbsp;');
    document.write ('&nbsp;');
    
    // IF NOT ON THE HOME PAGE, DISPLAY BACK BUTTON
    if (gbCurrentHome == "F")
    {
	document.write ('<input type="Button" name="btnBack" value="' + gsLT_ARROW + '&nbsp;Back" class=button2 onClick="history.go(-1);">');
	document.write ('</form>');
    }
    else
    {
	// IF NO ALTERNATE CODE FOR BACK BUTTON, DISPLAY SPACE
	if ((LOC_BACK_ALT == null) || (LOC_BACK_ALT == ""))
	{
	    document.write ('&nbsp;');
	}
	else
	{
	    document.write (LOC_BACK_ALT);
	}
    }
    document.write ('</td>');

    ////////////////////////////////////////////////////////////////////////
    // RT: COPYRIGHT NOTICE
    document.write ('<td width=35% ALIGN="right" VALIGN="middle">');
    tsToday = new Date();
    tsYear = tsToday.getFullYear();
    document.write ('Copyright &copy; ' + LOC_COPY_YEAR + '-' + tsYear + '&nbsp;' + LOC_LONG_NAME);
    if (LOC_FOOT_LOGO != "")
    {
	if (gbCurrentHome == "F")
	{
	    document.write ('<a href="' + LOC_HOME_URL + '"><img src="' + LOC_HOME_URL + LOC_FOOT_LOGO + '" width=20 Height=20 Border=0" /></a>');
	}
	else
	{
	    document.write ('<img src="' + LOC_HOME_URL + LOC_FOOT_LOGO + '" width=20 Height=20 Border=0" />');
	}
    }
    document.write ('<a href="email.html"><img src="' + LOC_HOME_URL + '/images/mail_lst.gif" width=1 Height=1 Border=0 Alt="e-mail" /></a>');
    document.write ('<a href="maillist.html"><img src="' + LOC_HOME_URL + '/images/mail_lst.gif" width=1 Height=1 Border=0 Alt="e-mail" /></a>');
    document.write ('</td>');

    document.write ('</tr>');

    document.write ('</table>');

    document.write ('</div> <!-- divFooter -->');

}

// { BEG: COOKIE/ANNOUNCEMENT

gsAnnExpires.setTime(gsAnnExpires.getTime() + (gnAnnDays*24*60*60*1000));

checkCount();

if (gbAnnounceOk == "T")
{
    document.write ('<script src="' + LOC_HOME_URL + '/scripts/stc_ann.js"></script>');
}
else
{
//    if (gnAnnounceLines > 0)
    {
	document.write ('<table name=tblAnn border=0 width=100%>');
	document.write ('<tr>');
	document.write ('<td Align=Right>');
	document.write ('<img border="1" src="' + LOC_HOME_URL + '/images/megaphone_on.jpg" width=50 onmouseover="linkPopIn(\'Turn<br />Announcement<br />On\', \'\');" onmouseout="linkPopOff();" onclick="toggleLimit();" style="cursor: pointer;" />');
	document.write ('</td>');
	document.write ('</tr>');
	document.write ('</table> <!-- tblAnn -->');
    }
}

// } END: COOKIE/ANNOUNCEMENT

///////////////////////////////////////////////////////////////////////////////
// START: FUNCTIONS
///////////////////////////////////////////////////////////////////////////////

// MENU BAR
function MenuBar()
{
    var i;

    // CHECK EACH DOCUMENT NAME IN LIST
    for (i = 1; i < gnDocuments; i++)
    {
	// CHECK IF CURRENT PAGE CONTAINS DOCUMENT #[i]	
	if (gsCurrentName.indexOf (gasDocumentName[i]) > -1)
	{
		document.write ('<td class="MenuCurr" align="center" valign="middle">');
		// IF CURRENT DOCUMENT IS THIS DOCUMENT # IN LIST, USE BOLD TITLE
		document.write ('<B>', gasDocumentTitle[i], '</B>');
	}
	else
	{
	    document.write ('<td class="MenuLink" Align="center" vAlign="middle">');
	    // IF CURRENT DOCUMENT IS NOT THIS DOCUMENT # IN LIST, PRINT AS LINK
	    document.write ('<a class="MenuLink" href="/', gasDocumentName[i],'">', gasDocumentTitle[i], '</a>');
	}
	document.write ('</td>');
    }
}

function dispDebug()
{
    document.write ('<table Border=3 BgColor=Yellow CellPadding=3 CellSpacing=0>');

    document.write ('<tr>');
    document.write ('<TH Align=Center ColSpan=2>');
    document.write ('DEBUG - Document Info');
    document.write ('</TH>');
    document.write ('</tr>');

    document.write ('<tr>');
    document.write ('<td>');
    document.write ('gsDomainURL');
    document.write ('</td>');
    document.write ('<td>');
    document.write (gsDomainURL);
    document.write ('</td>');
    document.write ('</tr>');

    document.write ('<tr>');
    document.write ('<td>');
    document.write ('gsDomainName');
    document.write ('</td>');
    document.write ('<td>');
    document.write (gsDomainName);
    document.write ('</td>');
    document.write ('</tr>');

    document.write ('<tr>');
    document.write ('<td>');
    document.write ('gnDomainLen');
    document.write ('</td>');
    document.write ('<td>');
    document.write (gnDomainLen);
    document.write ('</td>');
    document.write ('</tr>');

    document.write ('<tr>');
    document.write ('<td>');
    document.write ('gsDOM');
    document.write ('</td>');
    document.write ('<td>');
    document.write (gsDOM + ' (' + gnDocNamePos + ')');
    document.write ('</td>');
    document.write ('</tr>');

    document.write ('<tr>');
    document.write ('<td>');
    document.write ('gsTLD');
    document.write ('</td>');
    document.write ('<td>');
    document.write (gsTLD);
    document.write ('</td>');
    document.write ('</tr>');

    document.write ('<tr>');
    document.write ('<td>');
    document.write (' LOC_HOME_URL ');
    document.write ('</td>');
    document.write ('<td>');
    document.write ( LOC_HOME_URL );
    document.write ('</td>');
    document.write ('</tr>');

    document.write ('<tr>');
    document.write ('<td>');
    document.write ('gsStyleSheet');
    document.write ('</td>');
    document.write ('<td>');
    document.write (gsStyleSheet);
    document.write ('</td>');
    document.write ('</tr>');

    document.write ('<tr>');
    document.write ('<td>');
    document.write ('location.host');
    document.write ('</td>');
    document.write ('<td>');
    document.write (location.host);
    document.write ('</td>');
    document.write ('</tr>');

    document.write ('<tr>');
    document.write ('<td>');
    document.write ('gsCurrentPath');
    document.write ('</td>');
    document.write ('<td>');
    document.write (gsCurrentPath);
    document.write ('</td>');
    document.write ('</tr>');

    document.write ('<tr>');
    document.write ('<td>');
    document.write ('tsCurrentPath');
    document.write ('</td>');
    document.write ('<td>');
    document.write (tsCurrentPath);
    document.write ('</td>');
    document.write ('</tr>');

    document.write ('<tr>');
    document.write ('<td>');
    document.write ('gsCurrentDoc');
    document.write ('</td>');
    document.write ('<td>');
    document.write (gsCurrentDoc);
    document.write ('</td>');
    document.write ('</tr>');

    document.write ('<tr>');
    document.write ('<td>');
    document.write ('gnLenDoc');
    document.write ('</td>');
    document.write ('<td>');
    document.write (gnLenDoc);
    document.write ('</td>');
    document.write ('</tr>');

    document.write ('<tr>');
    document.write ('<td>');
    document.write ('gnDocCurrentPos');
    document.write ('</td>');
    document.write ('<td>');
    document.write (gnDocCurrentPos);
    document.write ('</td>');
    document.write ('</tr>');

    document.write ('<tr>');
    document.write ('<td>');
    document.write ('gnPosDoc');
    document.write ('</td>');
    document.write ('<td>');
    document.write (gnPosDoc);
    document.write ('</td>');
    document.write ('</tr>');

    document.write ('<tr>');
    document.write ('<td>');
    document.write ('gsCurrentName');
    document.write ('</td>');
    document.write ('<td>');
    document.write (gsCurrentName);
    document.write ('</td>');
    document.write ('</tr>');

    document.write ('<tr>');
    document.write ('<td>');
    document.write ('gsCurrentPath');
    document.write ('</td>');
    document.write ('<td>');
    document.write (gsCurrentPath);
    document.write ('</td>');
    document.write ('</tr>');

    document.write ('<tr>');
    document.write ('<td>');
    document.write ('gsDomainURL');
    document.write ('</td>');
    document.write ('<td>');
    document.write (gsDomainURL);
    document.write ('</td>');
    document.write ('</tr>');

    document.write ('<tr>');
    document.write ('<td>');
    document.write ('gbCurrentHome');
    document.write ('</td>');
    document.write ('<td>');
    document.write (gbCurrentHome);
    document.write ('</td>');
    document.write ('</tr>');

    document.write ('<tr>');
    document.write ('<td>');
    document.write ('gsCurrentPath');
    document.write ('</td>');
    document.write ('<td>');
    document.write (gsCurrentPath);
    document.write ('</td>');
    document.write ('</tr>');

    document.write ('<tr>');
    document.write ('<td>');
    document.write ('gsCurrentDoc');
    document.write ('</td>');
    document.write ('<td>');
    document.write (gsCurrentDoc);
    document.write ('</td>');
    document.write ('</tr>');

    document.write ('<tr>');
    document.write ('<td>');
    document.write ('gsDomainURL + gsCurrentPath');
    document.write ('</td>');
    document.write ('<td>');
    document.write (gsDomainURL + gsCurrentPath);
    document.write ('</td>');
    document.write ('</tr>');

    document.write ('<tr>');
    document.write ('<td>');
    document.write ('gsDomainURL + gsCurrentPath + LOC_HOME_PAGE');
    document.write ('</td>');
    document.write ('<td>');
    document.write (gsDomainURL + gsCurrentPath + LOC_HOME_PAGE);
    document.write ('</td>');
    document.write ('</tr>');

    document.write ('<tr>');
    document.write ('<td>');
    document.write ('gbAnnounceOk');
    document.write ('</td>');
    document.write ('<td>');
    document.write (gbAnnounceOk);
    document.write ('</td>');
    document.write ('</tr>');

    document.write ('<tr>');
    document.write ('<td>');
    document.write ('gnAnnLimit');
    document.write ('</td>');
    document.write ('<td>');
    document.write (gnAnnLimit);
    document.write ('</td>');
    document.write ('</tr>');

    document.write ('<tr>');
    document.write ('<td>');
    document.write ('gnAnnDays');
    document.write ('</td>');
    document.write ('<td>');
    document.write (gnAnnDays);
    document.write ('</td>');
    document.write ('</tr>');

    document.write ('<tr>');
    document.write ('<td>');
    document.write ('gnAnnounceLines');
    document.write ('</td>');
    document.write ('<td>');
    document.write (gnAnnounceLines);
    document.write ('</td>');
    document.write ('</tr>');

    document.write ('</table>');
}

// INITIALIZE ARRAY
function initArray() 
{  
    this.length = initArray.arguments.length;

    for (var i = 0; i < this.length; i++)      
    {
	this[i+1] = initArray.arguments[i];
    }
}   

// REQUIRED JAVASCRIPT FUNCTION TO CREATE ARRAYS/LISTS
function createDocList(n, init)
{
    this.size = n;

    for (i = 1; i <= n; i++)
    {
	    this[i] = init;
    }

    return this;
}

function checkBrowser()
{    
    if (gsBrowserName.indexOf("Internet Explorer")!=-1)
    {
	if (gnBrowserVers >= 4)
	{
	    gbJavaEnabled = navigator.javaEnabled();
	}
	gbExplorer = true;
    }
    if (gsBrowserName.indexOf("Netscape") != -1)
    {
	if (gnBrowserVers >= 4)
	{
	    gbJavaEnabled = navigator.javaEnabled();
	}
    }

    if(aname.indexOf("Internet Explorer")!=-1)
    {
	if(aver >= 4)
	{
	    gbJavaEnabled=navigator.javaEnabled();
	}
	mie = true;
    }
    if(aname.indexOf("Netscape") != -1)
    {
	if(aver >= 4)
	{
	    gbJavaEnabled = navigator.javaEnabled();
	}
    }
}

function loadFile(fsFile)
{
  document.write('<script type="text/javascript" src="'
    + fsFile + '"></SCR' + 'IPT>'); 
}

function HostAnnounce()
{
    var i = 0;

    if ((gsDateBeg == "Invalid Date") || (gsDateBeg == "Invalid Date"))
    {
	return
    }

    if (navigator.appName == ("Netscape"))
    {
	gnYearCur = gsDateCur.getYear() + 1900;
	gnYearEnd = gsDateEnd.getYear() + 1900;
	gnYearBeg = gsDateBeg.getYear() + 1900;
    }
    else
    {
	gnYearCur = gsDateCur.getYear();
	gnYearEnd = gsDateEnd.getYear();
	gnYearBeg = gsDateBeg.getYear();
    }

    gasDateCur = MONArray[(gsDateCur.getMonth()+1)] + ' ' + gsDateCur.getDate () + ', ' + gnYearCur;

    gasDateEnd = MONArray[(gsDateEnd.getMonth()+1)] + ' ' + gsDateEnd.getDate () + ', ' + gnYearEnd;
    gasDateBeg = MONArray[(gsDateBeg.getMonth()+1)] + ' ' + gsDateBeg.getDate () + ', ' + gnYearBeg;

    gnDateBeg = Date.parse (gasDateBeg);
    gnDateEnd = Date.parse (gasDateEnd);
    gnDateCur = Date.parse (gasDateCur);

    if (gnDateBeg > gnDateCur)
    {
	return
    }

    if (gnDateEnd < gnDateCur)
    {
	return
    }

    document.write ('<br />');
    document.write ('<CENTER>');
    document.write ('<table border=0 width=500><tr><td align=center><img src="' + LOC_HOME_URL + '/images/nail.gif" /></td></tr></table>');
    // OUTER TABLE
    document.write ('<table border=5 cellspacing=0 width=480 bgcolor="white"><tr><td align="center">');

    // INNER TABLE

    document.write ('<table border=0 bgcolor="#FFFFFF" width=475>');

    for (i = 0; i < gnAnnounceLines; i++)
    {
	document.write ('<tr><td Align="Center" class="', gasAnnounceStyle[i], '">');
	document.write (gasAnnounceLine[i]);
	document.write ('</td></tr>');
    }
    document.write ('<tr>');
    document.write ('<td Align=Center>');
    document.write ('<img border="1" src="' + LOC_HOME_URL + '/images/megaphone_off.jpg" width=50 onMouseOver="linkPopIn(\'Turn<br />Announcement<br />Off\', \'\');" onMouseOut="linkPopOff();" onClick="toggleLimit();" />');

    document.write ('</td>');
    document.write ('</tr>');

    document.write ('</table>');
    document.write ('</td>');

    document.write ('</tr>');
    document.write ('</table>');
    document.write ('</CENTER>');

    document.write ('<CENTER><FONT color=#C0C0C0 size=-2>');
    document.write ('Announcement Valid ', gasDateBeg, ' through ', gasDateEnd);
    document.write ('</CENTER></FONT><br />');
}

function GetCookie(fsName) 
{
  var arg = fsName + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) 
  {
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg)
    return getCookieVal (j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break;
  }
  return null;
}

function SetCookie(fsName,fsValue) 
{
  var argv = SetCookie.arguments;
  var argc = SetCookie.arguments.length;
  var expires = (argc > 2) ? argv[2] : null;
  var path = (argc > 3) ? argv[3] : null;
  var domain = (argc > 4) ? argv[4] : null;
  var secure = (argc > 5) ? argv[5] : false;

  document.cookie = fsName + "=" + escape (fsValue) +
    ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
    ((path == null) ? "" : ("; path=" + path)) +
    ((domain == null) ? "" : ("; domain=" + domain)) +
    ((secure == true) ? "; secure" : "");
}

function DelCookie(fsName) 
{
  var gsAnnExpires = new Date();
  gsAnnExpires.setTime (gsAnnExpires.getTime() - 1);
  var cval = GetCookie (fsName);
  document.cookie = fsName + "=" + cval + "; expires=" + gsAnnExpires.toGMTString();
}

function getCookieVal(offset) 
{
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
  endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}

function toggleLimit() 
{
    var tnLimit = STC_getCookie('AnnLimit');
    if (tnLimit == 999)
    {
	tnLimit = 1;
    }
    else
    {
	tnLimit = 999;
    }
    STC_setCookie('AnnLimit', tnLimit, gsAnnExpires);
    location.reload(true);
}

function checkCount() 
{
    var tnCount = STC_getCookie('AnnCount');
    var tnLimit = STC_getCookie('AnnLimit');

    if (gbDebugMode == "T")
    {
	document.write ('<table Border=3 BgColor=Pink CellPadding=3 CellSpacing=0>');
	document.write ('<tr>');
	document.write ('<TH Align=Center>');
	document.write ('DEBUG - Cookie Info');
	document.write ('</TH>');
	document.write ('</tr>');

	document.write ('<tr>');
	document.write ('<td>');
	document.write ('AnnCount=' + tnCount);
	document.write ('</td>');
	document.write ('</tr>');

	document.write ('<tr>');
	document.write ('<td>');
	document.write ('AnnLimit=' + tnLimit);
	document.write ('</td>');
	document.write ('</tr>');

	document.write ('<tr>');
	document.write ('<td>');
	document.write ('Lines=' + gnAnnounceLines);
	document.write ('</td>');
	document.write ('</tr>');

	document.write ('</table>');
    }

    if (tnLimit == null) 
    {
	tnLimit = gnAnnLimit;
	STC_setCookie('AnnLimit', gnAnnLimit, gsAnnExpires);
    }
    if (tnCount == null) 
    {
	tnCount = 1;
	STC_setCookie('AnnCount', tnCount, gsAnnExpires);
    } 
    else 
    {
	tnCount++;
	STC_setCookie('AnnCount', tnCount, gsAnnExpires);
	if (tnCount > tnLimit)
	{
	    gbAnnounceOk = "F";
	}
    }
}

function include(fsFileName) 
{
    var html_doc = document.getElementsByTagName('head').item(0);
    var js = document.createElement('script');
    js.setAttribute('language', 'javascript');
    js.setAttribute('type', 'text/javascript');
    js.setAttribute('src', fsFileName);
    html_doc.appendChild(js);
    return false;
}

///////////////////////////////////////////////////////////////////////////////
/* LIBRARY: stc_cookie.js */
///////////////////////////////////////////////////////////////////////////////

function STC_getCookie(sName) 
{
  var arg = sName + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) 
  {
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg)
    return STC_getCookieVal (j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break;
  }
  return null;
}

function STC_getCookieVal(nOffset) 
{
  var sEndstr = document.cookie.indexOf (";", nOffset);
  if (sEndstr == -1)
  sEndstr = document.cookie.length;
  return unescape(document.cookie.substring(nOffset, sEndstr));
}

function STC_setCookie(sName,sValue,nTime,sPath,sDomain,bSecure) 
{
    var argv = STC_setCookie.arguments;
    var argc = STC_setCookie.arguments.length;
    var expires = (argc > 2) ? argv[2] : null;
    var path = (argc > 3) ? argv[3] : null;
    var domain = (argc > 4) ? argv[4] : null;
    var secure = (argc > 5) ? argv[5] : false;

    var sDate = new Date();

    if (nTime != null)
    {
	// IF LESS THAN 1001, ASSUME DAYS
	if (nTime < 1001)
	{
	    sDate.setTime(sDate.getTime() + (nTime*24*60*60*1000));
	}
	// IF 1000 OR GREATER, ASSUME SECONDS SUBTRACTED FROM 1000
	if (nTime > 1000)
	{
	    nTime -= 1000;
	    sDate.setTime(sDate.getTime() + (nTime*1000));
	}
    }

    document.cookie = sName + "=" + escape (sValue) +
	((nTime == null) ? "" : ("; expires=" + sDate.toGMTString())) +
	((sPath == null) ? "" : ("; path=" + sPath)) +
	((sDomain == null) ? "" : ("; domain=" + sDomain)) +
	((bSecure == true) ? "; secure" : "");
}

function STC_delCookie(sName) 
{
  var gsAnnExpires = new Date();
  gsAnnExpires.setTime(gsAnnExpires.getTime() - 1);
  var cval = STC_getCookie(sName);
  document.cookie = sName + "=" + sName + "; expires=" + gsAnnExpires.toGMTString() + "; path=/";
}

///////////////////////////////////////////////////////////////////////////////
// FINISH: FUNCTIONS
///////////////////////////////////////////////////////////////////////////////

function OLD_dispHeader()
{
    if (this.ie3)
    {
	document.write ('<table Border=0 width="100%" cellpadding=3 cellspacing=0>');
	document.write ('<tr>');
	document.write ('<td width="700" ALIGN="right" VALIGN="middle">');
	document.write ('<FONT face="Verdana, Arial, Helvetica" Color="#000000" SIZE="-3">');

	document.write ('Internet Explorer (old): ', agt, ', ', this.major, ', ', this.minor);
	document.write ('</FONT>');
	document.write ('</td>');
	document.write ('</tr>');
	document.write ('</table>');
	document.write ('<HR SIZE="1" ALIGN="RIGHT" WIDTH="50%">');
    }
    else
    {

	timeValue += ((minutes < 10) ? ":0" : ":") + minutes;
	timeValue += (hours >= 12) ? " p.m." : " a.m.";
	document.write ('<table Border=1 width="100%" CellPadding="0" CellSpacing="0"><tr><td>');
	document.write ('<table Border=0 width="100%" CellPadding=3 CellSpacing=0>');

	// ROW 1
	document.write ('<tr>');

	// DATA CELL 1,1
	document.write ('<td width=30% Align=Left VAlign=Middle BgColor=' + LOC_BG_COLOR + '>');
	document.write ('<FONT Size=+1 Face="Verdana, Arial, Helvetica" Color=black>');
	document.write ('<B>' + LOC_SHORT_NAME + '</B>');
	document.write ('</FONT>');
	document.write ('</td>');

	// DATA CELL 1,2
	document.write ('<td width="30%" Align="Right" VALIGN="middle" BgColor="' + LOC_BG_COLOR + '">');
	document.write ('&nbsp;');
	document.write ('</td>');

	// DATA CELL 1,3
	document.write ('<td width=30% Align=Right VALIGN=middle BgColor=' + LOC_BG_COLOR + '>');
	document.write ('<FONT face="Verdana, Arial, Helvetica" Color=black SIZE=-3>');

	document.write ('Updated: ');   
	document.write (DOWArray[(gsDateModified.getDay()+1)], ', ');   
	document.write (MOYArray[(gsDateModified.getMonth()+1)], ' ');   
	document.write (gsDateModified.getDate (), ', '); 
	if (navigator.appName == ("Netscape"))
	{
	    document.write (gsDateModified.getYear () + 1900);
	}
	else
	{
	    document.write (gsDateModified.getYear ());
	}
 
	document.write (', ', timeValue);
	document.write ('</FONT>');
	document.write ('</td>');

	// DATA CELL 1,3
	document.write ('<td ALign=Right>');
	doc_name = document.location.pathname.toLowerCase ();
	if (gbCurrentHome == "T")
	{
	    document.write ('<img align="bottom" align="left" border="0" src="' + LOC_HOME_URL + '/images/logo-swpp.jpg" width=50 Title="SWPP Logo" Alt="SWPP Logo" />');
	}
	else
	{
	    document.write ('<a href="' + LOC_HOME_URL + '/' + LOC_HOME_PAGE + '" onMouseOver="linkPopIn(\'Return to<br />Home Page\', \'\');" onMouseOut="linkPopOff();" class=tiny Style="color: ' + LOC_FG_COLOR + ';"><img align="bottom" align="left" border="0" src="' + LOC_HOME_URL + '/images/logo-swpp.jpg" width=50 Title="Home Page" Alt="Home Page" /><br />&nbsp;Home</a>');
	}

	document.write ('</td>');
	document.write ('</tr>');
	document.write ('</table>');
	document.write ('</table>');

	document.write ('<CENTER>');

	// CREATE OUTER TABLE WITH A BORDER AND 1 DATA CELL CONTAINING THE INNER TABLE
	document.write ('<table Border=1 width="100%" CellPadding="0" CellSpacing="0"><tr><td>');

	// CREATE INNER TABLE
	document.write ('<CENTER><table Border=0 width="100%" CellPadding="3" CellSpacing="0"><tr>');

	if (gsCurrentPath.indexOf ("test") == -1)
	{
	     //MenuBar();
	}

	// CLOSE INNER TABLE
	document.write ('</td></table>');

	// CLOSE OUTER TABLE
	document.write ('</td></tr></table>');
	document.write ('</CENTER>');

	// CHECK EACH DOCUMENT NAME IN LIST -- ONLY INCLUDE ANNOUNCEMENT ON 
	// MAIN PAGES
	for (i = 1; i < gnDocuments; i++)
	{
	    // CHECK IF CURRENT PAGE CONTAINS DOCUMENT #[i]	
	    if (gsCurrentName.indexOf (gasDocumentName[i]) > -1)
	    {

	    }
	}
    }
}

function OLD_dispFooter()
{
    document.write ('<br />');

    if (LOC_BG_COLOR == LOC_BG_FOOTER)
    {
	document.write ('<HR Size=1 Align="Right" width=100%>');
    }
    document.write ('<table class=tiny BgColor=' + LOC_BG_FOOTER + ' Class=FootLinkBold Style="color: ' + LOC_FG_FOOTER + ';" Border=0 width="100%" CellPadding=5 CellSpacing=0>');
    document.write ('<tr>');

    ////////////////////////////////////////////////////////////////////////
    // LT: WEB SERVICE
    document.write ('<td width=35% Align="left" vAlign="middle">');
    document.write ('Web Services Provided by: <a href="http://www.stcllp.com" Target="_blank" Title="Internet, Web and E-mail Services by STC Network Systems" Style="color: ' + LOC_FG_FOOTER + '; text-decoration: underline; cursor: pointer;"> <img src="' + LOC_HOME_URL + '/images/stc.gif" Border="0" Align="Middle" Align="Right" Title="Internet, Web and E-mail Services by STC Network Systems" Alt="[STC Star Logo]" />STC Systems</a>');
    document.write ('</td>');
    
    ////////////////////////////////////////////////////////////////////////
    // CT: BUTTONS
    document.write ('<td width=30% Align="center" vAlign="middle">');
    if (gbCurrentHome == "F")
    {
	document.write ('<form name=frmFoot>');
	document.write ('<br />');
	document.write ('<input type="Button" name="btnHome" value="' + gsUP_ARROW + '&nbsp;Home" class=button2 onClick="document.location.href=\'' + LOC_HOME_URL + '\';">');
    }
    else
    {
	// IF NO ALTERNATE CODE FOR HOME BUTTON, DISPLAY SPACE
	if ((LOC_HOME_ALT == null) || (LOC_HOME_ALT == ""))
	{
	    document.write ('&nbsp;');
	}
	else
	{
	    document.write (LOC_HOME_ALT);
	}
    }

    document.write ('&nbsp;');
    document.write ('&nbsp;');
    
    // IF NOT ON THE HOME PAGE, DISPLAY BACK BUTTON
    if (gbCurrentHome == "F")
    {
	document.write ('<input type="Button" name="btnBack" value="' + gsLT_ARROW + '&nbsp;Back" class=button2 onClick="history.go(-1);">');
	document.write ('</form>');
    }
    else
    {
	// IF NO ALTERNATE CODE FOR BACK BUTTON, DISPLAY SPACE
	if ((LOC_BACK_ALT == null) || (LOC_BACK_ALT == ""))
	{
	    document.write ('&nbsp;');
	}
	else
	{
	    document.write (LOC_BACK_ALT);
	}
    }
    document.write ('</td>');

    ////////////////////////////////////////////////////////////////////////
    // RT: COPYRIGHT NOTICE
    document.write ('<td width=35% ALIGN="right" VALIGN="middle">');
    tsToday = new Date();
    tsYear = tsToday.getFullYear();
    if (LOC_COPY_YEAR == tsYear)
    {
	document.write ('Copyright &copy; ' + LOC_COPY_YEAR + '&nbsp;' + LOC_LONG_NAME);
    }
    else
    {
	document.write ('Copyright &copy; ' + LOC_COPY_YEAR + '-' + tsYear + '&nbsp;' + LOC_LONG_NAME);
    }
    if (LOC_FOOT_LOGO != "")
    {
	if (gbCurrentHome == "F")
	{
	    document.write ('<a href="' + LOC_HOME_URL + '"><img src="' + LOC_HOME_URL + LOC_FOOT_LOGO + '" width="20" height="20" border="0" /></a>');
	}
	else
	{
	    document.write ('<img src="' + LOC_HOME_URL + LOC_FOOT_LOGO + '" width="20" height="20" border="0" />');
	}
    }
    document.write ('<a href="' + LOC_HOME_URL + '/email.html"><img src="' + LOC_HOME_URL + '/images/mail_lst.gif" width="1" height="1" border="0" alt="e-mail" /></a>');
    document.write ('<a href="' + LOC_HOME_URL + '/maillist.html"><img src="' + LOC_HOME_URL + '/images/mail_lst.gif" width=1 Height=1 Border=0 Alt="e-mail" /></a>');
    document.write ('</td>');

    document.write ('</tr>');

    document.write ('</table>');

}



