/*

WEB SITE:       Red thru Violet
FILE NAME:      rtvjs.js
TITLE:          javaScript File
AUTHOR:         Susan Sailow
DATE CREATED:   01 Jan 2007

DESCRIPTION:    javaScript for Red thru Violet, Hollister, CA

*/

/**************************************************************************

Variables

Goals Array:
goals is a multi-dimensional array, with the following elements:
       element 0: Goal Description, eg, 'To reinstate David Novogrodsky as Local 21....'

Breaking News Array:
breakgNews is a multi-dimensional array, with the following elements:
       element 0: Ending Date, eg, 'December 31, 2006'
       element 1: Display Date, eg, '16 Aug 2006'
       element 2: Title, eg, 'Audit Finds No Financial Crisis'
       element 3: Description, eg, 'Initial reports from IFPTE International Auditors confirm that Local 21 is not experiencing finanical problems."
       element 4: File Name, eg, 'documents/fin/fn.doc'

Events Array:
events is a multi-dimensional array, with the following elements:
       element 0: Ending Date, eg, 'September 2, 2006'
       element 1: Title, eg, 'SAVE LOCAL 21 Mtg'
       element 2: Display Date, eg, 'Sat, 2 Sep 2006'
       element 3: Time, eg, '2:00 - 4:00 pm'
       element 4: City/State, eg, 'Berkeley, CA'
       element 5: Miscellaneous

**************************************************************************/

	var columnPartA, columnPartB, columnPartC;
	var doubleQuote = '"';
	var htmlCode;
	var imagePath = 'images/';
	var maxSections = 25;
	var noInitPages = 3;
	var noPages = 6;
	var numPBNLinks = 2000;
	var numPL = 3;
	var numPLine0;
	var numPLine1;
	var numPLine2;
	var numPS01 = 0;
	var numPS02 = 0;
	var numPS00 = 0;
	var numPS04 = 0;
	var numPS14, numPS14Var, numPS15, numPS16 = 0;
	var numBN = 50;
	var numEvents = 50;
	var NS_LT5 = 0;
	var numProdsToUse = 0;
	var pbnLinksEleNo = 0;
	var plSubNo = 0;
	var prodsArr;
	var pSNo = 0;
	var pSTitleNo = 0;
	var pSublineArr;
	var singleQuote = "'";
	var today = new Date( );
	var yesterdayEnd = new Date ( );

// Look for Netscape browser, with a version number less than 5

	if ( navigator.appName == "Netscape" &&  navigator.appVersion.charAt(0) < '5' )  
      {  NS_LT5 = 1; }

// Calculate yesterday's end

	yesterdayEnd.setHours( 0 );
	yesterdayEnd.setMinutes( 0 );
	yesterdayEnd.setSeconds( -1 );

// Declare and initialize pages array

	pageArr = new Array( noPages );

	pageArr[0]  = new Array('HP',    'Home',       'index.php',     'LinkBOPRed',    1);
	pageArr[1]  = new Array('AU',    'About Us',   'aboutus.php',   'LinkBOPOrange', 1);
	pageArr[2]  = new Array('Servs', 'Services',   'services.php',  'LinkBOPYellow', 1);
	pageArr[3]  = new Array('SC',    'Showcase',   'showcase.php',  'LinkBOPGreen',  1);
	pageArr[4]  = new Array('Costs', 'Costs',      'costs.php',     'LinkBOPBlue',   1);
	pageArr[5]  = new Array('CU',    'Contact Us', 'contactus.php', 'LinkBOPViolet', 1);
//	initPageArr();

// Declare and initialize Breadking News array

	breakgNews = new Array( numBN );

	breakgNews[0] = new Array('August 30, 2006', '22 Aug 2006', 'Executive Committee<BR>Cancels Mediation', 
        "After two postponed dates (August 4 and 10) for mediation with former California Supreme Court Justice Joe Grodin, and a new date set for Friday (August 25), the Executive Committee's lawyer cancelled the mediation yesterday. They insisted that the mediation be closed, and that David could bring only his lawyer, but they would have a group of officers. They also insisted that the topic to be mediated be narrowly drawn. Rather than further discuss the 'ground rules', they cancelled the mediation.", 
        ' ');
	breakgNews[1] = new Array('September 10, 2006', '16 Aug 2006', 'Audit Finds<BR>NO Financial Crisis', 
        "Preliminary reports from IFPTE International Auditors confirm that Local 21 is not experiencing finanical problems. This report is consistent with Local 21's own independent audit.<BR>(More to come)", 
        ' ');
	breakgNews[4] = new Array('September 16, 2006', '16 Aug 2006', 'Some Challenges<BR>Facing the Union', 
        "Thoughts on Local 21's<BR>Crisis of Governance<BR>Re-wind Time",
        'An Editorial Comment', 'documents/DN/ThoughtsonCrisisofGovernance.doc', '_blank');
	breakgNews[5] = new Array('September 30, 2006', '01 Aug 2006', 'Accountants and Auditors<br>of San Francisco', 
        'Unanimously pass a motion to put on the record: "that the Accountants/ Auditors Chapter wants to rescind, or hold in abeyance, the termination of Executive Director David Novogrodsky, until further investigation or the decision of the upcoming Delegate Assembly in September 2006"', 
        'The Motion', 'documents/fin/AccountantsAuditors_Motion_20060801.doc', '_blank');
	breakgNews[3] = new Array('October 15, 2006', '10 Sep 2006', "Our Union is in Crisis -<br>but There's Hope in a<BR>Democrative Process",
        "From 'What Were the<BR>Main Problems?'&nbsp; to<BR>'How Do We Heal?'", 
        'By Lois Scott', 'documents/LoisScottFLYERfinal.doc', '_blank');
	breakgNews[2] = new Array('October 11, 2006', '11 Sep 2006', "New Financial Documents",
        "Comparative Budgets<BR>and Executive Committee<BR>Budget Reports", 
        'Financial Issues', 'index.htm#FinIssues', '');
	breakgNews[1] = new Array('September 16, 2006', '16 Sep 2006', "DELEGATE<BR>ASSEMBLY MTG",
        "<span class='ContentBold'>ALL</span> are encouraged to<BR>attend, anyone can attend,<BR>Delegates only may vote<BR>9:00 am, Sat 16Sep<BR>Oakland Marriott<BR>City Center",
        'Calendar Details', 'index.htm#Cal', '');
