// Calculate the current Year and store it in a variable for use in the copyright
var vYear = new Date().getFullYear();


// -----------------------------------------------------
// BUILDS THE NAVIGATION
// -----------------------------------------------------
function buildNavigation()
			{
			// Store the current page name in a variable via a function
			var currentPage = GrabPageName();
			var navTab = new Array();
			// Loop through the length of the sections
			for (i=1; i<=(section.length - 1); i++)
				{
				// If "i" is found, at the beginning of the current page name, and its the first name, print home image
				// This is because "index.html" must be used for this file name for auto locating.
				if ( currentPage.charAt(0) == "i" && i == 1)
					{
					navTab[i] = ('<img src="img/interface/nav/1_nav_on.gif">');
					found = "yes"
					}
				// else if i is equal to 1 write the link to "index.html"
				else if ( i == 1 )
					{
					navTab[i] = ('<a href="index.html"><img border="0" src="img/interface/nav/1_nav_off.gif"></a>');
					}
				// else if the first character (a  number) of the current page variable is equal to i, write the on gif.
				else if ( currentPage.charAt(0) == i && section[i].charAt(0) != "-" )
					{
					navTab[i] = ('<img src="img/interface/nav/' + i + '_nav_on.gif">');
					}
				// If all else fails, write the nav tab as off and as a link.
				else if ( section[i].charAt(0) != "-" )
					{
					navTab[i] = ('<a href="' + i + '_index.html"><img border="0" src="img/interface/nav/' + i + '_nav_off.gif"></a>');
					}
				}

				// Home
				document.write(navTab[1]);

				// About Us
				document.write(navTab[2]);

				// Consulting
				document.write(navTab[3]);

				// Software Development
				document.write(navTab[6]);

				// Hosting
				document.write(navTab[5]);

				// Field Service
				document.write(navTab[4]);

				// Contact
				document.write(navTab[8]);
			}

function buildNavigationLegacy()
			{
			// Store the current page name in a variable via a function
			var currentPage = GrabPageName();
			// Loop through the length of the sections
			for (i=1; i<=(section.length - 1); i++)
				{
				// If "i" is found, at the beginning of the current page name, and its the first name, print home image
				// This is because "index.html" must be used for this file name for auto locating.
				if ( currentPage.charAt(0) == "i" && i == 1)
					{
					document.write('<img src="img/interface/nav/1_nav_on.gif">');
					found = "yes"
					}
				// else if i is equal to 1 write the link to "index.html"
				else if ( i == 1 )
					{
					document.write('<a href="index.html"><img border="0" src="img/interface/nav/1_nav_off.gif"></a>');
					}
				// else if the first character (a  number) of the current page variable is equal to i, write the on gif.
				else if ( currentPage.charAt(0) == i && section[i].charAt(0) != "-" )
					{
					document.write('<img src="img/interface/nav/' + i + '_nav_on.gif">');
					}
				// If all else fails, write the nav tab as off and as a link.
				else if ( section[i].charAt(0) != "-" )
					{
					document.write('<a href="' + i + '_index.html"><img border="0" src="img/interface/nav/' + i + '_nav_off.gif"></a>');
					}
				}
			}
			
			
// -------------------------------------------------------
// GRABS THE PAGE NAME
// -------------------------------------------------------
function GrabPageName() 
			{
			// Grab page from URL
			var URL = window.location;
			// Put the URL in an invisible field
			document.invisibleForm.invisibleField.value = URL;
			// Set a varibale to the value of the invisible field
			var grabbedURL	= document.invisibleForm.invisibleField.value;
			// Pull the current page from the variable and store it variable for use in nav builder.
			var vCurrentPage = grabbedURL.slice( (grabbedURL.lastIndexOf("/")+1) , grabbedURL.length );
			return vCurrentPage;
			}


// -------------------------------------------------------
// PRELOADS THE IMAGES
// -------------------------------------------------------
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];}}
}

// -------------------------------------------------------
// NETSCAPE RELOAD FIX
// -------------------------------------------------------
<!-- 
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->