<script>(function(){var
g=this,l=function(a,b){var c=a.split("."),d=g;c[0]in
d||!d.execScript||d.execScript("var "+c[0]);for(var
e;c.length&&(e=c.shift());)c.length||void
0===b?d=d[e]?d[e]:d[e]={}:d[e]=b},m=function(a,b,c){return
a.call.apply(a.bind,arguments)},n=function(a,b,c){if(!a)throw
Error();if(2<arguments.length){var
d=Array.prototype.slice.call(arguments,2);return function(){var
c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return
a.apply(b,c)}}return function(){return
a.apply(b,arguments)}},p=function(a,b,c){p=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native
code")?m:n;return
p.apply(null,arguments)},q=Date.now||function(){return+new Date};var
r=document,s=window;var t=function(a,b){for(var c in
a)Object.prototype.hasOwnProperty.call(a,c)&&b.call(null,a[c],c,a)},w=function(a,b){a.google_image_requests||(a.google_image_requests=[]);var
c=a.document.createElement("img");c.src=b;a.google_image_requests.push(c)};var
x=function(a){return{visible:1,hidden:2,prerender:3,preview:4}[a.webkitVisibilityState||a.mozVisibilityState||a.visibilityState||""]||0},y=function(a){var
b;a.mozVisibilityState?b="mozvisibilitychange":a.webkitVisibilityState?b="webkitvisibilitychange":a.visibilityState&&(b="visibilitychange");return
b};var
C=function(){this.g=r;this.k=s;this.j=!1;this.i=null;this.h=[];this.o={};if(z)this.i=q();else
if(3==x(this.g)){this.i=q();var
a=p(this.q,this);A&&(a=A("di::vch",a));this.p=a;var
b=this.g,c=y(this.g);b.addEventListener?b.addEventListener(c,a,!1):b.attachEvent&&b.attachEvent("on"+c,a)}else
B(this)},A;C.m=function(){return C.n?C.n:C.n=new C};var
D=/^([^:]+:\/\/[^/]+)/m,G=/^\d*,(.+)$/m,z=!1,B=function(a){if(!a.j){a.j=!0;for(var
b=0;b<a.h.length;++b)a.l.apply(a,a.h[b]);a.h=[]}};C.prototype.s=function(a,b){var
c=b.target.u();(c=G.exec(c))&&(this.o[a]=c[1])};C.prototype.l=function(a,b){this.k.rvdt=this.i?q()-this.i:0;var
c;if(c=this.t)t:{try{var
d=D.exec(this.k.location.href),e=D.exec(a);if(d&&e&&d[1]==e[1]&&b){var
f=p(this.s,this,b);this.t(a,f);c=!0;break
t}}catch(u){}c=!1}c||w(this.k,a)};C.prototype.q=function(){if(3!=x(this.g)){B(this);var
a=this.g,b=y(this.g),c=this.p;a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent&&a.detachEvent("on"+b,c)}};var
H=/^true$/.test("")?!0:!1;var I={},J=function(a){var
b=a.toString();a.name&&-1==b.indexOf(a.name)&&(b+=":
"+a.name);a.message&&-1==b.indexOf(a.message)&&(b+=":
"+a.message);if(a.stack){a=a.stack;var
c=b;try{-1==a.indexOf(c)&&(a=c+"\n"+a);for(var
d;a!=d;)d=a,a=a.replace(/((https?:\/..*\/)[^\/:]*:\d+(?:.|\n)*)\2/,"$1");b=a.replace(/\n
*/g,"\n")}catch(e){b=c}}return b},M=function(a,b,c,d){var
e=K,f,u=!0;try{f=b()}catch(h){try{var
N=J(h);b="";h.fileName&&(b=h.fileName);var
E=-1;h.lineNumber&&(E=h.lineNumber);var
v;t:{try{v=c?c():"";break
t}catch(S){}v=""}u=e(a,N,b,E,v)}catch(k){try{var
O=J(k);a="";k.fileName&&(a=k.fileName);c=-1;k.lineNumber&&(c=k.lineNumber);K("pAR",O,a,c,void
0,void
0)}catch(F){L({context:"mRE",msg:F.toString()+"\n"+(F.stack||"")},void
0)}}if(!u)throw h;}finally{if(d)try{d()}catch(T){}}return
f},K=function(a,b,c,d,e,f){a={context:a,msg:b.substring(0,512),eid:e&&e.substring(0,40),file:c,line:d.toString(),url:r.URL.substring(0,512),ref:r.referrer.substring(0,512)};P(a);L(a,f);return!0},L=function(a,b){try{if(Math.random()<(b||.01)){var
c="/pagead/gen_204?id=jserror"+Q(a),d="http"+("https:"==s.location.protocol?"s":"")+"://pagead2.googlesyndication.com"+c,d=d.substring(0,2E3);w(s,d)}}catch(e){}},P=function(a){var
b=a||{};t(I,function(a,d){b[d]=s[a]})},R=function(a,b,c,d,e){return
function(){var f=arguments;return M(a,function(){return
b.apply(c,f)},d,e)}},Q=function(a){var
b="";t(a,function(a,d){if(0===a||a)b+="&"+d+"="+("function"==typeof
encodeURIComponent?encodeURIComponent(a):escape(a))});return
b};A=function(a,b,c,d){return R(a,b,void
0,c,d)};z=H;l("vu",R("vu",function(a,b){var
c=a.replace("&","&"),d=/(google|doubleclick).*\/pagead\/adview/.test(c),e=C.m();if(d){d="&vis="+x(e.g);b&&(d+="&ve=1");var
f=c.indexOf("&adurl"),c=-1==f?c+d:c.substring(0,f)+d+c.substring(f)}e.j?e.l(c,b):e.h.push([c,b])}));l("vv",R("vv",function(){z&&B(C.m())}));})();</script><script>vu("https://securepubads.g.doubleclick.net/pcs/view?xai\x3dAKAOjst-4yAur10ySQFeN50zFU_RHW8wgzGuuYRgShXXG0tk6or5GdDsBhsiN29RxUcD6CXIhrPMriGqWkUYKyLKeyldrOHHi4xfHBtTXq65GgMxtzCinK7I2WGUrknfJ528brfNb-0n5PoY5ZrlVKJ0p_VaERVHxYDSg0g3X5loJYQEKSfSNnHrz8Ql0URNTzMAz1P3ZPljBWQKHC08NTDfhjITJCTqytKhROTKyQOmAYDax6FRktTUvNSIoVJDQgPYTwIrXM96JIxw\x26sig\x3dCg0ArKJSzAczLwcr2OMaEAE\x26urlfix\x3d1\x26adurl\x3d")</script><script
src="https://rev.cbsi.com/common/js/adKit.min.js?575731796"></script>
<script>
var
win = (top!=self && "techrepublic.com"!="") ? window.top :
window;
var cbsAds = window.top.cbsAds || new adKit(win);
// define View behavior
// name identifies the view constructor
// buildView returns the view object
cbsAds.Views.push({
name: "dynamic_showcase",
// pass util as reference to access methods
buildView: function(type, pos, targeting, doc, par, frame, util,
stylesheet){
var timestamp = new Date().getTime();
var adNetwork = par.id.indexOf("/8264")!=-1 ? "8264" : "7336";
var adUnit =
par.id.substring(par.id.indexOf("/"+adNetwork)+adNetwork.length,
par.id.lastIndexOf("_"));
var subcreativeParWrapId = 'subcreativeParWrap_'+timestamp;
var view = {
"type": type,
"pos": pos,
"targeting": targeting,
"stylesheet": stylesheet,
"ad_built": false,
"ad_building": false,
"callback_array": []
};
// DOM interaction when ad is first initialized
view.initRender = function(){
cbsAds.testLog("initRender", true, "Init Render Called");
// frame behavior
if(frame){
frame.style.display = "none";
par.style.height = "auto";
// inline behavior
}else{
if(par){par.style.height = "auto";}
}
};
// DOM interaction to build container
view.containerRender = function(){
cbsAds.testLog("containerRender", true, "Container Render Called");
// load optional css
if(this.stylesheet){ util.loadCSS(this.stylesheet); }
// condense reference
var el = util.addEl;
var docfrag = doc.createDocumentFragment();
// dynamic vars based on ad unit
var brandCopy="Premier Brands on CNET";
if(adUnit.indexOf("es-cnet")>=0){ brandCopy="Marcas de Primera en
CNET"; }
if(adUnit.indexOf("techrepublic")>=0 ||
adUnit.indexOf("zdnet")>=0){ brandCopy="Featured Content"; }
// addEl function parameters & types: el = string, tar = element,
att = obj, textnode = string, innerHTML=string
// att must be formal attributes, example: { class: "class1", id:
"id1", width: 500, height: 65 }
var div_container = el("div", docfrag, {
"id" : "ads_dynamicShowcase"
}, "","<h5><span>"+brandCopy+"</span></h5>");
var subcreativeParWrap = el("div", div_container, {
"id": subcreativeParWrapId
});
var ul_list = el("ul", subcreativeParWrap, {
"id": "dynamicShowcase_ul"
});
par.appendChild(docfrag);
this.ad_built=true;
this.ad_building=false;
for(var i=0, l=this.callback_array.length;i<l;i++){
this.subcreativeRender(this.callback_array.shift());
}
};
// DOM interaction to build subcreative
view.subcreativeRender = function(ad_obj){
cbsAds.testLog("subcreativeRender", true, "Subcreative Render
Called");
// condense reference
var el = util.addEl;
var docfrag = doc.createDocumentFragment();
// addEl function parameters & types: el = string, tar = element,
att = obj, textnode = string, innerHTML=string
// att must be formal attributes, example: { class: "class1", id:
"id1", width: 500, height: 65 }
var seat_li = el("li", docfrag, {
"class": "dynamicShowcase_li"
});
var seat_link = el("a", seat_li, {
"href": ad_obj.clickURL,
"target": "_blank",
"rel": "nofollow"
}, '','<figure><img class="dynamicShowcase_image"
src="'+ad_obj.mainProductImage+'" style="width:170px; height:96px;"
/></figure><div class="dynamicShowcase_text"><span
class="dynamicShowcase_headline">'+ad_obj.mainHeadline+'</span><span
class="dynamicShowcase_copy">'+ad_obj.mainCopy+'</span></div>');
// only write out the expand portion if the optional "Expand
Headline" input has a value
if(ad_obj.expandHeadline != ""){
var seat_expandWrap = el("div", seat_li, {
"class": "dynamicShowcase_expandWrap"
}, '', '<span
class="dynamicShowcase_expandWrap_headline">'+ad_obj.expandHeadline+'</span><span
class="dynamicShowcase_expandWrap_copy">'+ad_obj.expandCopy+'</span><a
href="'+ad_obj.clickURL+'" target="_blank"
class="dynamicShowcase_expandWrap_action">'+ad_obj.expandCalltoAction+'</a>');
}
doc.getElementById(subcreativeParWrapId).firstChild.appendChild(docfrag);
// ref = reference to cbsAds object
if(window.cbsAds){
var ref = window.cbsAds;
}else if(window.parent && window.parent.cbsAds){
var ref = window.parent.cbsAds;
}else if(window.top && window.top.cbsAds){
var ref = window.top.cbsAds;
}else{
var ref = null;
}
};
return view;
}
});
// uncomment the following line to launch the test module
//cbsAds.testSetup();
// uncomment the following line to use test subcreatives using the test
subcreative below
//cbsAds.testSubs = true;
// this is a test subcreative that you'll have to update with the
relevant placeholders (using Info Button placeholders as example)
// these will be used in the subcreativeRender function
cbsAds.testSubcreativeObject = {
clickURL: "http://www.cnet.com",
mainProductImage: "https://rev.cbsi.com/common/60x45.jpg",
mainHeadline: "headline",
mainCopy: "copy",
expandHeadline: "expand headline",
expandCopy: "expand copy",
expandCalltoAction: "Visit Showcase"
};
cbsAds.testLog("setup", cbsAds.win===window, "Window is Top");
// this is the guts of the container creative (using Info Button values
as example)
// initAd object nodes & types: type = string, subcreative_size =
array, max_seats = integer, seat_overides = object, test_network =
string, pos = string, stylesheet = string
// seat_overides must be formal attributes, example: [{
adUnit:"phones",seats:3 },{ adUnit:"tablets",seats:2 }]
cbsAds.initAd({
type: "dynamic_showcase",
subcreative_size: [372,142],
max_seats: 2,
seat_overides: [],
test_network: "/7336/aw-cnet",
pos: "",
targeting:{ "campaign":"", "env":"prod", "session":"g", "subses":"6",
"ptype":"article", "vguid":"9bba1860-21ae-11e7-ad4b-6da4465d4cf9" },
stylesheet: ""
});
ads_logger('Dynamic Showcase Center container ::: creative id =
83651727249');
function ads_logger(str){try{console.log(str);}catch(e){}};
// no warnings!
// var nowarn =
https://adclick.g.doubleclick.net/pcs/click?xai=AKAOjss3iFOXN2SRjbCSh_C34-E-h1xeuZIabRqV6lINAB6fUGNvXPz7cdVbwzUkvG0XZt1XtlXzhWqx0sN7WNVh7BFyDocAjyGHbrRjmcs1hEIUybVCyM85uIiv9sTVeuWDoGU3823JG8fSPG_QhBFe_BZbuwk4PCqpRcpq4D650FpwE0dgFd7nBjlXRHJuYhDuR3IBANiWMxoFhzqi71D2T6VtlVzsd2uqe-y3Hp798x1BUeiQW0hnSqCSMpZdqA&sig=Cg0ArKJSzHZqw4D1sMvVEAE&urlfix=1&adurl=;
</script>
<script
src="https://tpc.googlesyndication.com/pagead/js/r20170410/r20110914/activeview/osd_listener.js"></script><script
type="text/javascript">osdlfm(-1,'','BQ6m0Jc7xWN6OGdyXygWJo7TYBgAAAAAQATgByAEJwAIC4AIA4AQBoAYf0ggFCIBhEAE','',1911603512,true,'ud\x3d1\x26la\x3d1\x26alp\x3dxai\x26alh\x3d2150261453\x26',3,'CAASFeRo7eEfGM8doGBjvtzIKbMRXgn7ig','//pagead2.googlesyndication.com/activeview?avi\x3dBQ6m0Jc7xWN6OGdyXygWJo7TYBgAAAAAQATgByAEJwAIC4AIA4AQBoAYf0ggFCIBhEAE\x26cid\x3dCAASFeRo7eEfGM8doGBjvtzIKbMRXgn7ig');</script><script>if
(window.top && window.top.postMessage)
{window.top.postMessage('{"googMsgType":"adpnt"}','*');}</script>