//<![CDATA[
<!-- Included from most SAC web pages via PHP variable $JScriptCommon and Header1.php -->
<!-- Copyright Adam's Computing 2006. 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 the Shawnigan Alliance Church Web Site.  May the Lord Bless You";
// 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);

// Enlarge SAC logo image function.  image1 is the id of the image to be enlarged
function EnlargeImage()
  {// leave recursive function call if image1 width is 480 or greater
   if (ns4 || ns6)
      {
       if (document.image1.width < 480) 
          {// redisplay Window for 100 milliseconds ? and recusively call this function again
          var x = window.setTimeout('EnlargeImage()',100);
          // increment SAC logo width and height
          document.image1.width = document.image1.width + 48;
          document.image1.height = document.image1.height + 5;
          }
      }
    else {
          if (image1.width < 480) 
             {// redisplay Window for 100 milliseconds ? and recusively call this function again
             var x = window.setTimeout('EnlargeImage()',100);
             // increment SAC logo width and height
             image1.width = image1.width + 48;
             image1.height = image1.height + 5;
             }
         }
   }

// This function checks for a Netscape family browser.
// This checking is only used by my web pages which use ActiveX controls
// since the Netscape family normally does not support them.

function NavigatorUsed()
  {
   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 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);
}
    
// 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=460,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><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 was accessed by " + 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 1998 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 -->
//]]>
