<script>var
viewReq = new Array();function vu(u) {var i=new
Image();i.src=u.replace("&","&");viewReq.push(i);}</script><script>vu("https://securepubads.g.doubleclick.net/pcs/view?xai\u003dAKAOjsuaECKcnNv_Tax9N7V2Jht4kUFUqojw5RXGA8C0pkvnJk13RDzfsBX-vOps62FaFZ4HZps530I_3pl0iKHX2rpZ4Y7AlBypu2JbO5873gV7XvTl9qQyXXO66km0zjyFqsU00FGUDo2xyUG7QeFiylTcCK9Tn9_HSAmcpB4HMxt6F2XrN4ao_buehRQEsrPKHA6CCeUgF0rp1onF3kgzM-EZWK8wJX_cWcWiNm3n1QTSviIK5cpYiOBYZbwp4ha0mkeBVQfMal5oYQ0\u0026sai\u003dAMfl-YRbzg79W7Sn6yU7hMwCY34x_zrOh0kc_OV_0HPAtR4AL0n9X2mYX0PF-305UeysL48jRJvuSJ4cuU2FcWz5X7OPWLEObdS56uy2wsfi-lSC2RtlUraSWCuk9Mk\u0026sig\u003dCg0ArKJSzMMYHfB3Kob4EAE\u0026urlfix\u003d1\u0026adurl\u003d")</script><script
src="https://rev.cbsi.com/common/js/adKit.min.js?699281408"></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",
'data-ad-track':'1',
'data-ad-cid':ad_obj.cid,
'data-ad-pos':'top',
'data-ad-sid':par.parentNode.id
});
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":"3",
"ptype":"article", "vguid":"5195fd16-3583-4957-b0f5-8b55d2b32b2a" },
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=AKAOjsvRcSAriQQMY95UAFNrNDe8clRMGtjb5n0UQKhhLXDDcx-FDRGUmXn2h0IcGpAEGKAsPQb01k1k2TgMVSXzjSowPZl5nVUMpTDJfB_UGrh6_f7mp3Zk3NBrzJtniLZAcHBR2g2z4Nq7yvgyHlVn9on56osts1-shIZA2N2dKW5RieeRakK3ZTs_ctWdzlyajG02IXnbR1NNdv4mgL69gGyNgGmyIzuIdwZ1v7rqUfLx4lteYRfPb74v0xFFmZxa35fy990&sai=AMfl-YTtRzhNn_4qq5y3OIzLzPtVEynY2HuU0ju-fMN4UjMqkZXVj7L0i90G6C_koN6pwVkWW4N-V3zapK7Z6r1mRqNbSj3g20IglaK8GY4SeZG9MK9HAlS8KdYRmA4&sig=Cg0ArKJSzGRbSUK2g2RbEAE&urlfix=1&adurl=;
</script>
<script
src="https://tpc.googlesyndication.com/pagead/js/r20180613/r20110914/activeview/osd_listener.js"></script><script
type="text/javascript">osdlfm(-1,'','BOtxZNLQoW4PeOteiYry3uegEAAAAABABOAHIAQnAAgLgAgDgBAGgBh_SCAUIgCEQAQ','',3793321458,true,'ujs\u003d1\u0026ud\u003d1\u0026la\u003d1\u0026alp\u003dxai\u0026alh\u003d3641930687\u0026',3,'CAASEuRoHkGL_amJSVoxUmf4HSASpA','https://pagead2.googlesyndication.com/pcs/activeview?xai\u003dAKAOjsszr4P9q6AjoVMrk8Rok0MR_8plMrvwq-i8Ln8GvRw4KrAxhIl-taEKKVv4-ogFa2pwNPbDGfJWx3i7GYHEY0dq1rNkhwczlIU\u0026sig\u003dCg0ArKJSzCnUrcO7DWviEAE','');</script><script>if
(window.top && window.top.postMessage)
{window.top.postMessage('{"googMsgType":"adpnt"}','*');}</script><div
style="bottom:0;right:0;width:371px;height:771px;background:initial
!important;position:absolute !important;max-width:100%
!important;max-height:100% !important;pointer-events:none
!important;image-rendering:-moz-crisp-edges
!important;z-index:2147483647;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAWBAMAAACrl3iAAAAABlBMVEUAAAD+AciWmZzWAAAAAnRSTlMAApidrBQAAAB/SURBVBjTbVDBEcAwCMIN3H/a1iBoetVH5IKKAP8RjLdALIQ8v4msMIpigAmj5hWrCiOzwy++swdpd6eVKIqaSzf1gkoKhqb6TS0JWAZCd8NScEZ3Aw9rQmgTLiUpMTmebROxrpQWGmQXToMb7Rk9VDHs5czt4NHOm8dBauC9D7GGBgTUpiC/AAAAAElFTkSuQmCC')
!important"></div>