
var pageUrl = document.location.toString();


//processing for the PD test

var PIDs = new Array(150391400, 108007000, 132722100, 132722000, 105153500, 131736400, 91619200, 162511300, 124172000, 95016400, 95015100, 95016500, 95016000, 95015900, 108009000, 108008900, 108008800, 95015800, 108005800, 138994900, 108006700, 108006600, 95015500, 131113200, 149851500, 169251600);

for(var i = 0; i<PIDs.length; i++){
  if (pageUrl.indexOf(PIDs[i]) != -1){
    //so the URL contains one of the PIDs
    
    //set up the optrial object
    if (typeof(optrial) == 'undefined') {
      var optrial = new Object();
    }
    
    //figure out which product it is
    switch(PIDs[i]){
      case 150391400:
      case 108007000:
      case 132722100:
      case 132722000:
      case 169251600:
        optrial.gameTitle = 'Mass Effect 2';
        break;
      case 105153500:
      case 131736400:
        optrial.gameTitle = 'Sims 3';
        break;
      case 91619200:
      case 162511300:
        optrial.gameTitle = 'Spore';
        break;
      case 124172000:
      case 95016400:
      case 95015100:
      case 95016500:
      case 95016000:
      case 95015500:
      case 95015900:
        optrial.gameTitle = 'FIFA 10';
        break;
      case 108009000:
      case 108008900:
      case 108008800:
      case 95015800:
      case 108005800:
        optrial.gameTitle = 'Madden 10';
        break;
      case 138994900:
      case 108006700:
      case 108006600:
      case 131113200:
      case 149851500:
        optrial.gameTitle = 'Dragon Age';
        break;
        
    }
    
    
    //run the test
    
    /*
    Portfolio: Default
    Subject: EA_US_Store_Product_Detail_Page_2
    Trial: Trial 1
    Referenced context:
    - Query string: test
    - Cookies: optest
    - JavaScript variables: optrial.gameTitle, 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/415/p/ea_us_store_product_detail_page_/96/content.js";
_o.ST="script";_o.SA={"type":"text/javascript"};_o.B();_o.A["optest"]=_o.C["optest"];_o.A["optrial.gameTitle"]=
(typeof optrial.gameTitle!="undefined")?optrial.gameTitle:null;_o.R(1000,null,null,null);})();


//break out of loop
    break;
  }
}


//processing for the PC game test

var PIDsDownloadable = new Array(105153500, 137311600, 124172000, 138994900, 91619200, 150391400, 102427200);



for(var i = 0; i<PIDs.length; i++){
  if (pageUrl.indexOf(PIDsDownloadable[i]) != -1){
    //so the URL contains one of the PIDs
    
    //run the test
    
    /*
    Portfolio: Default
    Subject: EA US Store PC Games
    Trial: Trial 1
    Referenced context:
    - Query string: test
    - Cookies: 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/415/p/eausstorepcgames.0fc/97/content.js";
    _o.ST="script";_o.SA={"type":"text/javascript"};_o.B();_o.A["optest"]=_o.C["optest"];_o.R(1000,null,null,
    null);})();
    
    //break out of loop
    break;
  }
}



/*  Disabling all the old product-specific subjects
url = window.location.href;

if (url.indexOf("95011600") != -1) // madden
{
  (function(){var _o=ptomodule;_o.U="https://ssl.pto.digitalriver.com/by/trial/415/p/eausstorepdmadden95011600.7d1/35/content.js";
  _o.ST="script";_o.SA={"type":"text/javascript"};_o.B();_o.R(1000,null,null,null);})();
}
else if (url.indexOf("85947700") != -1) // sims 2 freetime
{
  (function(){var _o=ptomodule;_o.U="https://ssl.pto.digitalriver.com/by/trial/415/p/eausstorepdsimsfreetime85947700./36/content.js";
  _o.ST="script";_o.SA={"type":"text/javascript"};_o.B();_o.R(1000,null,null,null);})();
}
else if (url.indexOf("88965200") != -1) // sims 2 kitchen & bath
{
  (function(){var _o=ptomodule;_o.U="https://ssl.pto.digitalriver.com/by/trial/415/p/eausstorepdsimskitchen88965200.9/37/content.js";
  _o.ST="script";_o.SA={"type":"text/javascript"};_o.B();_o.R(1000,null,null,null);})();
}
else if (url.indexOf("99571900") != -1) // sims 2 double deluxe
{
  // Trial code goes here
}
else if (url.indexOf("95011500") != -1) // ncaa football
{
  (function(){var _o=ptomodule;_o.U="https://ssl.pto.digitalriver.com/by/trial/415/p/eausstorepdncaafootball95011500./39/content.js";
  _o.ST="script";_o.SA={"type":"text/javascript"};_o.B();_o.R(1000,null,null,null);})();
}
else if (url.indexOf("106443900") != -1) // warhammer
{
  (function(){var _o=ptomodule;_o.U="http://pto.digitalriver.com/trial/415/p/ea_us_warhammer_pd.e0e/86/content.js";
  _o.ST="script";_o.SA={"type":"text/javascript"};_o.B();_o.R(1000,null,null,null);})();
}
else if (url.indexOf("108090800") != -1) // spore cute and creepy
{
  (function(){var _o=ptomodule;_o.U="http://pto.digitalriver.com/trial/415/p/ea_us_spore_parts_pack_pd.5bc/87/content.js";
  _o.ST="script";_o.SA={"type":"text/javascript"};_o.B();_o.R(1000,null,null,null);})();
}

*/