
/*

This class is responsible to initiate a javascript request to track and report user activity in the webtrends.

"initialize" function is use to intialize variables at global level so they can be accessed in whole page.
"trackActivity" function is taking 'activity' as a parameter which is actually user activity like login, 
createAccount, editProfile etc... In this function we are creating 'url' and 'title' variables and then 
calling 'dcsMultiTrack' function which exist in web>webtrends>webTrendsJS.aspx. This is used to create a tag using 
javascript dynamically. This function is keeping track of current request.
The WebTrends dcsMultiTrack function lets you to report on a user's activity in the webtrends for nearly all types
of events, including events within a Flash application as well as interactions triggering Ajax activity. 
We are calling 'trackActivity' in 'switchPanel' and 'switchSubPanel' functions

*/

var WebtrendsTracker = Class.create({

    initialize: function() {            
        this.currentActivity = "/" + locale + "/Campaigns/" + webtrendsTrackerKey + "/default.html";
    },
        
    trackActivity: function(activity) {      
        var url = "/" + locale + "/Campaigns/" + webtrendsTrackerKey + "/" + activity + ".html"; 
        var title = "Campaigns - " + webtrendsTrackerKey + " " + activity + "";
        dcsMultiTrack('DCS.dcsuri',url,'WT.ti', title,'DCS.dcsref',this.currentActivity);
        this.currentActivity = url;
    }
});