//	events[3] = new Array('September 16, 2006', 'Delegrate<BR>Assembly Mtg', 'Sat, 16 Sep 2006', '8:30 am Registration<BR>9:00 am Mtg Begins', 'Calvin Simmons Bllrm<BR>Oakland Marriott<BR>City Center<BR>', 'Oakland, CA', '');

//    breakgNews.sort();

// Declare and initialize Events array

	numEvents = 50;

	events = new Array( numEvents );

	events = new Array( numEvents );
	events[0] = new Array('December 31, 2999', '<a class="SectionDetailEm" href="http://www.ifpte21.org/ifpte2_calendar.shtml" target="_blank">IFPTE21 Calendar<BR>of Upcoming Mtgs</a>', '', '', '', '', '');
	events[1] = new Array('September 2, 2006', 'SAVE LOCAL 21 Mtg', 'Sat, 2 Sep 2006', '2:00 - 4:00 pm', '1870 San Ramon', 'Berkeley, CA', '');
	events[2] = new Array('September 9, 2006', 'SAVE LOCAL 21 Mtg', 'Sat, 9 Sep 2006', '2:00 - 4:00 pm', '1870 San Ramon', 'Berkeley, CA', '');
	events[3] = new Array('September 16, 2006', 'Delegrate<BR>Assembly Mtg', 'Sat, 16 Sep 2006', '8:30 am Registration<BR>9:00 am Mtg Begins', 'Calvin Simmons Bllrm<BR>Oakland Marriott<BR>City Center<BR>1001 Broadway', 'Oakland, CA', '');
      events[4] = new Array('September 24, 2006', 'SAVE LOCAL 21 Mtg', 'Sun, 24 Sep 2006', '2:00 - 4:00 pm', '1870 San Ramon', 'Berkeley, CA', '');
	events[5] = new Array('October 21, 2006', 'SAVE LOCAL 21 Mtg', 'Sat, 21 Oct 2006', '2:00 - 4:00 pm', '1870 San Ramon', 'Berkeley, CA', '');
	events[6] = new Array('October 28, 2006', 'SAVE LOCAL 21 Mtg', 'Sat, 28 Oct 2006', '2:00 - 4:00 pm', '1870 San Ramon', 'Berkeley, CA', '');
	events[7] = new Array('November 4, 2006', 'SAVE LOCAL 21 Mtg', 'Sat, 4 Nov 2006', '2:00 - 4:00 pm', '1870 San Ramon', 'Berkeley, CA', '');
	events[8] = new Array('November 11, 2006', 'SAVE LOCAL 21 Mtg', 'Sat, 11 Nov 2006', '2:00 - 4:00 pm', '1870 San Ramon', 'Berkeley, CA', '');
	events[9] = new Array('November 18, 2006', 'SAVE LOCAL 21 Mtg', 'Sat, 18 Nov 2006', '2:00 - 4:00 pm', '1870 San Ramon', 'Berkeley, CA', '');
	events[10] = new Array('November 25, 2006', 'SAVE LOCAL 21 Mtg', 'Sat, 25 Nov 2006', '2:00 - 4:00 pm', '1870 San Ramon', 'Berkeley, CA', '');
	events[11] = new Array('December 2, 2006', 'SAVE LOCAL 21 Mtg', 'Sat, 2 Dec 2006', '2:00 - 4:00 pm', '1870 San Ramon', 'Berkeley, CA', '');
	events[12] = new Array('December 9, 2006', 'SAVE LOCAL 21 Mtg', 'Sat, 9 Dec 2006', '2:00 - 4:00 pm', '1870 San Ramon', 'Berkeley, CA', '');
	events[13] = new Array('December 16, 2006', 'SAVE LOCAL 21 Mtg', 'Sat, 16 Dec 2006', '2:00 - 4:00 pm', '1870 San Ramon', 'Berkeley, CA', '');
	events[14] = new Array('December 23, 2006', 'SAVE LOCAL 21 Mtg', 'Sat, 23 Dec 2006', '2:00 - 4:00 pm', '1870 San Ramon', 'Berkeley, CA', '');
	events[15] = new Array('December 30, 2006', 'SAVE LOCAL 21 Mtg', 'Sat, 30 Dec 2006', '2:00 - 4:00 pm', '1870 San Ramon', 'Berkeley, CA', '');
	events[16] = new Array('January 6, 2007', 'Meeting', 'Sat, 6 Jan 2007', '2:00 - 4:00 pm', '1870 San Ramon', 'Berkeley, CA', '');
	events[17] = new Array('January 13, 2007', 'Meeting', 'Sat, 13 Jan 2007', '2:00 - 4:00 pm', '1870 San Ramon', 'Berkeley, CA', '');
	events[18] = new Array('January 20, 2007', 'Meeting', 'Sat, 20 Jan 2007', '2:00 - 4:00 pm', '1870 San Ramon', 'Berkeley, CA', '');
	events[19] = new Array('January 27, 2007', 'Meeting', 'Sat, 27 Jan 2007', '2:00 - 4:00 pm', '1870 San Ramon', 'Berkeley, CA', '');
