// header.js

var i;
var gnDocuments = 1;
var gsDefaultName = '';
var agt = navigator.userAgent.toLowerCase();
var aname = navigator.appName;
var aver = parseInt(navigator.appVersion.substring(0,1));
var mie = false;
var gnTdWidth = 20;
var gbAlert = "F";
var gbDebugMode = "F";
var gbCurrentHome = "F";

var gsDefaultName = '';
var gsDomainName = "";
var gsDomainURL = "";
var gsIcon = "";
var gsRT_ARROW = '&#9658;';
var gsLT_ARROW = '&#9668;';
var gsUP_ARROW = '&#9650;';
var gsDN_ARROW = '&#9660;';

var gsDebugWin;
var gsDebugDoc;
var gsSmallWin;
var gsSmallDoc;
var gsNewURL;

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);
}

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

tempBar = '';
barBuilt = 0;
ssmItems = new Array();
moving = setTimeout('null',1)

document.write ('<STYLE TYPE="text/css">');
document.write ('\#dek {POSITION:absolute\;VISIBILITY:hidden\;Z-INDEX:200\;}');
document.write ('</STYLE>');
document.write ('<DIV ID="dek"></DIV>');
document.write ('<DIV ID="divPop"></DIV>');

checkBrowser();

//if(!mie)
//{
//    document.captureEvents(Event.MOUSEDOWN);
//    document.onmousedown=clickNS4;
//}
//else
//{
//    document.onmousedown=clickIE4;
//}
//document.oncontextmenu=new Function("alert(message);return false");

document.write ('<META HTTP-EQUIV=\"imagetoolbar\" CONTENT=\"no\">');

gsCurrentPath = document.location;

gsCurrentDoc = document.location.href.toLowerCase ();

gnLenDoc = gsCurrentDoc.length;

gnCurrentPos = gsCurrentDoc.indexOf ("com") + 3;

gnPosDoc = gnLenDoc - gnCurrentPos;

gsCurrentName = gsCurrentDoc.substr (gnCurrentPos, gnPosDoc);

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

gasDocumentName = new createDocList (10, '');
gasDocumentTitle = new createDocList (10, '');

gasDocumentName[gnDocuments] = gsDefaultName + 'index';
gasDocumentTitle[gnDocuments] = 'Home';
gnDocuments++;

gasDocumentName[gnDocuments] = gsDefaultName + 'whatsnew';
gasDocumentTitle[gnDocuments] = 'Guild News';
gnDocuments++;

gasDocumentName[gnDocuments] = gsDefaultName + 'educate';
gasDocumentTitle[gnDocuments] = 'Education';
gnDocuments++;

gasDocumentName[gnDocuments] = gsDefaultName + 'english';
gasDocumentTitle[gnDocuments] = 'Reenactment';
gnDocuments++;

gasDocumentName[gnDocuments] = gsDefaultName + 'guestbook';
gasDocumentTitle[gnDocuments] = 'Guestbook';
gnDocuments++;

//gasDocumentName[gnDocuments] = gsDefaultName + 'rpfn';
//gasDocumentTitle[gnDocuments] = 'Northern';
//gnDocuments++;

gasDocumentName[gnDocuments] = gsDefaultName + 'sm_user';
gasDocumentTitle[gnDocuments] = 'Users';
gnDocuments++;

document.write ('<LINK rel="stylesheet" href="/include/style.css" type="text/css">');
document.write ('<LINK rel="shortcut icon" href="/images/logo_guild_stm.ico">');

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

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));

