<!-- 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.7 2003/10/23 16:56:31 fangchin Exp $
//

function get_domain(nm)
{
    if (nm != null) return(nm); // If a name is given, just return and be done
                                // with it.  Otherwise, do more work below.
   
    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.";
}
//-->