/*
	events[20] = new Array('February 3, 2007', 'Meeting', 'Sat, 3 Feb 2007', '2:00 - 4:00 pm', '1870 San Ramon', 'Berkeley, CA', '');
	events[21] = new Array('February 10, 2007', 'Meeting', 'Sat, 10 Feb 2007', '2:00 - 4:00 pm', '1870 San Ramon', 'Berkeley, CA', '');
	events[22] = new Array('February 17, 2007', 'Meeting', 'Sat, 17 Feb 2007', '2:00 - 4:00 pm', '1870 San Ramon', 'Berkeley, CA', '');
	events[23] = new Array('February 24, 2007', 'Meeting', 'Sat, 24 Feb 2007', '2:00 - 4:00 pm', '1870 San Ramon', 'Berkeley, CA', '');
	events[24] = new Array('March 3, 2007', 'Meeting', 'Sat, 3 Mar 2007', '2:00 - 4:00 pm', '1870 San Ramon', 'Berkeley, CA', '');
	events[25] = new Array('March 10, 2007', 'Meeting', 'Sat, 10 Mar 2007', '2:00 - 4:00 pm', '1870 San Ramon', 'Berkeley, CA', '');
	events[26] = new Array('March 17, 2007', 'Meeting', 'Sat, 17 Mar 2007', '2:00 - 4:00 pm', '1870 San Ramon', 'Berkeley, CA', '');
	events[27] = new Array('March 24, 2007', 'Meeting', 'Sat, 24 Mar 2007', '2:00 - 4:00 pm', '1870 San Ramon', 'Berkeley, CA', '');
	events[28] = new Array('March 31, 2007', 'Meeting', 'Sat, 31 Mar 2007', '2:00 - 4:00 pm', '1870 San Ramon', 'Berkeley, CA', '');
*/
//                             0                   1                   2           3               4                   5                                                          6                7

/* May use later
            <br> &nbsp; <br> Thu, 3 Aug 2006<br>12:00 noon - 1:00 pm<br><span class="SectionDetailEm">Engineers/<br>Architects Mtg</span><br>Oakland City Hall<br>Hearing Room 3<br>#1 Frank Ogawa Plaza<BR>Oakland, CA
            <br> &nbsp; <br> Fri, 4 Aug 2006<br>12:00 noon - 1:00 pm<br><span class="SectionDetailEm">Chapters A/W Mtg</span><br>Oakland City Hall<br>Hearing Room 3<br>#1 Frank Ogawa Plaza<BR>Oakland, CA
            <br> &nbsp; <br> Wed, 9 Aug 2006<br>11:30 am - 12:30 pm<br><span class="SectionDetailEm">Managers/<br>Supervisors Mtg</span><br>Bldg #4<br>7101 Edgewater Dr<BR>Oakland, CA
*/