if (gbDebugMode == "T")
{
    document.write ('<BR>');
    document.write ('<TABLE Width=300 Border=3 BgColor=White>');

    document.write ('<TR>');
	document.write ('<TD>Path</TD>');
	document.write ('<TD>', gsDefaultPath, '</TD>');
    document.write ('</TR>');
    
    document.write ('<TR>');
	document.write ('<TD>BASE Href</TD>'); 
	document.write ('<TD>', gsCurrentPath, '</TD>');
    document.write ('</TR>');

    document.write ('<TR>');
	document.write ('<TD>Name</TD> '); 
	document.write ('<TD>', gsCurrentName, '</TD>');
    document.write ('</TR>');

    document.write ('<TR>');
	document.write ('<TD>Doc</TD> '); 
	document.write ('<TD>', gnPosDoc, '</TD>'); 
    document.write ('</TR>');

    document.write ('<TR>');
	document.write ('<TD>Pos</TD> '); 
	document.write ('<TD>', gnCurrentPos, '</TD>'); 
    document.write ('</TR>');

    document.write ('<TR>');
	document.write ('<TD>Len</TD> '); 
	document.write ('<TD>', gnLenDoc, '</TD>'); 
    document.write ('</TR>');

    document.write ('<TR>');
	document.write ('<TD>Path</TD> '); 
	document.write ('<TD>', gsCurrentPath, '</TD>');
    document.write ('</TR>');

    document.write ('<TR>');
	document.write ('<TD>Orig</TD> '); 
	document.write ('<TD>', gsCurrentDoc, '</TD>');
    document.write ('</TR>');

    document.write ('<TR>');
	document.write ('<TD>Host</TD> '); 
	document.write ('<TD>', location.host, '</TD>');
    document.write ('</TR>');

    document.write ('</TABLE>');
    document.write ('<BR>');
}


document.write ('<TABLE Border=0 Width=100%><TR><TD Width=30 Height=100%></TD><TD>');
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
{
    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 mod_date = new Date (document.lastModified);   

    var hours = mod_date.getHours ();
    if (navigator.appName != ("Netscape"))
    {
	hours = hours - 1;
    }
    var minutes = mod_date.getMinutes ();
    var seconds = mod_date.getSeconds ();

    var timeValue = "" + ((hours > 12) ? hours - 12 : hours);

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

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

    document.write ('<TABLE Border="0" Width="100%" CellPadding=3 CellSpacing=0>');
	// ROW 1
    document.write ('<TR>');

	// DATA CELL 1,1
    document.write ('<TD Width="45%" Align="Left" VAlign="Middle" BgColor="Black">');
    document.write ('<FONT Face="Verdana, Arial, Helvetica" COLOR="White">');
	document.write ('<B>Guild of St. Michael - South</B>');
    document.write ('</FONT>');
    document.write ('</TD>');

	// DATA CELL 1,2
    document.write ('<TD Width="45%" Align="Right" VALIGN="middle" BGCOLOR="black">');
    document.write ('<FONT face="Verdana, Arial, Helvetica" COLOR="white" SIZE="-3">');
    document.write ('Page updated on: ');   
    document.write (DOWArray[(mod_date.getDay()+1)], ', ');   
    document.write (MOYArray[(mod_date.getMonth()+1)], ' ');   
    document.write (mod_date.getDate (), ', '); 
    // YEAR
    tnModYear = mod_date.getYear();
    if (navigator.appName == ("Netscape"))
    {
	tnModYear = mod_date.getYear() + 1900;
    }
    if (tnModYear < 100)
    {
	tnModYear += 1900;
    }
    if (tnModYear < 200)
    {
	tnModYear += 2000;
    }
    document.write (tnModYear);
  //  else
   // {
//		document.write (mod_date.getYear ());
 //   }
 
    document.write (', ', timeValue);
    document.write ('</FONT>');
    document.write ('</TD>');

	// DATA CELL 1,3
    document.write ('<TD BgColor="black" Width="10%" Align=Right>');
    doc_name = document.location.pathname.toLowerCase ();

	if (location.host.indexOf ("guildofstmichael.com") > -1)
	{
		document.write ('<A HREF="http://www.guildofstmichael.com" Target=_parent onMouseOver="linkPopIn(\'Guild of<BR>St. Michael<BR>Home Page\', \'\')" onMouseOut="linkPopOff()"><IMG ALIGN="bottom" ALIGN="center" BORDER="1" SRC="/images/tenticon.gif" ALT="Home Page" TITLE="Home Page"><BR><SPAN Class=HomeLink>HOME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN></A>');
	}
	else
	{
		document.write ('<A HREF="http://www.guildofstmichael.com" Target=_parent><IMG ALIGN="bottom" ALIGN="center" BORDER="1" SRC="/images/tenticon.gif" ALT="Home Page" TITLE="Home Page"></A>');
	}

    document.write ('</TD>');
    document.write ('</TR>');
    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>');

	menuBar();

	// CLOSE INNER TABLE
	document.write ('</TD></TABLE>');
	// CLOSE OUTER TABLE
	document.write ('</TD></TR></TABLE>');
	document.write ('</CENTER>');

	if (gsCurrentName.indexOf ("medicine") < 0)
	{
	    HostAnnounce ();
	}
}

