/****************************************************************************************
* a) The code binds all static links and clickable-divs to omniture tracking
* b) Kills the Optus Cookie, when present
* c) Sends the WRP tracking codes to omniture when the page is loaded
******************************************************************************************/

var JS_SECTION ='homepage';
var JS_OMNTR_SUITEID = 'msnportalaucatpartners,msnportalaucatglobal';
var JS_OMNTR_CATEGORY = 'partners';
var JS_OMNTR_LINKINTERNALFILTERS = 'optuszoo.ninemsn.com.au';
var JS_OMNTR_COMPANY = 'optus';
var JS_OMNITURE_COMPANY = 'Optus';
var JS_PAGE_COBRAND = 'Optus';
var JS_SITE = 'Optus';
var JS_OMNITURE_CATEGORY = 'msnportalaumisc';

var OPTUS_URL   = "http://optuszoo.com.au";   // URL for 'Go to Optus Portal and remind me later' button
var NINEMSN_URL = "http://ninemsn.com.au"; // URL for 'Go to ninemsn and remind me later' button

window.onload = function() {
    initialisePage();
    fncBindOmnitureID("OPTUS_WRP_PAGE_LOADED");
}

function initialisePage() {
    var div_optus = document.getElementById("OPTUS_WRP_GO_TO_OPTUS");
    var div_ninemsn = document.getElementById("OPTUS_WRP_GO_TO_NINEMSN");
    div_optus.onclick = function() { fncBindOmnitureID("OPTUS_WRP_GO_TO_OPTUS"); document.location = OPTUS_URL; };
    div_ninemsn.onclick = function() { fncBindOmnitureID("OPTUS_WRP_GO_TO_NINEMSN"); this.style.behavior='url(#default#homepage)';this.setHomePage(NINEMSN_URL); document.location = NINEMSN_URL; };
};

function fncBindOmnitureID(staticLinkOmnitureID) {
    try {
        SBKCustomLinkTracking(true,staticLinkOmnitureID);
    }
    catch(err) {
    }
};


