<!-- hide from old browsers...
// 
// Copyright 2003 AZC, Inc.  All rights reserved.  The following code is
// either for internal use, or on a royalty-free basis, for AZC's hosting
// customers only.  Redistribution in any form to a third party is
// prohibited without prior written permission from AZC, Inc.
//
// $Id: cp.js,v 1.6 2003/10/19 05:06:20 fangchin Exp $
//

function get_domain()
{
     var hn = /^\w+\.([\w.]+)/; // match the hostname per se, a period, and
                                // rest of the fully qualified domain name
                                // if available.
     var dn = document.domain; 
     var results = dn.match(hn);
     if (results != null) {
          return results[1];
     } else {
          return "Domain name unavailable";
     }
}

function print_copyright_statement(initial_year, label)
{
    var now = new Date();
    var current_year = now.getFullYear();
    if (initial_year == null) {
	initial_year = current_year;
    }
    var year_span = (current_year == initial_year) ? 
	initial_year : 
	initial_year + 
	"-" + 
	current_year;

    if (label == null) {
	label = get_domain();
	label = label + ".";  // so that the result is grammatically correct.
    }

    // A style sheet can be used to control the look and feel of the
    // printed results below.  The argument 'label' is introduced to add
    // more flexibility to the printed results.

    return "Copyright &copy; " + 
	   year_span + 
           " " +
	   label + 
	   " " +

           "All Rights Reserved.";
}
//-->

