/***************************************************/
/* 
This JavaScript file contains functions and scripts
to track how long a page takes to load. It is in its
own external file so that it can be easily added to 
indivdual pages.
Called on the onload attribute of specific pages.
A variant of http://www.die.net/musings/page_load_time/
*/
/***************************************************/
var start = (new Date()).getTime();

function calcTime() {
    var finish = (new Date()).getTime();
    var elapsed = parseFloat((finish - start) / 1000);
    if (elapsed < 2){
        return 'Page+loads+&lt;2+seconds';
    } else if (elapsed > 25){
        return 'Page+loads+&gt;25+seconds';
    } else {
        return 'Page+loads+between+'+ Math.floor(elapsed) +'+and+'+ Math.ceil(elapsed) +'+seconds';
    }
}