﻿var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-652301-1']);
_gaq.push(['_trackPageview']);

(function () {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

function NotifyAnalytics(Action, Label, Value) {
    // _gaq object only works if you use the global variable created in Default.aspx

    if (_gaq != null)
        _gaq.push(['_trackEvent', Action, Label, Value]);
}

function recordOutboundLink(link, category, action) {
    _gat._getTrackerByName()._trackEvent(category, action);
    setTimeout('document.location = "' + link.href + '"', 100);
}

function NotifyAnalyticsRightClick(Action, Label, Value) {
    if (event.button == 2 || event.button == 3)
        NotifyAnalytics(Action, Label, Value + " RightClick");
    else
        NotifyAnalytics(Action, Label, Value);
}

