Mississauga Majors 2008 2008 
 AAA Baseball : Major Midget : Grey Team Major Midget: Grey Team 
Help 

Site Documentation

This provides information about this team site that is helpful in maintaining it:

Note: this page was created only to help the designer maintain the site, but it is worded in such a way that the naïve reader might wrongly believe that this page and the code used to implement this site is in the public domain. Readers are reminded that this site, including this documentation, is protected by copyright laws, as delineated in this site’s Legal Issues page.

Relationship to Other Team Sites 

This is one of many team sites created for Mississauga Majors baseball teams. It is also the first team site using a new design created for the 2008 season, i.e. the design referred to as “Style 2008”. Any other team sites created using this new design will be modified from this site. Style 2008 was adapted from an earlier design, “Style 2007”, so is similar in many ways, and indeed even shares some files with those sites, e.g. the image files in directory img/; see the site map below for details.

Dependency on JavaScript 

JavaScript must be enabled for the site to work with Internet Explorer 5 and 6.

JavaScript must be enabled for pages on the site which have information from the schedule.

Site Locations 

This team site appears at the following locations:

  • On Development PC:

    C:\Documents and Settings\chuck\My Documents\Chuck\Web\upsdell\mmba\2008\MajorMidget\

  • On the Internet:

    http://www.upsdell.com/mmba/2008/MajorMidget/

Note: the team site is deemed to be at the above locations because that is where its home page is, however, the site shares some files in its parent directories with other team sites, and will not work without those files. Refer to the site map for a comprehensive list of all the files needed for the site to work.

Site Map 

