﻿/** 
for flash link calls 
usage: _hbLink('/thefull/path/to/report');

NOTE: if a variable called omni_debug is declared anywhere on 
the page before this call is made,a dialog box will be 
displayed showing the user what will be sent

P.S. A page view must be sent before this call can be made. 
**/
function _hbLink(action, not, used) {

    //contains /play_activity means event9 everything else is misc
    var events = action.match(/\/play_activity/gi) ? "event9" : "event11";
    var eventName = action.substring(action.lastIndexOf('/') + 1).replace(/_/gi, ' ');

    //markup click event
    s.prop16 = s.eVar16 = "beyblade:" + sc_reporting_gamename;
    s.prop18 = s.eVar18 = eventName;
    s.events = events;

    //specify which variables to track
    s.linkTrackVars = "prop16,eVar16,prop17,eVar17,prop18,eVar18,events";
    s.linkTrackEvents = "event9,event11";

    if (typeof (omni_debug) != "undefined") {
        alert("Sending action: " + eventName);
    }

    //send image request
    s.tl(action, "o", s.prop16 + ":" + eventName);

    //clear dynamic variables
    s.linkTrackVars = "None";
    s.linkTrackEvents = "None";
    s.prop16 = s.eVar16 = "";
    s.prop18 = s.eVar18 = "";
    s.events = "";
}