/**************************************************************************
function displayBNs: Display Breaking News Items Effective Today (or Input Date)
**************************************************************************/

	function displayBNs( effecDateInput )
{
	var effecDate = new Date (effecDateInput);
	var BNEndgDate = new Date ( );

	if ( effecDateInput == 'Today' )
	{  effecDate = yesterdayEnd; 	}
	else
	{  effecDate = new Date (effecDateInput);  }
//     alert ('displayBNs: effecDate = ' + effecDate);

// Start Table

	htmlCode = '<table border="0" cellspacing="5" cellpadding="3" summary="Breaking News Table">';
      htmlCode += '<tr> <td class="SectionDetail" align="center"><a name="BN"></a>';
	writeHTMLCode( htmlCode, 0 );

// Display Heading

	htmlCode = '<span class="SectionTitleEm">B R E A K I N G<BR>N E W S</span>';
	writeHTMLCode( htmlCode, 0 );

// Display Breaking News Items

	for (j = 0; j <= (numBN-1); j++)
	{ 
		if ( breakgNews[j] == null )
		{  continue;  }
		else
      	{
			BNEndgDate = new Date ( breakgNews[j][0] );
// alert ('displayBNs: j, breakgNews[j][0], breakgNewsBeggDate = ' + j + ' ' + breakgNews[j][0] + ' ' + BNEndgDate);
			if ( BNEndgDate >= effecDate ) 
	   		{ 
// alert ( 'displayBNs: j, BNEndgDate >= yesterdayEnd = ' + j + ' ' + BNEndgDate + ' ' + yesterdayEnd );
// Display Breaking News Item Date
				htmlCode = '<SPAN class="SectionDetail">  <br> &nbsp; <br> ' + breakgNews[j][1] + ' </SPAN>';
		    		writeHTMLCode( htmlCode, 0 );

// Display Breaking News Item Title
				htmlCode = '<SPAN class="SectionDetailEm"> <BR> ' + breakgNews[j][2] + ' </SPAN>';
				writeHTMLCode( htmlCode, 0 );

// Display Breaking News Item Description
				htmlCode = '<SPAN class="SectionDetail"> <BR> ' + breakgNews[j][3] + ' </SPAN>';
		    		writeHTMLCode( htmlCode, 0 );

// If there, display Breaking News Item Link 
				if (breakgNews[j][4] == ' ')
                        { continue; }
                        else
                        {  htmlCode = '<BR> <a class="SectionLinkDoc" href="' + breakgNews[j][5] + '" target="' + breakgNews[j][6] + '">' + breakgNews[j][4] + '</a>';
				   writeHTMLCode( htmlCode, 0 );
                        }

			}
      	}
	}

// End Table

	htmlCode = '</td> </tr>';
      htmlCode += '</table>';
	writeHTMLCode( htmlCode, 0 );
      
}

/**************************************************************************
function displayGoals: Display Goals 
**************************************************************************/

	function displayGoals( dispHTMLCode )
{
	var dispHTMLCode;
//     alert ('displayGoals: Begin');
// Start Table

	htmlCode = '<table border="0" cellspacing="5" cellpadding="3" summary="Goals Table">';
      htmlCode += '<tr> <td class="SectionDetail" align="center"><a name="Goals"></a>';
	writeHTMLCode( htmlCode, 0 );

// Display Heading

	htmlCode = '<span class="SectionTitle">G O A L S</span> <br> &nbsp; <br>';
	writeHTMLCode( htmlCode, 0 );

// Display Goals

      htmlCode = '<span class="SectionDetailEm">1.</span> To <span class="SectionDetailEm">revitalize the open dialogue</span>, transparency and mutual respect that have been guiding principles of Local 21 <br> &nbsp; <br>';
	writeHTMLCode( htmlCode, 0 );

      htmlCode = '<span class="SectionDetailEm">2.</span> To <span class="SectionDetailEm">strengthen the future confidence</span> of all members in our Union - fostering clear communication, due process and an institutional infrastructure that can best address future challenges <br> &nbsp; <br>';
	writeHTMLCode( htmlCode, 0 );

      htmlCode = '<span class="SectionDetailEm">3.</span> To <span class="SectionDetailEm">heal the divisions</span> between the Executive Committee and the Union <br> &nbsp; <br>';
	writeHTMLCode( htmlCode, 0 );

      htmlCode = '<span class="SectionDetailEm">4.</span> To <span class="SectionDetailEm">set aside the Executive Committee’s termination action</span> against the Executive Director, which is in violation of Sections VIII.A and XVII.D of the Local 21 By-Laws <br> &nbsp; <br>';
	writeHTMLCode( htmlCode, 0 );

      htmlCode = '<span class="SectionDetailEm">5.</span> To <span class="SectionDetailEm">reinstate David Novogrodsky</span> as Local 21’s Executive Director, while a calmer dialogue prevails <br> &nbsp; <br>';
	writeHTMLCode( htmlCode, 0 );

// End Table

	htmlCode = '</td> </tr>';
      htmlCode += '</table>';
	writeHTMLCode( htmlCode, 0 );
}