// MENU BAR
function menuBar() // js001f14
{
    // 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 HREF="http://www.guildofstmichael.com/', gasDocumentName[i], '.html" Target=_parent>', gasDocumentTitle[i], '</A>');
	    //document.write ('<A HREF="http://www.guildofstmichael.org/', gasDocumentName[i], '" Target=_parent>', gasDocumentTitle[i], '</A>');
	}
	document.write ('</TD>');
    }
}

// INITIALIZE ARRAY
function initArray()  // js001f13
{  
    this.length = initArray.arguments.length;
    for (i = 0; i < this.length; i++)      
    {
		this[i+1] = initArray.arguments[i];
    }
}   

// REQUIRED JAVASCRIPT FUNCTION TO CREATE ARRAYS/LISTS
function createDocList(n, init) // js001f12
{
	this.size = n;
	for (i = 1; i <= n; i++)
	{
		this[i] = init;
	}
	return this;
}

function HostAnnounce()
{
    var gsExpireDate;
    var gsTodaysDate;
    var gsExpireTest;
    var gsTodaysTest;
    var gnCurYear;
    var gnExpYear;
    var gnExpires;
    var gnCurrent;

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

    // STEP:1
    // ENTER ANNOUNCEMENT EXPIRATION DATE IN "Month Date, Year" FORMAT
    // e.g. 'December 31, 1999'
    var gsExpireDate = new Date ('June 30, 2005');
    var gsExpireDate = new Date ('March 31, 2010');

    // ANNOUNCEMENT LINE COUNTER
    var gnAnnounceLines = 0;

    gasAnnounceLine = new createDocList (10, '');
    gasAnnounceStyle = new createDocList (10, '');

    // STEP:1
    // ENTER TEXT AND FONT STYLE FOR AS MANY LINES AS DESIRED
    // FONTS:  B=Bold, I=Italic, 10-18=Point Size
    // LINE #0
    gasAnnounceStyle[gnAnnounceLines] = 'B18';
    gasAnnounceLine[gnAnnounceLines] = 'Passing of a Faire Friend</A>';
    gasAnnounceLine[gnAnnounceLines] = 'Faire Schedule &amp; Application';
    gnAnnounceLines++

    // LINE #1
    gasAnnounceStyle[gnAnnounceLines] = 'B12';
    gasAnnounceLine[gnAnnounceLines] = '"Michael Wordsmith" has Died';
    gasAnnounceLine[gnAnnounceLines] = 'Jill Savage-Wood has Died';
    gasAnnounceLine[gnAnnounceLines] = '2010 Dates Added';
    gnAnnounceLines++

    gasAnnounceStyle[gnAnnounceLines] = 'B12';
    gasAnnounceLine[gnAnnounceLines] = 'June 10, 2005, Texas';
    gasAnnounceLine[gnAnnounceLines] = 'July 22, 2008, Colorado';
    gasAnnounceLine[gnAnnounceLines] = '<A href="/rpfs.html">Southern Faire Page</A>';
    gnAnnounceLines++

    // LINE #2
//    gasAnnounceStyle[gnAnnounceLines] = 'B10';
 //   gasAnnounceLine[gnAnnounceLines] = '<A Href="http://parks.co.la.ca.us/santa_fe_rpark.html">Park Info</A>';
  //  gnAnnounceLines++

    // LINE #3
    gasAnnounceStyle[gnAnnounceLines] = 'BI12';
    gasAnnounceLine[gnAnnounceLines] = '<HR>';
    gnAnnounceLines++

    // LINE #4
    gasAnnounceStyle[gnAnnounceLines] = 'I10';
    gasAnnounceLine[gnAnnounceLines] = 'Dave Gotcher, also known as "Mikey Dave" for his wonderful storyteller persona, Michael Wordsmith" passed into his final chapter on Sunday, June 10th at his home in Texas.  No further details or arrangements available at this time.';
    gasAnnounceLine[gnAnnounceLines] = 'A memorial service will be held for faire folk, friends and family on Saturday, Sept. 13, 2008 at 10:00 a.m. at the Kindred Community Church, 8712 East Santa Ana Canyon Road, Anaheim, California.';
    gasAnnounceLine[gnAnnounceLines] = 'Workshop and Event weekends Posted for Southern Faire and other 2010 Faires and Festivals';
    gnAnnounceLines++

    // LINE #5
    gasAnnounceStyle[gnAnnounceLines] = 'B10';
    gasAnnounceLine[gnAnnounceLines] = '<A Href=http://www.guildofstmichael.org/rpfs.html>Southern Faire</a>';
    gasAnnounceLine[gnAnnounceLines] = '<BR><A href="http://63.134.205.143/ocf/Employment/Actor_Application.asp?idJob=6&type=2">On-Line Participant Registration</A>';
    gnAnnounceLines++

    // LINE #6
//    gasAnnounceStyle[gnAnnounceLines] = 'BI10';
 //   gasAnnounceLine[gnAnnounceLines] = 'No... the Faire is NOT in San Bernardino Anymore!';
  //  gnAnnounceLines++

    gsTodaysDate = new Date ();

    if (navigator.appName == ("Netscape"))
    {
	gnCurYear = gsTodaysDate.getYear () + 1900;
	gnExpYear = gsExpireDate.getYear () + 1900;
    }
    else
    {
	gnCurYear = gsTodaysDate.getYear ();
	gnExpYear = gsExpireDate.getYear ();
    }

    gsTodaysTest = MONArray[(gsTodaysDate.getMonth()+1)] + ' ' + gsTodaysDate.getDate () + ', ' + gnCurYear;

    gsExpireTest = MONArray[(gsExpireDate.getMonth()+1)] + ' ' + gsExpireDate.getDate () + ', ' + gnExpYear;

    gnExpires = Date.parse (gsExpireTest);
    gnCurrent = Date.parse (gsTodaysTest);

    if (gnExpires < gnCurrent)
    {
	gbAlert = "F";
	return
    }
    // gbAlert = "T";

//    return;
//}

//popAnnounce()
//{
    document.write ('<BR>');
    // OUTER TABLE
    document.write ('<CENTER><TABLE Border=5 CellSpacing=0 Width="50%" BgColor="White"><TR><TD Align="Center">');
    // INNER TABLE
    document.write ('<TABLE Border="0" BgColor="White">');

    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 ('</TABLE>');
    document.write ('</TD></TR></TABLE></CENTER>');

    document.write ('<CENTER><FONT Color=Blue Size=-2>');
    document.write ('Announcement Expires after ', gsExpireTest);
    document.write ('</CENTER></FONT><BR>');
}

