<!-- Included from most of my web pages via Header.php or Header1.php -->
<!-- Copyright Adam's Computing 2003. Web designer: Hal Adam -->
<!-- NO, this JavaScript did NOT evolve over eons of time from -->
<!-- some supposed primodial alphabet soup, it took a designer.  :) -->
<!-- Comment out for Browsers which do NOT support Scripting 
window.status = "Welcome to my Web Site.";
// Determine which compatible browser version is being used by checking for which 
// DOM  object is unique or missing.
var ns4 = (document.layers);
var ie4 = (document.all && !document.getElementById);
var ie5 = (document.all && document.getElementById);
var ns6 = (!document.all && document.getElementById);

// This function checks for Netscape Navigator access to our web pages.
// This checking is only used by my web pages which use ActiveX controls
// since Netscape normally does not support them.
// Use this function like this: <body onload="NavigatorUsed()">

function NavigatorUsed(Netscape)
  {
   if (ns4 || ns6)
      {
// Netscape Navigator and/or Mozilla Firefox appear to not be able allow an
// element(tag)'s value to be replaced dynamically 
// thus use this alert message box pop up instead... ugly but it works.
      alert("Since you are using a Netscape family of browser, then unless you have purchased a special plugin for ActiveX controls, then those features using activeX controls will not work.  For example, any table being displayed will not contain any data.  There may also be other formating and display problems.  It is HIGHLY recommended that you use Microsoft Internet Explorer to display these web pages.  Please click on 'Help' in the top right hand corner of this window for more information.");
//   document.all[Netscape].innerHTML = "Since you are using Netscape, then unless you have a plugin installed for ActiveX controls, then those features using activeX controls will not work.  For example, any table being displayed will not contain any data.";
      }
  }

// This function displays or hides a sub menu   
function ShowSubMenu(object,show,SubMenuClass)
  {
  // childNodes.length returns the number of children of the specified object,
  // eg. if called from the <div class="ShowSubMenu"> element then childNodes
  // is an array containing the number of children ojbects of this <div>.
  // Loop through childNodes array .
  for (var x = 0; x < object.childNodes.length; x = x + 1)
   {var child = object.childNodes[x];
  // Info source: http://www.zytrax.com/tech/dom/nodetype.html
  // DOM-2 nodeType attribute with value 1 is an ELEMENT_NODE type.
   if (child.nodeType == 1) // If this is an ELEMENT_NODE then 
      {if (child.className == SubMenuClass) // if the className is a submenu class        
          {if (show == true) // if true then set the CSS visiblity property
              {child.style.visibility = "visible";} // to visible 
           else {child.style.visibility = "hidden";} // else set to hidden
          } 
      }
   }
}

// This function to get Month and Day  
// can pass 3 integer parms as year, month, day or 6 parms as yyy,mm,dd,hh,mm,ss
// Without parms we get today's date.
function DisplayDate()
  {
   var dateObject = new Date();
   var monthNumber = dateObject.getMonth();
   var dateNumber = dateObject.getDate();
   var dayNumber = dateObject.getDay();
   var month = "";
   var date = dateNumber;
   var day = "";

   switch (monthNumber)
    {
     case 0: 
     month = "Jan."
     break
     
     case 1: 
     month = "Feb."
     break
     
     case 2: 
     month = "Mar."
     break
     
     case 3: 
     month = "Apr."
     break
     
     case 4: 
     month = "May"
     break
  
     case 5: 
     month = "June"
     break 
     
     case 6: 
     month = "July"
     break			
  
     case 7: 
     month = "Aug."
     break
  
     case 8: 
     month = "Sep."
     break 
     
     case 9: 
     month = "Oct."
     break
     
     case 10: 
     month = "Nov."
     break
  
     case 11: 
     month = "Dec."
     break
  
     default: alert("Invalid month returned by variable monthNum")
     };  // end, switch monthNumber
   
   switch (dayNumber)
    {
     case 0: 
     day = "Sunday,"
     break
     
     case 1: 
     day = "Monday,"
     break
  
     case 2: 
     day = "Tuesday,"
     break
     
     case 3: 
     day = "Wednesday,"
     break
   
     case 4: 
     day = "Thursday,"
     break
  
     case 5: 
     day = "Friday,"
     break 
  
     case 6: 
     day = "Saturday,"
     break			
  
     default: alert("Invalid Day returned by variable dayNum")
    }; // End Switch, dayNumber 
window.document.write(" " + day + " " + month + " " + date);
}

