<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\u003dAKAOjsvG3vpUJPmxQhqHxnbYNp6jWXsD_XU1yF32UboJQ9vxQtIOp-t_7MyhQNE9SC9hncamtTD9ojBOAgbwJl2tRypJtG4-mrIfPI7_aQvjLItNh1GMwM-LDKTv7_qd-sKixMwfkansq7T2tRPKIK83PUoDOlSyo3p5kfbMaZnLeb4gY9WB_sWMOqBALSLwIeEWZLRVbqTHVo9fjwGaTpz5ajzfbTHVb0I9SS048pG7xMB9AFOjTPp59SHYoU25Erry2L51GNn0OTp6fzkpb_u1\u0026sai\u003dAMfl-YQAcziweCPd6FOgtmckxQ9igOmlJ0EL4ppwDCW1g1u-IE79xZzuuy3aJPzdY5TDinzD6BIIs8-4XdTk67Q24BKKqVCFOlnLjP9-2ofDK5azsasph23KAu_fhTg\u0026sig\u003dCg0ArKJSzI25f5EWX3riEAE\u0026urlfix\u003d1\u0026adurl\u003d")</script><script
src="https://rev.cbsi.com/common/js/adKit.min.js?2005708000"></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":"e", "subses":"6",
"ptype":"article", "vguid":"56d551d1-1d79-4b95-bc43-bee36400055a" },
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=AKAOjsuPw6_PuztWYckYb4wYMuih9863ByCzA84FE0TOG59C5YfMecCBEpcSAf2iHF7sDfdpRoGoj1ElB46YxOUL_H2UC5hm9KBRe0xpG_-mJ8i19S8F6NY1I6za28rV75bAqyjyIcIVIBgmwnL277qRQSk_6aLxMU-3x0jTgNRYJoMe8wID65S6AqvFqiH8wTvCds3Pbla31hjEqEA8KHUZLT0VmyIFSVI3r3aZ38VpGWJ6DsSthmr3SwbgpQySwTyjf1HUW63W4rej&sai=AMfl-YQLTBZ4jhueOzfkPW1_9jbSiamln1mGUlE369ZkPPoTjqqqsbJ-3eg_UUatY2aHBWoTcLof2hTSkReU45r0fsrMDVz1Ou1zO8zE1bwPTIirwrBDTIWFdyw7Kag&sig=Cg0ArKJSzFm8MqcaxURaEAE&urlfix=1&adurl=;
</script>
<script
src="https://tpc.googlesyndication.com/pagead/js/r20180627/r20110914/activeview/osd_listener.js"></script><script
type="text/javascript">osdlfm(-1,'','BK8rOJpI8W4WnBoGTZMj8vsAHAAAAABABOAHIAQnAAgLgAgDgBAGgBh_SCAUIgCEQAQ','',3663201365,true,'ud\u003d1\u0026la\u003d1\u0026alp\u003dxai\u0026alh\u003d3196621377\u0026',3,'CAASEuRoiBAT-kfpIQjKF99qqELm_w','https://pagead2.googlesyndication.com/pcs/activeview?xai\u003dAKAOjsuHeNRd649_xw9QbWbZZV1p-cBnF2ZooxU-nwHzUuHYlD4uWYN19QFhYqWypL6Pgwgo4quvn2yOo9jns6UkMeLmsNYcVZC3tOM\u0026sig\u003dCg0ArKJSzNNcTk6nG-sUEAE','');</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+AciWmZzWAAAAAnRSTlMAApidrBQAAAB8SURBVBjTbZEBDoAwCAPLD/r/1zqBFlychknouksF/lfUgt7qAOY0K+kuFaciNe7OhK06m7uZ3+rxns4k9ZhEi6/p4oZIovyrsgFMIXh5x9wz1m3O/CrW1qrgJtEdm/SDfCXYR5SCwkbTj2L2nVkEFoq86Vjeuv4loHzwAFI4BhXayV8XAAAAAElFTkSuQmCC')
!important"></div>