/**************************************************************************
function displayCal: Display Events Effective Today (or Input Date)
**************************************************************************/

	function displayCal( effecDateInput )
{
	var effecDate = new Date (effecDateInput);
	var eventEndgDate = new Date ( );

	if ( effecDateInput == 'Today' )
	{  effecDate = yesterdayEnd; 	}
	else
	{  effecDate = new Date (effecDateInput);  }
//     alert ('displayCal: effecDate = ' + effecDate);

// Start Table

	htmlCode = '<table border="0" cellspacing="5" cellpadding="3" summary="Events Table">';
      htmlCode += '<tr> <td class="SectionDetail" align="center"><a name="Cal"></a>';
	writeHTMLCode( htmlCode, 0 );

// Display Heading

	htmlCode = '<span class="SectionTitle">C A L E N D A R</span>';
	writeHTMLCode( htmlCode, 0 );

// Display IFPTE Calendar link
	htmlCode = '<SPAN class="SectionDetailEm"> <br> &nbsp; <br> ' + events[0][1] + ' </SPAN>';
	writeHTMLCode( htmlCode, 0 );

// Display Events

	for (j = 1; j <= (numEvents-1); j++)
	{ 
		if ( events[j] == null )
		{  continue;  }
		else
      	{
			eventEndgDate = new Date ( events[j][0] );
// alert ('displayCal: j, events[j][0], eventEndgDate, effecDate = ' + j + ' ' + events[j][0] + ' ' + eventEndgDate + ' ' + effecDate);
			if ( eventEndgDate >= effecDate ) 
	   		{ 
// alert ( 'displayCal: j, eventEndgDate >= yesterdayEnd = ' + j + ' ' + eventEndgDate + ' ' + yesterdayEnd );
// Display Event Date
				htmlCode = '<SPAN class="SectionDetail">  <br> &nbsp; <br> ' + events[j][2] + ' </SPAN>';
		    		writeHTMLCode( htmlCode, 0 );

// Display Event Time
				htmlCode = '<SPAN class="SectionDetail">  <br> ' + events[j][3] + ' </SPAN>';
		    		writeHTMLCode( htmlCode, 0 );

// Display Event Title
				htmlCode = '<SPAN class="SectionDetailEm"> <BR> ' + events[j][1] + ' </SPAN>';
				writeHTMLCode( htmlCode, 0 );

// Display Event Address
				htmlCode = '<SPAN class="SectionDetail"> <BR> ' + events[j][4] + ' </SPAN>';
		    		writeHTMLCode( htmlCode, 0 );

// Display Event City and State
				htmlCode = '<SPAN class="SectionDetail"> <BR> ' + events[j][5] + ' </SPAN>';
		    		writeHTMLCode( htmlCode, 0 );

// If there, display Event Miscellaneous
				if (events[j][6] == '')
                        { continue; }
                        else
                        {  htmlCode = '<BR> <a class="SectionLinkDoc" href="' + events[j][5] + '" target="' + events[j][6] + '">' + events[j][4] + '</a>';
				   writeHTMLCode( htmlCode, 0 );
                        }

			}
      	}
	}

// End Table

	htmlCode = '</td> </tr>';
      htmlCode += '</table>';
	writeHTMLCode( htmlCode, 0 );
      
}

/**************************************************************************
function displayBanner: Display Banner
**************************************************************************/

	function displayBanner( dispHTMLCode )
{
	var dispHTMLCode;
	var htmlCode, htmlCodeA, htmlCodeB, htmlCodeC, htmlCodeD, htmlCodeE, htmlCodeF, htmlCodeG, htmlCodeH;
	var pLineNo;

// Display Banner 

<!-- Table and Row Tags -->
    
	htmlCode  = '<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#CCCCCC" summary="Banner Table"> <tr>';
	writeHTMLCode( htmlCode, dispHTMLCode );

<!-- Column 1: SL21 Logo -->
    
	htmlCode  = '<td width="16%" align="center" valign="middle"> <img src="images/SL21_Logo.gif" width="125" height="125" vspace="5" alt="Logo"> </td>';
	writeHTMLCode( htmlCode, dispHTMLCode );

<!-- Column 2: Header and Motto -->
    
	htmlCode  = '<td class="ContentBanner" align="center"> <img src="images/Mission.gif" width="360" height="42" alt="Mission"> <br clear="all"> &nbsp; <br>';
      htmlCode += 'P r e s e r v i n g &nbsp; t h e &nbsp; H e a l t h &nbsp; a n d &nbsp; I n t e g r i t y &nbsp; o f &nbsp; O u r &nbsp; U n i o n </td>';
	writeHTMLCode( htmlCode, dispHTMLCode );

<!-- Column 3: Blank -->
    
	htmlCode  = '<td width="16%" align="center" valign="middle"> &nbsp; </td>';
	writeHTMLCode( htmlCode, dispHTMLCode );

<!-- Row and Table End Tags -->
    
	htmlCode  = '</tr> </table>';
	writeHTMLCode( htmlCode, dispHTMLCode );

}