function checkBrowser() // js001f11
{
    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 clickIE4() // js001f10
{
    if (event.button == 2)
    {
	alert(message);
	return false;
    }
}

function clickNS4(e) // js001f09
{
    if (document.layers || document.getElementById && !document.all)
    {
	if (e.which == 2 || e.which == 3)
	{
	    alert(message);
	    return false;
	}
    }
}

//Static Slide Menu 6.5 © MaXimuS 2000-2001, All Rights Reserved.
//Site: http://www.absolutegb.com/maximus
//E-mail: maximus@nsimail.com
//Script featured on Dynamic Drive (http://www.dynamicdrive.com)

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

//tempBar='';
//barBuilt=0;
//ssmItems=new Array();

moving=setTimeout('null',1)

function moveOut()  // js001f08
{
    if ((NS6||NS)&&parseInt(ssm.left)<0 || IE && ssm.pixelLeft<0) 
    {
	clearTimeout(moving);moving = setTimeout('moveOut()', slideSpeed);slideMenu(10)
    }
    else 
    {
	clearTimeout(moving);moving=setTimeout('null',1)
    }
};
function moveBack()  // js001f07
{
    clearTimeout(moving);moving = setTimeout('moveBack1()', waitTime)
}

function moveBack1() // js001f06
{
    if ((NS6||NS) && parseInt(ssm.left)>(-menuWidth) || IE && ssm.pixelLeft>(-menuWidth)) 
    {
    clearTimeout(moving);moving = setTimeout('moveBack1()', slideSpeed);slideMenu(-10)
    }
    else {clearTimeout(moving);moving=setTimeout('null',1)}
}

function slideMenu(num) // js001f05
{
    if (IE) {ssm.pixelLeft += num;}
    if (NS||NS6) {ssm.left = parseInt(ssm.left)+num;}
    if (NS) {bssm.clip.right+=num;bssm2.clip.right+=num;}
}

function makeStatic()  // js001f04
{
    if (NS||NS6) {winY = window.pageYOffset;}
    if (IE) {winY = document.body.scrollTop;}
    if (NS6||IE||NS) 
    {
    if (winY!=lastY&&winY>YOffset-staticYOffset) 
    {
    smooth = .2 * (winY - lastY - YOffset + staticYOffset);}
    else if (YOffset-staticYOffset+lastY>YOffset-staticYOffset) 
    {
    smooth = .2 * (winY - lastY - (YOffset-(YOffset-winY)));}
    else {smooth=0}
    if(smooth > 0) smooth = Math.ceil(smooth);
    else smooth = Math.floor(smooth);
    if (IE) bssm.pixelTop+=smooth;
    if (NS6||NS) bssm.top=parseInt(bssm.top)+smooth
    lastY = lastY+smooth;
    setTimeout('makeStatic()', 1)}
}

function buildBar()  // js001f03
{
    if(barText.indexOf('<IMG')>-1) 
    { 
	tempBar=barText;
    }
    else
    {
	for (b=0;b<barText.length;b++) 
	{
	    tempBar+=barText.charAt(b)+"<BR>";
	}
    }
    document.write('<td align="center" rowspan="100" width="'+barWidth+'" bgcolor="'+barBGColor+'" valign="'+barVAlign+'"><p align="center"><font face="'+barFontFamily+'" Size="'+barFontSize+'" COLOR="'+barFontColor+'"><B>'+tempBar+'</B></font></p></TD>');
    if (gbAlert == "T")
    {
	document.write('<td align="center" rowspan="100" width="'+barWidth+'" bgcolor="red" valign="'+barVAlign+'"><p align="center"><font face="'+barFontFamily+'" Size="'+barFontSize+'" COLOR="white"><B>A<BR>l<BR>e<BR>r<BR>t</B></font></p></TD>');
    }
}

function initSlide() // js001f02
{
    if (NS6){ssm=document.getElementById("thessm").style;bssm=document.getElementById("basessm").style;
    bssm.clip="rect(0 "+document.getElementById("thessm").offsetWidth+" "+document.getElementById("thessm").offsetHeight+" 0)";ssm.visibility="visible";}
    else if (IE) {ssm=document.all("thessm").style;bssm=document.all("basessm").style
    bssm.clip="rect(0 "+thessm.offsetWidth+" "+thessm.offsetHeight+" 0)";bssm.visibility = "visible";}
    else if (NS) {bssm=document.layers["basessm1"];
    bssm2=bssm.document.layers["basessm2"];ssm=bssm2.document.layers["thessm"];
    bssm2.clip.left=0;ssm.visibility = "show";}
    if (menuIsStatic=="yes") makeStatic();
}

function buildMenu() // js001f01
{
    gnBoxWidth = 2;

    if (gbAlert == "T")
    {
	gnBoxWidth = 22;
    }

    if (IE||NS6) 
    {
	document.write('<DIV ID="basessm" style="visibility:hidden;Position : Absolute ;Left : '+XOffset+' ;Top : '+YOffset+' ;Z-Index : 20;width:'+(menuWidth+barWidth+10)+'"><DIV ID="thessm" style="Position : Absolute ;Left : '+(-menuWidth)+' ;Top : 0 ;Z-Index : 20;" onmouseover="moveOut()" onmouseout="moveBack()">');
    }
    if (NS) 
    {
	document.write('<LAYER name="basessm1" top="'+YOffset+'" LEFT='+XOffset+' visibility="show"><ILAYER name="basessm2"><LAYER visibility="hide" name="thessm" bgcolor="'+menuBGColor+'" left="'+(-menuWidth)+'" onmouseover="moveOut()" onmouseout="moveBack()">');
    }
    if (NS6)
    {
	document.write('<table border="0" cellpadding="0" cellspacing="0" width="'+(menuWidth+barWidth+2)+'" bgcolor="'+menuBGColor+'"><TR><TD>')
    }
    document.write('<table border="0" cellpadding="0" cellspacing="1" width="'+(menuWidth+barWidth+gnBoxWidth)+'" bgcolor="'+menuBGColor+'">');
    for(i=0;i<ssmItems.length;i++) 
    {
	if(!ssmItems[i][3]){ssmItems[i][3]=menuCols;ssmItems[i][5]=menuWidth-1}
	else if(ssmItems[i][3]!=menuCols)ssmItems[i][5]=Math.round(menuWidth*(ssmItems[i][3]/menuCols)-1);
	if(ssmItems[i-1]&&ssmItems[i-1][4]!="no"){document.write('<TR>')}
	if(!ssmItems[i][1])
	{
	    document.write('<td bgcolor="'+hdrBGColor+'" height="'+hdrHeight+'" align="'+hdrAlign+'" valign="'+hdrVAlign+'" width="'+ssmItems[i][5]+'" colspan="'+ssmItems[i][3]+'">&nbsp;<font face="'+hdrFontFamily+'" Size="'+hdrFontSize+'" COLOR="'+hdrFontColor+'"><b>'+ssmItems[i][0]+'</b></font></td>');
	}
	else 
	{
	    if(!ssmItems[i][2])ssmItems[i][2]=linkTarget;
//	    document.write('<td bgcolor="'+linkBGColor+'" onmouseover="bgColor=\''+linkOverBGColor+'\'" onmouseout="bgColor=\''+linkBGColor+'\'" width="'+ssmItems[i][5]+'" colspan="'+ssmItems[i][3]+'"><ilayer><layer onmouseover="bgColor=\''+linkOverBGColor+'\'" onmouseout="bgColor=\''+linkBGColor+'\'" width="100%" align="'+linkAlign+'"><DIV  ALIGN="'+linkAlign+'"><FONT face="'+linkFontFamily+'" Size="'+linkFontSize+'">&nbsp;<A HREF="'+ssmItems[i][1]+'" target="'+ssmItems[i][2]+'" CLASS="ssmItems">'+ssmItems[i][0]+'</DIV></LAYER></ILAYER></TD>');
	    document.write('<TD class=menugrey2 bgcolor="'+linkBGColor+'" onmouseover="this.style.backgroundColor=\''+linkOverBGColor+'\';" onmouseout="this.style.backgroundColor=\''+linkBGColor+'\';" width="'+ssmItems[i][5]+'" colspan="'+ssmItems[i][3]+'"><ILAYER><LAYER onmouseover="this.style.backgroundColor=\''+linkOverBGColor+'\';" onmouseout="this.style.backgroundColor=\''+linkBGColor+'\';" width="100%" align="'+linkAlign+'"><DIV align="'+linkAlign+'"><FONT face="'+linkFontFamily+'" size="'+linkFontSize+'">&nbsp;<A href="'+ssmItems[i][1]+'" target="'+ssmItems[i][2]+'" class="gasMenuItems" style="text-decoration: none;">'+ssmItems[i][0]+'</DIV></LAYER></ILAYER></TD>')
	}
	if(ssmItems[i][4]!="no"&&barBuilt==0)
	{
	    buildBar();
	    barBuilt=1;
	}
	if(ssmItems[i][4]!="no")
	{
	    document.write('</TR>');
	}
    }
    document.write('</table>')
    if (NS6){document.write('</TD></TR></TABLE>')}
    if (IE||NS6) {document.write('</DIV></DIV>')}
    if (NS) {document.write('</LAYER></ILAYER></LAYER>')}
    theleft=-menuWidth;lastY=0;setTimeout('initSlide();', 1)
}

function loadMenu()
{
    //////////////////////
    // ssmitems.js
    //////////////////////


    //
    // Configure menu styles below
    // NOTE: To edit the link colors, go to the STYLE tags and edit the ssm2Items colors
    //*

    YOffset = 1; // pixels from top (Def=150) no quotes!!
    XOffset = 0; // pixels from left (Def=0)
    staticYOffset = 30; // pixels from top when moved (Def=30) no quotes!!
    slideSpeed = 20 // no quotes!!
    waitTime = 100; // no quotes!! this sets the time the menu stays out for after the mouse goes off it.
    menuBGColor = "black";
    menuIsStatic = "yes"; //this sets whether menu should stay static on the screen
    menuWidth = 170; // Must be a multiple of 10! no quotes!!
    menuCols = 2;
    hdrFontFamily = "verdana";
    hdrFontSize = "2";
    hdrFontColor = "black";
    //hdrBGColor = "#170088";
    hdrBGColor = "#CCCCCC";
    hdrAlign = "left";
    hdrVAlign = "center";
    hdrHeight = "15";
    linkFontFamily = "Verdana";
    linkFontSize = "2";
    linkBGColor = "white";
    //linkOverBGColor = "#FFFF99";
    linkOverBGColor = "#007722";
    linkTarget = "_parent";
    linkAlign = "Left";
    barBGColor = "#007722";
    //barBGColor = "#444444";
    barFontFamily = "Verdana";
    barFontSize = "2";
    barFontColor = "white";
    barVAlign = "center";
    barWidth = 20; // no quotes!!
    barText = " GUILD MENU"; // <IMG> tag supported. Put exact html for an image to show.
    ///////////////////////////////////////

    ///////////////////////////

    // ssmItems[...]=[name, link, target, colspan, endrow?] - leave 'link' and 'target' blank to make a header
    gnMenuItems = 0;
    ssmItems[gnMenuItems++]=["Main Pages"]; //create header
    ssmItems[gnMenuItems++]=["Home Page", "http://www.guildofstmichael.com", ""];
    ssmItems[gnMenuItems++]=["What's New", "http://www.guildofstmichael.org/whatsnew.html", "Target=_parent"];
    ssmItems[gnMenuItems++]=["Education", "http://www.guildofstmichael.org/educate.html", "Target=_parent"];
    ssmItems[gnMenuItems++]=["Reenactment", "http://www.guildofstmichael.org/english.html", "Target=_parent"];
    ssmItems[gnMenuItems++]=["Medicine", "http://www.guildofstmichael.org/medicine", "Target=_parent"];
    ssmItems[gnMenuItems++]=["Library", "http://www.guildofstmichael.org/library", "Target=_parent"];

    ssmItems[gnMenuItems++]=["About Us", "http://www.guildofstmichael.org/aboutus.html", "Target=_parent", 1, "no"]; //create two column row
    ssmItems[gnMenuItems++]=["Contact Us", "http://www.guildofstmichael.org/scripts/members.php", "",1];

    ssmItems[gnMenuItems++]=["User Links", "", ""]; // CREATE HEADER
    ssmItems[gnMenuItems++]=["Southern Faire", "http://www.guildofstmichael.org/rpfs.html", "Target=_parent"];
    ssmItems[gnMenuItems++]=["Guild Site", "http://www.guildofstmichael.org", "_new"];
    ssmItems[gnMenuItems++]=["Member Login", "http://www.guildofstmichael.org/sm_user.html", "Target=_parent"];
    ssmItems[gnMenuItems++]=["Web Mail", "http://www.guildofstmichael.org/webmail.html", "Target=_parent"];
    if (gbAlert == "T")
    {
	ssmItems[gnMenuItems++]=["&gt;&gt;&nbsp;Alert&nbsp;&lt;&lt;", "http://www.guildofstmichael.org/alert.html", "_new"];
    }
}

function dispFooter()
{
    loadMenu();
    buildMenu();
    document.write ('<div id="divFooter" style="clear: both; position: relative; margin: 0 0 0 0; background-color: ' + LOC_BG_FOOTER + '; border: 0px solid #FFFFFF;">');
//    document.write ('<br /><span style="font-weight: normal; font-size: 8pt; color: #FFFFFF;"> ' + gsDomainURL + 'include/style_div_' + gsCSSBrow + gsCSSVers + '.css </span><br />');
    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>');

    ////////////////////////////////////////////////////////////////////////
    // LT: WEB SERVICE
    document.write ('<td 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>');
    
    ////////////////////////////////////////////////////////////////////////
    // CT: BUTTONS
    document.write ('<td width="30%" align="center" valign="middle" style="">');
    if (gbCurrentHome == "F")
    {
	document.write ('<form id="frmFoot" name="frmFoot" style=" border: 0px solid #FF0000;">');
	document.write ('<br>');
	document.write ('<input type="Button" name="btnHome" value="' + gsUP_ARROW + '&nbsp;Home&nbsp;" class="button2" onclick="document.location.href=\'' + LOC_HOME_URL + '\';" style="display: inline;">');
    }
    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&nbsp;" class=button2 onclick="history.go(-1);" style="display: inline;">');
	document.write ('</form> <!-- frmFoot -->');
    }
    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 + '&nbsp;');
    }
    else
    {
	document.write ('Copyright &copy; ' + LOC_COPY_YEAR + '-' + tsYear + '&nbsp;' + LOC_LONG_NAME + '&nbsp;');
    }
    if (LOC_FOOT_LOGO != "")
    {
	if (gbCurrentHome == "F")
	{
	    document.write ('&nbsp;<a href="' + LOC_HOME_URL + '"><img src="' + LOC_FOOT_LOGO + '" width="20" height="20" border="0" /></a>');
	}
	else
	{
	    document.write ('&nbsp;<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>');

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

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


