function opCreativeSetCookieA(n, v, d, e){var de = new Date;de.setTime(de.getTime() + e * 1000);document.cookie = n +
 "=" + escape(v) + ((e==null) ? "" : ("; expires=" + de.toGMTString())) + "; path=/" + ((d==null) ? "" : (";domain=" + d));}
function opCreativeGetDocumentSLD(){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;}

var opBrowserName;
// browser detect
if (navigator.userAgent.indexOf('Firefox') != -1) {
	opBrowserName = 'Firefox';
} else if (navigator.userAgent.indexOf('MSIE') != -1) {
	opBrowserName = 'Internet Explorer';
} else {
	opBrowserName = 'other';
}

var count = false;
var url = location.href.toLowerCase();

// get product ID from URL
var url_product;
if (url.indexOf('thankyou') != -1) {
	url_product = url.slice(url.lastIndexOf('fulfill')+8, url.lastIndexOf('/'));
} else {
	url_product = url.slice(url.lastIndexOf('/')+1, url.length);
}
var ot_productID;
// set cookies to track what product user tried
if (url_product == '0184.078') { // NAV
	opCreativeSetCookieA('product_try', 'NAV_15day', 'symantecstore.com', 15552000);
	count = true;
} else if (url_product == '0184.077') { // NIS
	opCreativeSetCookieA('product_try', 'NIS_15day', 'symantecstore.com', 15552000);
	count = true;
} else if (url_product == '0184.082') { // N360 15-day
	opCreativeSetCookieA('product_try', 'N360_15day', 'symantecstore.com', 15552000);
	count = true;
} else if (url_product == '0184.081') { // N360 30-day
	opCreativeSetCookieA('product_try', 'N360_30day', 'symantecstore.com', 15552000);
	count = true;
} else {
	opCreativeSetCookieA('product_try', 'none', 'symantecstore.com', 15552000);
}

if (url.indexOf('/fulfill/') != -1 && url.indexOf('thankyou') == -1 && count == true) { // info-capture page only

	function init() {
		document.doc.onsubmit = function() {
			opCreativeSetCookieA("nct_InfoCapture_email", document.doc.flex1.value, "symantecstore.com", 15552000); // capture user's email address
		}
	}

	if (typeof window.addEventListener != 'undefined')
		window.addEventListener('load', init, false);
	else if (typeof document.addEventListener != 'undefined')
		document.addEventListener('load', init, false);
	else if (typeof window.attachEvent != 'undefined')
		window.attachEvent('onload', init);
	
	// Counter: symnahho_trial_infocapture
	var _o=(typeof opcounter=="object")?opcounter:new Object;_o.D=document;_o.L=_o.D.location;_o.T=
	new Date;_o.Q=new Object;_o.C=new Object;_o.U="http://pto.digitalriver.com/counter/399/-/18/event.js";
	_o.D_ts=Math.round(_o.T.getTime()/1000);_o.D_tzo=_o.T.getTimezoneOffset();_o.D_loc=_o.L.protocol+
	"//"+_o.L.hostname+_o.L.pathname;_o.D_ckl=_o.D.cookie.length;_o.D_ref=_o.D.referrer;function 
	_oI(){var s=_o.L.search;var c=_o.D.cookie;if(s.length>3){for(var a=s.substring(1).split("&")
	,i=0,l=a.length;i<l;i++){var p=a[i].indexOf("=");if(p>0)_o.Q[a[i].substring(0,p)]=unescape(a[i].substring(
	p+1));}}if(c.length>3){for(var a=c.split(";"),i=0,b=a.length;i<b;i++){var v=a[i].split("=");
	while(v[0].substring(0,1)==" ")v[0]=v[0].substring(1,v[0].length);if(v.length==2)_o.C[v[0]]=
	unescape(v[1]);}}}function _oS(){var o=new Object;for(var n in _o)o[n]=_o[n];o.D=o.L=o.T=o.Q=o.C=
	o.U=null;var q='';for(var n in o)if(o[n]!=null && o[n]!="")q+=(q.length>0?"&":(_o.U.indexOf(
	"?")>0?"&":"?"))+n+"="+escape(o[n]);return _o.U+q;}_oI();for(var n in _o.Q)if(n.substring(
	0,2)=="op")_o[n]=_o.Q[n];for(var n in _o.C)if(n.substring(0,2)=="op")_o[n]=_o.C[n];_o["product_try"]=
	_o.C["product_try"];_o.D.write('<'+'script type="text/javascript" src="'+_oS()+'"><\/script>');
	
} else if (url.indexOf('/fulfill/') != -1 && url.indexOf('thankyou') != -1 && count == true) { // thank you page only
	
	// Counter: symnahho_trial_download
	var _o=(typeof opcounter=="object")?opcounter:new Object;_o.D=document;_o.L=_o.D.location;_o.T=
	new Date;_o.Q=new Object;_o.C=new Object;_o.U="http://pto.digitalriver.com/counter/399/-/19/event.js";
	_o.D_ts=Math.round(_o.T.getTime()/1000);_o.D_tzo=_o.T.getTimezoneOffset();_o.D_loc=_o.L.protocol+
	"//"+_o.L.hostname+_o.L.pathname;_o.D_ckl=_o.D.cookie.length;_o.D_ref=_o.D.referrer;function 
	_oI(){var s=_o.L.search;var c=_o.D.cookie;if(s.length>3){for(var a=s.substring(1).split("&")
	,i=0,l=a.length;i<l;i++){var p=a[i].indexOf("=");if(p>0)_o.Q[a[i].substring(0,p)]=unescape(a[i].substring(
	p+1));}}if(c.length>3){for(var a=c.split(";"),i=0,b=a.length;i<b;i++){var v=a[i].split("=");
	while(v[0].substring(0,1)==" ")v[0]=v[0].substring(1,v[0].length);if(v.length==2)_o.C[v[0]]=
	unescape(v[1]);}}}function _oS(){var o=new Object;for(var n in _o)o[n]=_o[n];o.D=o.L=o.T=o.Q=o.C=
	o.U=null;var q='';for(var n in o)if(o[n]!=null && o[n]!="")q+=(q.length>0?"&":(_o.U.indexOf(
	"?")>0?"&":"?"))+n+"="+escape(o[n]);return _o.U+q;}_oI();for(var n in _o.Q)if(n.substring(
	0,2)=="op")_o[n]=_o.Q[n];for(var n in _o.C)if(n.substring(0,2)=="op")_o[n]=_o.C[n];_o["nct_InfoCapture_email"]=
	_o.C["nct_InfoCapture_email"];_o["product_try"]=_o.C["product_try"];_o["opBrowserName"]=(typeof 
	opBrowserName!="undefined")?opBrowserName:null;_o.D.write('<'+'script type="text/javascript" src="'+
	_oS()+'"><\/script>');
}