/**************************************************************************
function displayBOP: Display Bottom of Page
**************************************************************************/

	function displayBOP( currPage, updatedDate, dispTOPLink, dispHTMLCode )
{
	var currPage;
	var dispHTMLCode;
	var dispTOPLink;
	var ending;
	var htmlCode;
	var j;
	var pageID;
	var updatedDate;

// alert ('displayBOP: currPage, updatedDate, dispTOPLink, dispHTMLCode = ' + currPage + ' ' + updatedDate + ' ' + dispTOPLink + ' ' + dispHTMLCode);

<!-- Blank Line and Top-of-Page Link -->

	if ( dispTOPLink == 1 )
	{  htmlCode = '<p> <a class="LinkTOP" href="#TOP">~ Top of Page ~</a> </p>';  }
	else
	{  htmlCode = '<p> &nbsp; </p>';  }
    writeHTMLCode( htmlCode, dispHTMLCode );
   
<!-- Bottom-of-Page Links -->

	for (j=0; j<=(noPages-1); j=j+1)
	{
	  if ((j == (noPages-1)))
	  {  ending = '<BR> ' } 
	  else 
	  {  ending = '<SPAN class="LinkBOP"> &nbsp; | &nbsp; </SPAN> '; }

        if (pageArr[j][4] == 0)
        { continue; }
        else
        {
	  {  if (pageArr[j][2] == currPage)
	     { 
             htmlCode = '<A class="LinkBOPCurr"> ' + pageArr[j][1] + '</A> ' + ending; 
             pageID = pageArr[j][0];
           }
	     else
	     { htmlCode = '<A class="' + pageArr[j][3] + '" href="' + pageArr[j][2] + '"> ' + pageArr[j][1] + '</A> ' + ending; }
// alert ('displayBOP: pageArr[j] = ' + pageArr[j]);
	  }

	  writeHTMLCode( htmlCode, dispHTMLCode);
        }
	}

<!-- RTV Credits -->

	htmlCode  = '<p>';
	htmlCode += '<table>';
	htmlCode += '<tr class="Content8" valign="middle">';
	htmlCode += '<td valign="top"> <img src="images/RTV_BOP_LucHw.gif" width="106" height="18" hspace="0"> </td>';
	htmlCode += '<td> &nbsp; | &nbsp; PO Box 2126, Hollister, CA 95024 &nbsp; | &nbsp; </td>';
	htmlCode += '<td> 831/630-1600 </td>';
	htmlCode += '</tr>';
	htmlCode += '</table>';
	htmlCode += '<br /> <span class="Content8">';
	htmlCode += '&#169; Copyright Red thru Violet, 2009 and Beyond &nbsp; | &nbsp;';
	htmlCode += 'Updated ' + updatedDate + ' &nbsp; | &nbsp; <span>';
	htmlCode += '<a class="LinkEmailGr" href="mailto:RTV@redthruviolet.com?subject=RTV_' + pageID + '">Email RTV</a>';
	htmlCode += '</span>';
	htmlCode += '</p>';
	writeHTMLCode( htmlCode, dispHTMLCode );

<!-- Blank Line -->

      htmlCode  = '<p> &nbsp; </p>';
      writeHTMLCode( htmlCode, dispHTMLCode );

}

/**************************************************************************
function displayTOPLinks: Display Top-of-Page Links 
**************************************************************************/

	function displayTOPLinks( currPage, dispHTMLCode )
{
	var linkEnding = '&nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp;';
	var currPage;
	var dispHTMLCode;
	var ending;
	var htmlCode;
	var j;
	var pageID;

// alert ('displayTOPLinks begin: currPage, dispHTMLCode = ' + currPage + ' ' + dispHTMLCode);

<!-- Top-of-Page Links -->

	htmlCode = '<tr align="center"> <td colspan="3" class="LinkBan" bgcolor="#333399">';
	writeHTMLCode( htmlCode, dispHTMLCode );

	for (j=0; j<=(noPages-1); j=j+1)
	{
        if (pageArr[j][4] == 0)
        { continue; }
        else
        {

	  if (j == (noPages)) 
	  {  ending = '' } 
	  else 
        {  ending = linkEnding; }

	  {  if (pageArr[j][2] == currPage)
	     { 
             htmlCode = '<span class="LinkBanCurr">' + pageArr[j][3] + ending + '</span>'; 
             pageID = pageArr[j][0];
           }
	     else
	     { htmlCode = '<a class="LinkBan" href="' + pageArr[j][2] + '">' + pageArr[j][1] + '</a>' + ending; }
// alert ('displayBOP: pageArr[j] = ' + pageArr[j]);
	  }

	  writeHTMLCode( htmlCode, dispHTMLCode);
        }
	}

	htmlCode = 'Other Pages Coming Soon </TD> </TR> ';
	writeHTMLCode( htmlCode, dispHTMLCode );

}

/**************************************************************************
function dispYAHBlock: Display You are Here Block
**************************************************************************/

	function dispYAHBlock( yahDest, dispHTMLCode )
{
	var dispHTMLCode;
	var htmlCodeA, htmlCodeB, htmlCodeC;
	var yahDest;

//  alert ('dispYAHBlock begin');

	htmlCode = '<TR> <TH width="19%" class="RecTitle"> Browse Sections </TH> <TD width="81%" valign="middle">';
	writeHTMLCode( htmlCode, dispHTMLCode );

	htmlCodeA = '<TABLE class="TabPage" width="100%" border="0" cellspacing="0" cellpadding="0" summary="You Are Here Table"> <TR>';
	htmlCodeB = '<TD class="YouAreHerePath"> &nbsp; You Are Here: Home --&gt; <SPAN class="YouAreHereLoc"> ' + yahDest + ' </SPAN> </TD>';
	htmlCodeC = '<TD align="center"> <IMG src="images/TL_WhatsNew.jpg" width="95" height="20" border="0" alt="What is New Link"> </TD>';
      htmlCode = htmlCodeA + htmlCodeB + htmlCodeC;
	writeHTMLCode( htmlCode, dispHTMLCode );

	htmlCodeA = '<TD align="center"> <IMG src="images/TL_OnSale.jpg" width="65" height="20" border="0" alt="On Sale Link"> </TD>';
	htmlCodeB = '<TD align="center"> <A href="http://cloud9sales.com/shopsite_sc/shopping_cart/order.cgi?storeid=*14c42e76ea5d509705460907&function=show">';
	htmlCodeC = '<IMG src="images/is_ViewCart.jpg" width="75" height="20" border="0" alt="View Cart Image"> </A> </TD> </TR> </TABLE>';
      htmlCode = htmlCodeA + htmlCodeB + htmlCodeC;
	writeHTMLCode( htmlCode, dispHTMLCode );
	
	htmlCode = '</TD> </TR>';
	writeHTMLCode( htmlCode, dispHTMLCode );

}

