﻿var plstart = new Date();

$(window).load(function() {
    log_time();
});

function log_time(){
    var plend = new Date();
    var plload = plend.getTime() - plstart.getTime();

    // determine the thresholds

    if(plload<2000)
        lc = "Very Fast";
    else if (plload<5000)
        lc = "Fast";
    else if (plload<10000)
        lc = "Medium";
    else if (plload<30000)
        lc = "Sluggish";
    else if (plload<45000)
        lc = "Slow";
    else
        lc="Very Slow";

    var fn = document.location.pathname;
    if( document.location.search)
        fn += document.location.search;

    try
    {
        //alert("Page Load," + lc + "  Loading Pages," + fn + ", " + Math.round(plload/1000));
        pageTracker2._trackEvent("Page Load",lc + "  Loading Pages", fn, Math.round(plload/1000));
    }
    catch(err)
    {

    }
}