//-------------------------------------------
//
// file: common.js
// desc: Commonly used JavaScript functions
// auth: Bart Hubbard
// edited by Tony Kinuthia - 05.21.2003
//
//-------------------------------------------


    //
    // Function    : mailTo (string)
    // Description : A function that pieces together a mailto tag in such a way that robots
    //               and crawlers can't scalp my email address.
    //
    function mailTo (nameStr, subjectStr)
    {
        document.write( "<a href=\"mailto:" + nameStr  + "@" + "hotmail" + "." + "com?subject=" + subjectStr + "\">")
    }

    //
    // function to print the date the document was last saved
    //
    function docdate()
    {
        document.write("last edit on: " + document.lastModified + "<br>")
    }

    //
    // function to print the current time
    //
    function curtime()
    {
        // show the current time
        var today  = new Date()
        var hour   = today.getHours()
        var minute = today.getMinutes()

        nowtime = " " + hour
        if (hour>12)
        {
            nowtime = " " + (hour - 12)
        }
        nowtime += ":" + ((minute < 10) ? "0" + minute : minute)
        nowtime += ((today.getHours() > 12) ? " pm" : " am")

	document.write(nowtime)

    }

