


/* AntiVirus and Internet Security upsell interstitial MVT.  Ari Koinuma, Oct 2009*/

function parseGCQueryString(url, param){
  url = url.slice(url.indexOf(param)+param.length+1);
  var value = url.slice(0, url.indexOf('/'));
  return value;
}

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];
    }


//figure out if the page is displaying 
var url = document.location.toString();
if (url.indexOf('?') == -1) {
  var PID = parseGCQueryString(url, 'productID');
} else {
  var PID = getURLparam('productID');
}

//set optrial unless it's already set
  if (typeof(optrial) == 'undefined'){
    var optrial = new Object();
  }
  //capture the PID
  optrial.pid = PID;

//assign the PID to optrial object when the PID is one of below
switch(PID) {
  //TIS to TISPro upsell
  
  case '147783400':
    optrial.tmProd = 'tisSpec';
    break;
  
  //New from Qualified
  case '147722500':
  //Conversion
  case '147782800':
  //Conversion from other
  case '147783100':
  //Renew
  //case '147783400':  removed due to this being the only product with deeper discount
    optrial.tmProd = 'tis';
    break;
    
  //TAV to TIS upsell
  
  //New from Qualified
  case '147785200':
  //Conversion
  case '147785900':
  //Conversion from other
  case '147787000':
  //Renew
  case '147787500':
    optrial.tmProd = 'tav';
    break;
}


//trial code
/*

Portfolio: Site Opt
Subject: tmamer Upsell Interstitial 2
Trial: Trial 1
Referenced context:
- Query string: test
- Cookies: optest
- JavaScript variables: optrial.pid, optrial.sticky, optrial.tmProd
Note: This code should not be included in a secure (https) page.

*/
(function(){var _o=ptomodule;_o.U="http://pto.digitalriver.com/trial/398/p/tmamerupsellinterstitial2.ff3/87/content.js";
_o.ST="script";_o.SA={"type":"text/javascript"};_o.B();_o.A["optest"]=_o.C["optest"];_o.A["optrial.pid"]=
(typeof optrial.pid!="undefined")?optrial.pid:null;_o.R(1000,null,null,null);})();

/* End of TAV+TIS upsell interstitial MVT */