This is a site map. Wildcard characters in filenames are used to identify sets of similar files where there is no need to enumerate each file. There are links for any files for which further information is available.

  • /mmba/: directory for all my Majors team sites:

    • 2008/: files for the 2008 team sites:
      • calendar2004.css: CSS for the /mmba/js/cCalendar*.js files for all 2008 sites with Style 2004.
      • calendar2007.css: CSS for the /mmba/js/cCalendar*.js files for all 2008 sites with Style 2007.
      • calendar2008.css: CSS for the /mmba/js/cCalendar*.js files for all 2008 sites with Style 2008.
      • common.js: JavaScript common to all 2008 sites.
      • img2004/*.*: image files common to all 2008 sites with Style 2004.
      • img2007/*.*: image files common to all 2008 sites with Style 2007.
      • img2008/*.*: image files common to all 2008 sites with Style 2008.
      • MajorMidget/: directory with files for the 2007 Major Midget site:
        • cal_config.js: JavaScript configuring the calendar controlled using /mmba/js/cCalendar*.js.
        • cal_events.js: JavaScript setting events for the calendar controlled using /mmba/js/cCalendar*.js.
        • cal_games.js: JavaScript setting games for the calendar controlled using /mmba/js/cCalendar*.js.
        • calendar.htm: calendar of events, including the game schedule, in calendar format.
        • contacts.htm: how to contact the coaches and the webmaster.
        • doc/*.*: document files specific to this site.
        • documentation.htm: this file.
        • games.htm: game schedule in a tabular format.
        • help.htm: help about using this site, plus a link to the Confidential Information page.
        • img/*.*: image files specific to this site. Note: map image files are put instead in map/.
        • index.htm: home page / news page.
        • lock/: directory with password protected files:
          • confidential.htm: confidential information.
        • map/*.*: map images specific to this site.
        • script.js: JavaScript common to all pages for this site.
        • sponsors.htm: information for and about the sponsors.
        • sr_*.htm: special reports, e.g. the reports for tournaments.
        • team.htm: information about the team.
        • zzz_template.htm: template for HTML files in this directory; this is never uploaded to the server.
      • schedule.js: JavaScript adding schedule items which are the same for all teams, for the calendar controlled using cCalendar.js.
      • style2004.css: CSS common to all 2008 sites with Style 2004.
      • style2007.css: CSS common to all 2008 sites with Style 2007.
      • style2008.css: CSS common to all 2008 sites with Style 2008.
      • style2008doc.css: CSS for this documentation.
      • + other files not specifically relevant to this site.
    • img2004/*.*: image files common to all Style 2004 team sites.
    • img2007/*.*: image files specific to Style 2007 team sites.
    • img2008/*.*: image files specific to Style 2008 team sites.
    • info/*.*: files used in developing sites; these files are not needed for the site to work, so are never uploaded to the server.
    • js/: JavaScript files for managing calendars / schedules:
      • cCalendar.js: code common to all sites with a JavaScript controlled calendar.
      • cCalendar_ca.js: code needed by cCalendar.js only for pages with a calendar.
      • cCalendar_dm.js: code needed by cCalendar.js only for pages dumping calendar information for troubleshooting purposes.
      • cCalendar_gs.js: code needed by cCalendar.js only for pages with lists of games and results.
      • cCalendar_nu.js: code needed by cCalendar.js only for pages with news and upcoming events.
      • cCalendar_nu2.js: code needed by cCalendar_nu.js only for news pages where descriptions of victories use randomly generated descriptive phrases.
      • cCalendar_ts.js: code needed by cCalendar.js only for pages with specific tournament schedules and results.
      • cCalendarArg.js: code needed by cCalendar.js only for pages where arguments to the URL must be parsed.
      • cTable.js: standard module for managing tabular data.
      • cTime.js: standard module for managing strings containing times.
      • gallery.js: standard module for managing photo galleries.
      • locations.js: module using cTable.js to create a table of locations where games may be played.
      • mEventLocation.js: module extending cTable.js to add methods for dealing with locations.
      • mTeamHome.js: module extending cTable.js to add methods for dealing with team home diamonds.
      • mTeamNames.js: module extending cTable.js to add methods for dealing with team names.
      • teamnames.js: module using cTable.js to create a table of teams with which the team may play.
    • map/*.*: map files common to all team sites.
    • style2007_ie50.css: CSS for IE 5.0 with all Style 2007 and 2008 team sites.
    • style2007_ie5x.css: CSS for IE 5.x with all Style 2007 and 2008 team sites.
    • style2007_ie60.css: CSS for IE 6.0 with all Style 2007 and 2008 team sites.
    • style2007_ie70.css: CSS for IE 7.0 with all Style 2007 and 2008 team sites.
    • + other files not specifically relevant to this site.

Additional Information for Specific Files 

This section presents important details about specific files.

Note: several JavaScript functions insert content after a page has been loaded. These functions are typically called after each page is loaded, but because each function takes an HTML ID as an argument, and does nothing if that ID is not found, the function does nothing on most pages: only if a tag with the ID is found on a page does the function insert its content.

File /mmba/js/cCalendar*.js 

This has JavaScript common to all team sites with a JavaScript controlled calendar.

This was adapted from the cCalendar.js initially developed for the 2007 Toronto Titans concept site.

File /mmba/2008/common.js 

This has JavaScript included by all 2008 team pages. This code includes:

  • The standard cBrowser class from my personal software library

  • myEnablePhotos( id )

    This function enables (displays) a menuitem in the vertical menubar which is a link to a page with a photo gallery. This assumes that the menuitem exists, but by default is not displayed because the gallery works only when JavaScript is enabled. This function is called from within myOnLoad(), and therefore makes the menuitem appear only if JavaScript is enabled. Details:

    • Argument id: the HTML id of a non-displayed LI tag that contains a link to the Photo page.
    • Returns: nothing.
  • The standard cVersion() class from my personal software library

  • myBrowser

    This is a variable of class cBrowser, instantiated with information about the user’s browser.

  • myInsertPhoto( pathname, id )

    This inserts a photo within an HTML tag with the specified HTML id. The intent is that this function be called as the onclick event for a tag, so that clicking on the content of the tag (typically a thumbnail of a photo) results in the insertion of a photo elsewhere (typically an enlargement of the photo). Details:

    • Argument pathname: a string containing the pathname to the photo.
    • Argument id: a string with the ID; the default is 'ins_enlargement'.
    • Returns: true if the id was not found; false if it was found.
  • The standard startList() function from my personal software library

  • The standard getElement() function from my personal software library

  • myGraphResults( wins, losses, ties, reg_games, exhib_left, tour_left )

    This function saves the data for the season record bar graphs. The first time this function is called on a page, the data must be for the regular games only; the second time this function is called on a page, the data must be for all games, including regular, exhibition, and tournament games; this function could be called more than twice from a page in order to save data for more than two bar graphs, but this capability is not being used. Details:

    • Argument wins: number of wins.
    • Argument losses: number of losses.
    • Argument ties: number of ties.
    • Argument reg_games: total number of regular games, played and unplayed.
    • Argument exhib_left: if saving the data for the regular games, this and following arguments are not needed, but if this argument is present, it is the number of the remaining unscheduled postponed games. If saving the data for all the games, this argument is the number of scheduled unplayed exhibition games.
    • Argument tour_left: if saving the data for all the games, this is the number of upcoming tournaments. By default this function assumes that about 3 games will be played in each upcoming tournament.
    • Returns: nothing, but the data are saved in the array Graph[].
  • myGraphShow( id, nGraph )

    This function inserts a bar graph for the season record on a page set up for the graph, using the information previously saved using myGraphResults(). Details:

    • Argument id: a string with the ID of the tag where the HTML for the graph will be inserted.
    • Argument nGraph: the number of the graph, 0 for regular games, and 1 for all games.
    • Returns: nothing.
  • The standard myScrollToAnchor() function from my personal software library

  • The standard myScrollTo() function from my personal software library

File /mmba/js/gallery.js 

This has JavaScript included by all team pages which have photo galleries. This is referred to as class cFilm in my personal software library.

File /mmba/2008/MajorMidget/script.js 

This has JavaScript used by this team site only. This code includes:

  • myOnLoad( nTimeLimit )

    This is a function that runs after any page is loaded, e.g. to do things like inserting any dynamic HTML. Details:

    • Argument nTimeLimit: this is the load time, in milliseconds, below which it is assumed that the user has a high speed Internet connection; the default is 5000, for 5 seconds. If this argument is used, it is used to decide whether to insert content suitable only for someone with a high speed connection.
    • Returns: nothing.
  • myInsertDate( ed )

    This is a function that inserts the current date. Details:

    • Argument ed: a string with the ID of the tag where the HTML for the date will be inserted; the default is 'ins_date'. If the ID is not found on the page, this function does nothing.
    • Returns: nothing.

File /mmba/2008/MajorMidget/sr_*.htm 

Files named sr_*.htm are, by convention, pages with special reports. E.g. sr_us_wv.htm is for a special report regarding a tournament in West Virginia, the Beast of the East tournament. The specific name of such a file is arbitrary, but is typically chosen to include the location or subject of the thing being reported.