
// Omniture Sitecatalyst start
// default vars
var s_pageName=""
var s_server="nike.com"  // site server
var s_channel="main"     // channel
var s_pageType=""        // locale
var s_prop1="";          // Langauge
var s_prop2="";          // Media Source type
var s_prop3="";          // Ref referer
var s_prop4=""
var s_prop5=""
var s_prop6=""
var s_prop7=""
var s_prop8=""
var s_prop9=""
var s_prop10=""
var s_prop11=""
var s_prop12="football"; // Site Category
var s_prop13="emea";     // Region
var s_prop14="";         // Subregion
var s_prop15="";         // Langauge in iso639
var s_prop16=""
var s_prop17=""
var s_prop18=""
var s_prop19=""
var s_prop20=""

/* E-commerce Variables */
var s_campaign=""
var s_state=""
var s_zip=""
var s_events=""
var s_products=""
var s_purchaseID=""
var s_account=""
//Omniture Sitecatalyst end

// Omniture functions
function sendAnalyticsEvent(accnt)
{
    accnt=accnt?accnt:s_account;void(s_gs(accnt))
}

function sendLinkEvent(accnt,lnkname,type)
{
    accnt=accnt?accnt:s_account;s_linkType=type?type:"o";s_lnk=true;
    s_linkName=lnkname?lnkname:s_linkName?s_linkName:"Flash Link Event";
    void(s_gs(accnt))
}

//Debug variables
var blnAlert = false; // set this to true to debug
var statSeq = 0;

// Page Views Tag
function createPageViewTag( page_name,strSection,strChannel)
{
    // add siteName to page_name
    page_name = mCurrentSiteName + page_name;

    // alert( "createPageViewTag: " + page_name + "|" + strSection + "|" + strChannel); // uncomment this to see tag traces
    s_events = "";
    s_products = "";
    strSubSection = "";
    s_pageName = page_name;
    s_channel = strChannel; //Break down Channel
    s_prop4 = strSection; //This supplies a breakdown of section popularity by actual section name
    s_prop5 = strSubSection;

    if (s_channel == null || s_channel =="") s_channel = "undefined";
    if (s_server == null || s_server =="") s_server = "undefined";
    if (s_prop14 == null || s_prop14 =="") s_prop14 = "undefined";
    if (s_prop15 == null || s_prop15 =="") s_prop15 = "undefined";

    // send vars
    void(sendAnalyticsEvent(s_account));//SiteCatalyst specific
    if (blnAlert) printTagVariables(); // un-comment this function if you want to do some debugging on the information being sent
}

// Link Tag
function createLinkEventTag( strSection,strChannel,strlinkName)
{
    // add siteName to page_name
    var page_name = mCurrentSiteName + strSection;
    var strlinkName = mCurrentSiteName + strlinkName;

    // alert( "createLinkEventTag: " + page_name + "|" + strSection + "|" + strChannel + "|" + strlinkName); // uncomment this to see tag traces
    s_events = "";
    s_products = "";
    s_pageName = page_name;
    s_channel = strChannel; //Break down by Channel
    s_prop4 = strSection; //This supplies a breakdown of section popularity by actual section name
    s_prop5 = strSubSection;

    // setup vars that we need to send
    s_linkTrackVars="s_pageName,strlinkName,s_prop4";

    if (s_channel == null || s_channel =="") s_channel = "undefined";
    if (s_server == null || s_server =="") s_server = "undefined";
    if (s_prop14 == null || s_prop14 =="") s_prop14 = "undefined";
    if (s_prop15 == null || s_prop15 =="") s_prop15 = "undefined";

    // send vars
    void(sendLinkEvent(s_account,strlinkName, "link"));//SiteCatalyst specific
    if (blnAlert) printTagVariables(); // un-comment this function if you want to do some debugging on the information being sent
}

// Omniture Functions
function printTagVariables()
{
    statSeq+=1; //This offsets multiple catalyst debug windows!
    var statWinNm = "stats_debugger" + Math.round(Math.random()*10000);
    void(window.open("",statWinNm,"width=600,height=600,location=0,menubar=0,status=1,toolbar=0,resizable=1,scrollbars=1,top=" + statSeq * 10 + ",left="  + statSeq * 10).document.write("<script language=\"JavaScript\" src=\"http://192.168.112.2O7.net/stats_debugger.php\"></"+"script>"));
}