/**************************************************************************
function isEven: Return true if a number is even, otherwise, false
**************************************************************************/

	function isEven( number, display )
{
// Determine if input number is an even number

	var display;
	var number;
	var result = number % 2;

	if ( result ==0 )
	{ return true }
	else
	{ return false }

// Display result, if requested

	if ( display == 1 )
   	{ alert( "result = " + result ); }
		
}

/**************************************************************************
function popupEnlargedImg: Pop-up Enlarged Image
**************************************************************************/

function popupEnlargedImg ( pSName, prodName, imgFileName, imgWidth, imgHeight ) 
{

// Enhancement of an idea by Nic Wolfe (Nic@TimelapseProductions.com), http://fineline.xs.mw

var codeToWrite;
var day;
var enlargedImg ;
var htmlCode;
var id;
var imgFileName;
var imgHeight;
var imgTag;
var imgWidth;
var popupCode, imgCode, focusCode;
var prodName;
var pSName;
var windowWidth = 2*imgWidth;
var windowHeight = 2*imgHeight;
var windowObj;

// alert ('popupEnlargedImg: imgFileName, width, height = ' + imgFileName + ' ' + imgWidth + ' ' + imgHeight);
// alert ('popupEnlargedImg: windowWidth, windowHeight = ' + windowWidth + ' ' + windowHeight);

// enlargedImg = new Image (2*imgWidth, 2*imgHeight);
// enlargedImg.src = imgFileName;
// alert ('popupEnlargedImg: enlargedImg.src, .width, .height = ' + enlargedImg.src + ' ' + enlargedImg.width + ' ' + enlargedImg.height);

day = new Date();
id = day.getTime();
windowObj = "page" + id;
// alert ('popupEnlargedImg: windowObj = ' + windowObj );

// Open window

popupCode = windowObj + " = window.open('', '" + id + "', 'left=0, top=0, width=" + (3*imgWidth) + ", height="+ (3*imgHeight) + ", location=0, menubar=0, resizable=1, statusbar=1, scrollbars=0, titlebar=0, toolbar=0');";
// alert ('popupEnlargedImg: popupCode = ' + popupCode);
//eval("page" + id + " = window.open('', '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,resizable=1,width=500,height=500,left = 390,top = 262');");
eval(popupCode);

// Display enlarged image

htmlCode = '<HTML> <HEAD> <TITLE> CNS: ' + pSName + ' </TITLE> </HEAD> <BODY> <TABLE> ';
codeToWrite = windowObj + ".document.write (htmlCode);";
eval(codeToWrite);

htmlCode = '<TR> <TD width="20%"> &nbsp; </TD> <TH width="60%"> <IMG src="' + imgFileName + '" width="' + (2*imgWidth) + '" height="' + (2*imgHeight) + '" border="2"> </TH> <TD width="20%"> &nbsp; </TD> </TR>';
// alert ('popupEnlargedImg: htmlCode = ' + htmlCode);
imgCode = windowObj + ".document.write (htmlCode);";
// alert ('popupEnlargedImg: imgCode: ' + imgCode);
eval(imgCode);
//eval (windowObj);

htmlCode = '<TR> <TD> &nbsp; </TD> <TH> <FONT face="Arial, sans-serif" color="#333366" size="2"> <BR> <B> ' + prodName + ' </B> </FONT> </TH> <TD> &nbsp; </TD> </TR> </TABLE> </BODY> </HTML>';
// alert ('popupEnlargedImg: htmlCode = ' + htmlCode);
imgTitleCode = windowObj + ".document.write (htmlCode);";
// alert ('popupEnlargedImg: imgTitleCode: ' + imgTitleCode);
eval(imgTitleCode);
//eval (windowObj);

// Place window on top

focusCode = windowObj + ".focus()";
eval(focusCode);

// windowObj.document.write ('</TABLE> </BODY> </HTML>');
closeCode = windowObj + ".document.close()";
eval(closeCode);

}

/**************************************************************************
function showProps: Display the values of all properties of an object,
                    25 at a time
**************************************************************************/

	function showProps( obj, objName )
{
      var count = 0;
	var count25 = 0;
	var i;
	var obj;
	var objName;
	var result = "";

      for (var i in obj)
      {  result += count + ": " + objName + "." + i + " = " + obj[i] + "\n";
         count++;
	   count25++;
         if (count25 == 25)
         {  alert (result);
            result = "";
            count25 = 0;
         }
      }
	alert (result);
}

