mboxCreate = function() { return null; }

/* BEGIN general functions and variables *****************************/

// cookie functions
function SetCookie(n, v, d, e){var de = new Date;de.setTime(de.getTime() + e*24*60*60*1000);document.cookie = n +
 "=" + escape(v) + ((e==null) ? "" : ("; expires=" + de.toGMTString())) + "; path=/" + ((d==null) ? "" : (";domain=" + d));}
function GetDomain(){var sld = document.domain;var dp = sld.split(".");var l = dp.length;if (l < 2)
sld = null;else if (!isNaN(dp[l-1]) && !isNaN(dp[l-2])) sld = null;else sld = "." + dp[l-2] + "." + dp[l-1];return sld;}
function GetCookie(c_name) { if (document.cookie.length>0) { c_start=document.cookie.indexOf(c_name + "="); if (c_start!=-1) { c_start=c_start + c_name.length+1; c_end=document.cookie.indexOf(";",c_start); if (c_end==-1) c_end=document.cookie.length; return unescape(document.cookie.substring(c_start,c_end)); } } return ""; }

// get URL param
function getURLparam(name) { var regexS = "[\\?&]"+name+"=([^&#]*)"; var regex = new RegExp( regexS ); var tmpURL = window.location.href; var results = regex.exec( tmpURL ); if( results == null ) return ""; else return results[1]; }

var url = location.href.toLowerCase();
var sku = getURLparam('sku');
var family = getURLparam('family');
var pageName = '';

var tsDays = parseInt(Date.parse(Date()));
tsDays = tsDays/1000/60/60/24;
tsDays = Math.round(tsDays);

/* END general functions and variables *******************************/

/* BEGIN [x+1] CONVERSION TAG TRACKING (SR 300036501) ****************/

var page_type;

if (url.indexOf('trymicrosoftoffice.com/buyusa/default.aspx') !== -1 || url.indexOf('trymicrosoftoffice.com/buyus/default.aspx') !== -1) {
    page_type = 'home';
} else if (url.indexOf('trymicrosoftoffice.com/buyusa/product.aspx') !== -1 || url.indexOf('trymicrosoftoffice.com/buyus/product.aspx') !== -1) {
    if (sku) {
        page_type = 'pd-' + sku;
    } else if (family) {
        page_type = 'pd-' + family;
    } else {
        page_type = 'pd-unknown';
    }
} else if (url.indexOf('trymicrosoftoffice.com/buyusa/basket.aspx') !== -1 || url.indexOf('trymicrosoftoffice.com/buyus/basket.aspx') !== -1) {
    page_type = 'cart';
} else {
    page_type = 'other';
}

// run tracking pixel unless this is thank you page - this will be run on the counter file on thank you page instead.
if (url.indexOf('trymicrosoftoffice.com/buyusa/downloader.aspx') === -1 || url.indexOf('trymicrosoftoffice.com/buyus/downloader.aspx') === -1) {
    document.write('<s' + 'cript src="https://s.xp1.ru4.com/meta?_o=41519&_t=dna&ssv_client=microsoft&ssv_site_ID=c5_455&ssv_language_locale=INSERT_VALUE&ssv_page_type=' + page_type + '&ssv_product_name_1=INSERT_VALUE&ssv_product_unit_price_1=INSERT_VALUE&ssv_product_name_2=INSERT_VALUE&ssv_product_unit_price_2=INSERT_VALUE&ssv_product_type_purchased=INSERT_VALUE&ssv_product_eds_purchased=INSERT_VALUE&ssv_product_cd_purchased=INSERT_VALUE&ssv_total_order_amount=INSERT_VALUE&ssv_order_currency=INSERT_VALUE&ssv_url=INSERT_VALUE"></s' + 'cript>');
}

/* END [x+1] CONVERSION TAG TRACKING (SR 300036501) ******************/

/*

Portfolio: OAA
Subject: Hybrid Conversion Page
Trial: Trial 1
Note: This is the OAA Hybrid page test
//http://buy.trymicrosoftoffice.com/buyusa/hybridproduct.aspx?sku=3203793culture&en-US=&culture=en-US&resID=zwr9ygoBAiMAAG2-jkUAAAAh

http://a248.e.akamai.net/f/248/5462/2h/store.digitalriver.com/DRHM/Storefront/Site/C5_455/cm/multimedia/OT_Files/c5_455_globalTrial.js
http://drh.img.digitalriver.com/DRHM/Storefront/Site/C5_455/cm/multimedia/OT_Files/c5_455_globalTrial.js
https://a248.e.akamai.net/f/248/5462/2h/store.digitalriver.com/DRHM/Storefront/Site/C5_455/cm/multimedia/OT_Files/c5_455_globalTrial.js
https://drh.img.digitalriver.com/DRHM/Storefront/Site/C5_455/cm/multimedia/OT_Files/c5_455_globalTrial.js
*/
if( document.location.href.indexOf("hybridproduct.aspx") != -1){
    (function(){var _o=ptomodule;_o.U="http://pto.digitalriver.com/trial/390/p/hybridconversionpage.18e/299/content.js";
    _o.ST="script";_o.SA={"type":"text/javascript"};_o.B();_o.A["test"]=_o.C["test"];_o.R(1000,null,null,null);})();
}

if( (document.location.href.indexOf("buyusa/default.aspx") != -1) || (document.location.href.indexOf("buyusa/product.aspx") != -1) ){
    /*
    Portfolio: c5_455 & c5_330 (Buy/Try Office en-US)
    Subject: BUY Home & PD Suites
    Trial: Trial 1
    Referenced context:
    - Query string: test
    - Cookies: opPageSource, optest
    - JavaScript variables: optrial.sticky
    Note: This code should not be included in a secure (https) page.
    */
    (function(){var _o=ptomodule;_o.U="http://pto.digitalriver.com/trial/390/p/globalbuymvt.97f/255/content.js";
    _o.ST="script";_o.SA={"type":"text/javascript"};_o.B();_o.A["opPageSource"]=_o.C["opPageSource"];_o.A["optest"]=
    _o.C["optest"];_o.R(1000,null,null,null);})();
}