/**
 * Click-tracking extension for Omniture tracking.
 *
 * Include this file on every page you would like to track specific clicks,
 * e.g. click on print buttons. Call function omni_clickTrack() in onclick-event
 * to activate tracking for specific click-events.
 *
 * Prerequisites
 * =============
 * 1.) Omniture sitecatalyst script must be included before using this function.
 *     This will be tested before function omniTrackClickEvent is defined.
 * 2.) Page tracking has to have taken place already (s-Object be initialised correctly)
 *     This will not be tested directly, though the existence of the s-object is tested.
 * 3.) s_account has to be set to active Omniture account
 *
 * Properties, that will be set
 * ============================
 * s.events    : given event (by function parameter, e.g. event25)
 *
 * Example for usage
 * =================
 * <a onclick="if (typeof omniTrackClickEvent == 'function') {omniTrackClickEvent('event25')};" ...>Click me</a>
 *
 * General information
 * ===================
 * @author  Guido Kitzing <kitzing@traveltainment.de>
 * @revision 0.2
 *
 * initial date: May 14th 2010
 * revision date: Jun 5th 2010
 *
 */

if (typeof window.s != 'undefined') {
    var omniTrackClickEvent;

    /**
     * Initialize s-object for Omniture-tracking and send to Omniture-tracker
     *
     * @param eventNo String to be set for s.events (e.g. "event25" or "eventA,eventB")
     */
    omniTrackClickEvent = function (eventNo) {
        window.s = s_gi(window.s_account);
        window.s.events = eventNo;
        window.s.t();

        return true;
    };
}
