// FILE: published.js
// GOAL: To identify current publishing attributes
// WHO:  Bradley Roberts

// Set the following attributes for each edition in turn:
var copyright_year = "2008";
var current_edition = "4";
var as_of_date = "06/09/2008";
var webmaster_name = "Jason Koskey";
var webmaster_id = "webmaster";
var webmaster_domain = "pack985.org";
var webmaster_phone = "";
var cubmaster_name = "Greg Losh";
var cubmaster_id = "cubmaster";
var cubmaster_domain = "pack985.org";
var cubmaster_phone = "(678)366-1342";
var asst_master_name = "Lance Ledbetter";
var asst_master_id = "asst_cubmaster";
var asst_master_domain = "pack985.org";
var asst_master_phone = "(770)640-9640";

// The following functions use the information above to display
// various items on a page. You should not have to change these.

//////////////////////////////////////////////////////////////////
// FUNCTION: show_copyright()
// GOAL:     To show the copyright notice on a particular page
// USE:      Just call this as follows where needed:
//              <SCRIPT><!-- Hidden from some browsers
//              show_copyright();
//              // End --></SCRIPT>
//////////////////////////////////////////////////////////////////
function show_copyright()
{
    document.write('&copy; ' + copyright_year + ' Pack 985 of the Cub Scouts of America');
}

//////////////////////////////////////////////////////////////////
// FUNCTION: show_volume()
// GOAL:     To show the volume number on the page
// USE:      Just call this as follows where needed:
//              <SCRIPT><!-- Hidden from some browsers
//              show_volume();
//              // End --></SCRIPT>
//////////////////////////////////////////////////////////////////
function show_volume()
{
    document.write(copyright_year);
}

//////////////////////////////////////////////////////////////////
// FUNCTION: show_edition()
// GOAL:     To show the edition on the page
// USE:      Just call this as follows where needed:
//              <SCRIPT><!-- Hidden from some browsers
//              show_edition();
//              // End --></SCRIPT>
//////////////////////////////////////////////////////////////////
function show_edition()
{
    document.write(current_edition);
}

//////////////////////////////////////////////////////////////////
// FUNCTION: get_email(who, subject)
// GOAL:     To generate an eMail link as appropriate. This helps
//           combat SPAM by encapsulating the actual mailto link.
// USE:      Just call this as follows where needed:
//               <SCRIPT><!-- Hidden from some browsers
//               get_email("Cubmaster", "Want to join");
//               // End --></SCRIPT>
//////////////////////////////////////////////////////////////////
function get_email(who, subject)
{
    switch(who) {
        case "Cubmaster":
            document.write('<a href=\"mailto:' + cubmaster_id + '@' + cubmaster_domain + '?subject=' + subject + '\">');
            document.write(cubmaster_name + '</a>');
            break;

        case "Asstmaster":
            document.write('<a href=\"mailto:' + asst_master_id + '@' + asst_master_domain + '?subject=' + subject + '\">');
            document.write(asst_master_name + '</a>');
            break;

        case "Webmaster":
            document.write('<a href=\"mailto:' + webmaster_id + '@' + webmaster_domain + '?subject=' + subject + '\">');
            document.write(webmaster_name + '</a>');
            break;

        default:
            document.write('<a href=\"mailto:' + webmaster_id + '@' + webmaster_domain + '?subject=' + subject + '\">');
            document.write(webmaster_name + '</a>');
            break;
    }
}

//////////////////////////////////////////////////////////////////
// FUNCTION: last_update()
// GOAL:     To show the last time this site was updated
// EG:       "Last updated on 08/15/2004. Contact the Webmaster
//           with any corrections."
// USE:      Just call this as follows where needed:
//              <SCRIPT><!-- Hidden from some browsers
//              last_update();
//              // End --></SCRIPT>
//////////////////////////////////////////////////////////////////
function last_update()
{
    document.write('Last updated on ' + as_of_date + '. Contact the ');
    document.write('<a href=\"mailto:' + webmaster_id + '@' + webmaster_domain + '?subject=Website comments\">');
    document.write('Webmaster</a> with any corrections.');
}

//////////////////////////////////////////////////////////////////
// FUNCTION: show_cubmaster_name()
// GOAL:     To show the Cubmaster name on the page
// USE:      Just call this as follows where needed:
//              <SCRIPT><!-- Hidden from some browsers
//              show_cubmaster_name();
//              // End --></SCRIPT>
//////////////////////////////////////////////////////////////////
function show_cubmaster_name()
{
    document.write(cubmaster_name + ' ');
}

//////////////////////////////////////////////////////////////////
// FUNCTION: show_cubmaster_phone()
// GOAL:     To show the Cubmaster phone on the page
// USE:      Just call this as follows where needed:
//              <SCRIPT><!-- Hidden from some browsers
//              show_cubmaster_phone();
//              // End --></SCRIPT>
//////////////////////////////////////////////////////////////////
function show_cubmaster_phone()
{
    document.write(cubmaster_phone + ' ');
}

//////////////////////////////////////////////////////////////////
// FUNCTION: show_asst_master_name()
// GOAL:     To show the Asst Cubmaster name on the page
// USE:      Just call this as follows where needed:
//              <SCRIPT><!-- Hidden from some browsers
//              show_asst_master_name();
//              // End --></SCRIPT>
//////////////////////////////////////////////////////////////////
function show_asst_master_name()
{
    document.write(asst_master_name + ' ');
}

//////////////////////////////////////////////////////////////////
// FUNCTION: show_asst_master_phone()
// GOAL:     To show the Asst Cubmaster phone on the page
// USE:      Just call this as follows where needed:
//              <SCRIPT><!-- Hidden from some browsers
//              show_asst_master_phone();
//              // End --></SCRIPT>
//////////////////////////////////////////////////////////////////
function show_asst_master_phone()
{
    document.write(asst_master_phone + ' ');
}

//////////////////////////////////////////////////////////////////
// FUNCTION: show_webmaster_name()
// GOAL:     To show the Webmaster name on the page
// USE:      Just call this as follows where needed:
//              <SCRIPT><!-- Hidden from some browsers
//              show_webmaster_name();
//              // End --></SCRIPT>
//////////////////////////////////////////////////////////////////
function show_webmaster_name()
{
    document.write(webmaster_name + ' ');
}

//////////////////////////////////////////////////////////////////
// FUNCTION: show_webmaster_phone()
// GOAL:     To show the Webmaster phone on the page
// USE:      Just call this as follows where needed:
//              <SCRIPT><!-- Hidden from some browsers
//              show_webmaster_phone();
//              // End --></SCRIPT>
//////////////////////////////////////////////////////////////////
function show_webmaster_phone()
{
    document.write(webmaster_phone + ' ');
}