/**************************************************************************
function writeHTMLCode: Write the HTML code to the document
**************************************************************************/

	function writeHTMLCode( htmlCode, display )
{
	var display;

// Display code, if requested

      if ( display >= 1 )
      { alert ('writeHTMLCode: htmlCode = ' + htmlCode) } 
       
// Display object properties, if requested

      if ( display == 2 )
      {  alert ('navigator.appVersion, 1stchar =' + navigator.appVersion + navigator.appVersion.charAt(0));
	   alert ('self.location.href = ' + self.location.href);
	   alert ('parent.location.href = ' + parent.location.href);
	   alert ('window.location.href = ' + window.location.href);
	   alert ('window.name = ' + window.name);
         showProps(navigator, 'navigator');
// Note: NS 7.0 (and maybe IE 6.0) crashes when trying to show window property
	   showProps(window, 'window');               
//         showProps(document, 'document');
// alert ('writeHTMLCode: Before comments');
/** This causes a crash of the javascript, in NS 6.1, also IE 6.0 (Content is undefined)
         if (navigator.appName == "Netscape" && navigator.appVersion.charAt(0) >= '5')
         { showProps(Content, 'Content'); }
**/
         if ( NS_LT5 == 1 )
         { showProps(document.Content, 'document.Content'); }
//         if (navigator.appName == "Microsoft Internet Explorer")
//         { showProps(ProdTab, 'ProdTab'); }
      }
	 
//Write HTML code to the document (use special form for Netscape Version < 5

	if ( NS_LT5 == 1 )  
      {  window.document.Content.document.write( htmlCode); }
      else
	{  // if ( display >= 1 ) { alert ('writeHTMLCode: Before win.doc.wr') }
	   window.document.write( htmlCode);
	   // if ( display >= 1 ) { alert ('writeHTMLCode: After win.doc.wr') } 
	}

// Display code, if requested

//      if ( display >= 1 )
//      { alert ('writeHTMLCode: Exit') } 
       
}

/**************************************************************************
function doNothing: Do Nothing
**************************************************************************/

	function doNothing(  )
{
	alert ('We have hit function doNothing');
//	return true;
}

/**************************************************************************
function initPageArr: Initialize Page Array
**************************************************************************/

	function initPageArr(  )
{
 alert ('initPageArr: Begin');
	pageArr = new Array( noPages );

	pageArr[0]  = new Array('HP',     'Home Page',             'index.htm',             1);
	pageArr[1]  = new Array('Pet',    'Petition',              'petition.htm',          1);

 alert ('initPageArr: End');
}

/**************************************************************************
function displayLCol: Display Left Column
**************************************************************************/

	function displayLCol( dispHTMLCode )
{
	var dispHTMLCode;
//     alert ('displayLCol: Begin');
/*
	<table width="100%" border="0" cellspacing="0" cellpadding="0" summary="Content Title and Detail Table">
        <tr> <td colspan="2" align="left"><img src="images/spacer.gif" width="1" height="10" align="left" border="0" alt="Spacer gif"></td> </tr>
        <tr> 
          <th class="PageSubtitle" align="left"> How to Help </th> 
          <td class="LinkTOP" align="right"> [ <a class="LinkTOP" href="#TOP"> Top of Page </a> ] </td> 
        </tr>
        <tr> <td colspan="2" align="left"><img src="images/spacer.gif" width="1" height="10" align="left" border="0" alt="Spacer gif"></td> </tr>
        <tr>      
          <td colspan="2" class="Content" align="left">
            <ul>
              <li class="Content"> Communicate with colleagues <br /> &nbsp; </li>
              <li class="Content"> Spread the word about SAVE LOCAL 21's Web Site at http://www.savelocal21.org <br /> &nbsp; </li>
              <li class="Content">  <span class="ContentEmB">Volunteer</span> for SAVE LOCAL 21 - Send your Name, Chapter, Place of Work, and Email Address to 
                   <a class="LinkDoc" href="mailto:dnovo@comcast.net?subject=SL21_HomeVolunteer">SAVE LOCAL 21</a> 
              </li>
            </ul>
          </td>
        </tr>
      </table>
*/
// Start Table

	htmlCode = '<table border="0" cellspacing="5" cellpadding="3" summary="LCol Table">';
      htmlCode += '<tr> <td class="SectionDetail" align="center"><a name="LCol"></a>';
	writeHTMLCode( htmlCode, 0 );

// Display Heading

	htmlCode = '<span class="SectionTitle">H O W &nbsp; t o &nbsp; H E L P</span> <br> &nbsp; <br>';
	writeHTMLCode( htmlCode, 0 );

// Display Left Column

      htmlCode = '<span class="SectionDetailEm">1. &nbsp; Communicate</span> <br> with colleagues <br> &nbsp; <br>';
	writeHTMLCode( htmlCode, 0 );

      htmlCode = '<span class="SectionDetailEm">2. &nbsp; Spread the word</span> <br> about SAVE LOCAL 21s <br> Web Site at http://www.savelocal21.org <br> &nbsp; <br>';
	writeHTMLCode( htmlCode, 0 );

      htmlCode = '<span class="SectionDetailEm">3. &nbsp; Volunteer</span> <br> for SAVE LOCAL 21 -  <br>Send your Name, Chapter, Place of Work, and <br> Email Address to <br> <a class="LinkDoc" href="mailto:dnovo@comcast.net?subject=SL21_HomeVolunteer">SAVE LOCAL 21</a> <br> &nbsp; <br>';
	writeHTMLCode( htmlCode, 0 );

// End Table

	htmlCode = '</td> </tr>';
      htmlCode += '</table>';
	writeHTMLCode( htmlCode, 0 );
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}