// Define Global variables.  Set Default Selection since OnChange Event does NOT
// get triggered by initial selection.
var Selection, URL ="index.php";
// create array object containing URL addresses to be associated with
// the SELECT OPTIONs.
var URLs = new Array(
    "index.php",
    "HalAdam.php",
    "MarieAdam.php",
    "MichelleAdam.php",
    "LisaAdam.php",
    "SonyaAdam.php",
    "KatheAdam.php",
    "YogiDogAdam.php",
    "PatchesCatAdam.php",
    "AdamsComputing.php",
    "http://prolife.ca/",
    "http://ShawniganAlliance.org/",
    "Smile.php",
    "Why.php",
    "How.php",
    "WhichJesus.php",
    "http://www.tyndale.cam.ac.uk/Scriptures/",
    "http://www.biblegateway.com/",
    "http://www.rbc.org/odb/odb.shtml",
    "http://home.earthlink.net/~ronrhodes/",
    "jwcourse.php",
    "HurricaneRidgeAnnouncement.php",
    "HurricaneRidgeFinishers.php",
    "HurricaneRidgeRides.php",
    "TourDeFarceWhatIsIt.php",
    "TourDeFarceRides.php",
    "MountainPasses.php",
    "MustReading.php",
    "Periodicals.php",
    "Other.php",
    "Points2Pixels.php",
    "EmbeddedFonts.php",
    "PrintCurrentWebPage.php",
    "ToolTips.php",
    "Conversions.php",
    "bookmarks.htm",
    "InYourMonitor.php",
    "ScreenCleaner.php",
    "PenguinBall.php",
    "VictoriaHarbour.htm",
    "BirthdayCelebration.php",
    "HappyNewYear.php",
    "LargerText.php",
    "AdvancedSearch.php");

// This function gets executed when the LISTBOX changes
function ProcessSelection(selection) {
	var SelectedIndex;
//      get index of option array object
	SelectedIndex = selection.selectedIndex;
//      get text associated with this index
	Selection = selection.options[SelectedIndex].text
//      get URL array element associated with this index
      URL = URLs[SelectedIndex];
        }

// This funciton gets executed when button1 next to the pull down list gets clicked on.
function GoTo() {
window.location.href = URL;
	}

// Function to display a popup Window if user presses "Web Page Stats" button
function DisplayStats()
{
// Open a new window and write HTML to the new Window.  all options default to no.  I have included them in case I want to turn any on in the future.
NewWindow = window.open("","StatsWindow","width=640,height=480,dependent=yes,screenX=0,screenY=0,toolbar=no,menubar=no,scrollbars=no,resizable=yes,location=no,directories=no,status=no"); 
NewWindow.document.write("<html><head><title>PopUp for Statistics</title><link rel='stylesheet' title='Pop Up Style Sheet' href='CSSs/Common.css' type='text/css' /></head><body style='font-size:100%;'><div class='Center'><a href='http://www.icra.org/labelv02.html'><img class='NoBorder' src='gifsa/icra_usay.gif' width='88' height='31' alt='Click here to goto the Internet Content Rating Association' /></a></div><p>This Web page was displayed by Web Browser " + navigator.appVersion + ".</p><p>The Web page Title is '" + document.title + "'.&nbsp;&nbsp;</p><p>There have been " + webPageCount + " accesses to this web page.</p><p>This web page was last modified on " + documentLastModified + " and is being accessed by " + localIPaddr + " from web server at " + webServerIPaddr + " and was previously accessed by " + webServerIPaddrPrev + ".</p><p>This web page was displayed from " + document.location + " using protocol '" + location.protocol + "'&nbsp;&nbsp;There are " + document.links.length + " links, " + document.forms.length + " forms, " + document.plugins.length + " plugins, " + document.getElementsByTagName("Object").length + " objects and " + document.images.length + " images on this web page.</p><p>You used a screen resolution of " + screen.width + " by " + screen.height + " by " + screen.colorDepth + " bit color to view this web page.</p><p>This web site is best viewed using Microsoft Internet Explorer 4.0 or higher and with a screen resolution of 800 by 600 by 8 bits or higher.</p><p class='Center'><img class='NoBorder' src='gifs/HalAdamLogo.gif' width='16' height='16' alt='Hals logo' /><span class='Smaller'>&nbsp;Entire contents Copyright &copy 2003 by <a href='http://HalAdam.name/'>Adam's Computing.</a>&reg;&nbsp;&nbsp;All rights reserved.&nbsp;&nbsp;None of this material may be used for any financial gain without our permission.</span></p><form name='CW'><p class='Center'><input class='button' type='button' value='Close Window' onClick='window.close();'></p></form></body></html>");
}
// End of Javascript commenting for Non-Scripting enabled Browsers -->

