//<script type="text/javascript">

// ------ Start - Set Global Variables, used for multiple functions ---------------
// find name of current page (Global Variables available to all functions - becasue declared outside of Fn)
	var sPath = window.location.pathname;
	var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);		// Actual file name of current page

// ------ End - Set Global Variables, used for multiple functions ---------------

// ------ SetBullet function ----------------------------------------------
/*    Set Menu Bullet for the current page on the Level 1 menus

	In the HTML document, add the following before the text in each Menu link:
	<script type="text/javascript">SetBullet("mylink.html")</script>

	Then change the "mylink.html" in the example to the name of the page to which the link is destined.
	
*/

	function SetBullet(ThisLink) //Can add parameters here
	{
				if (ThisLink==sPage)		// If the passed in page (ThisLink) = the actual current page (sPage)
				  { 
				  document.write('<span class="MenuBulletColor">&nbsp;&#8226;&nbsp;</span>'); 
				  }
				  else
				  {
				  document.write('&nbsp;&nbsp;&nbsp;&nbsp;'); 
//				  document.write('<img src=../Images/spacer.gif width="13" height="0" border="0" class="NoBorder" />'); 
				  }
	}
// ------ End of SetBullet function ----------------------------------------------

// ------ Start of FindCurrSect function ----------------------------------------------
// Used to identify the current section on top-level menus - and highlight when this page is in that section
/* Each page contains the following script:
		<script type="text/javascript">
			var BelongsToSection = "About ESI";		// The major menu section to which this page belongs.
		</script>
	The BelongsToSection variable is to idenfity which section should be highlighted when the page is displayed.

	Each top-level menu item then contains (example for the About ESI section):
	  <script type="text/javascript">FindCurrentSect("ABOUT ESI")</script>ABOUT ESI<script type="text/javascript">FindCurrentSectEnd()</script>
*/
	function FindCurrentSect(ThisLink) //Parameter comes from calling the program = name of the current section
	{
				if (ThisLink==BelongsToSection)		// If the passed in page (ThisLink) = the actual current section
				  { 
				  document.write('<span class="MenuSectionColor">'); 
				  }
				  else
				  {
				  document.write('<span>'); 
 
				  }
	}
	
	function FindCurrentSectEnd() //No parameters needed - simply adds the end of the Span
	{
				  document.write('</span>'); 
	}
// ------ End of FindCurrSect function ----------------------------------------------



// ------ Start FilterSiteMapDB function -----------------------------------------
// Used with the XML Site List database:  
// Filter out all rows that don't have a path that contain the current page file name
var FilterSiteMapDB = function(dataSet, row, rowNumber)
{
	if (row["PageID"].search(sPage) != -1)	// PageID is the XML column name ... sPage = the varable that contains the current page name
		return row; // Return the row to keep it in the data set.
	return null; // Return null to remove the row from the data set.
}

// ------ End FilterSiteMapDB function -----------------------------------------



// ------ Start GoogleAnalytics function

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-18763372-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

// ------ End GoogleAnalytics fuction ------------------------------------------





/*    OLD Approach

//  NOTE: In each page, you need the following line, but replace with the file name:
//		var  currentPage = "Work3-VariableCSS.html";

var  currentPage = "Work3-VariableCSS.html";		// <<< For EVERY page - Need to enter the current Page name here

var PgNbr = location.href.indexOf(currentPage);				// Find the current Page # (-1 if not found, else shows position in the URL string ... >0


function SetBullet() //Can add parameters here
{
            if (PgNbr > 0)
			  { 
			  document.write('<span class="MenuBulletColor">•  </span>'); 
			  }
              else
              {
			  document.write("    "); 
			  }

<!--End of SetBullet Function-->
}
*/
/* </script> */

