<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\u003dAKAOjste8u6-Md2S-zyGO_mGTtZ1KWnMCe8TroSUCO0i9LDNzSPLbSyFa-q1ioJHB89XgNfx2sKY3j7pEbdqt73Ku1zCY1NlbHYtd45pbAo_OO7wY-nFBTUpIPVII4tz9yMucBfznjc-pFBZmBK0JpJBo80ZdM9WuOqbStOB4vmu1jF_MTGPPnPeAGStZE1FycQNrTbqjBLPSIm6vhIYw4ciN1jWpPO1CpzcTzvZ6wH9g0VT7UalbMUOPQsGlFTLjsxB1xMJgm1rzCywmzQ\u0026sai\u003dAMfl-YQohM3xqqaqF-XoFn2voxeMOpww0Esxbg1OY1Lr0_nh3KxHJUcqciOxiGee_3LfghLW2weSY7XgefxyYlxoDXeMXv2sqW-TZqUKScdPza-XMqA_fHE78CqafdA\u0026sig\u003dCg0ArKJSzAv-NVOe4VVEEAE\u0026urlfix\u003d1\u0026adurl\u003d")</script><script
src="https://rev.cbsi.com/common/js/adKit.min.js?234776119"></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":"b", "subses":"5",
"ptype":"article", "vguid":"0e93f245-b628-4826-90c7-e1aacfd40eaf" },
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=AKAOjst-GgtSSV7Yzi7Uj_SbbGqnYiuKsCEmnVyjQy1sSr3Pldodat7---9Ns7xvlHntkhZSyQgP-e0k4oXJOJOWSwFBTnCMF36Ebk8XjWW_1aTCb2-_QNs4Mpht9a5kBksXzyewLDpp_taj4EYlxyF6BgV5BJ1kGtxAQL0F8Y0w3Ez578xgiWi1MSmzObsOIGy5H63pG8l9g-ek2Sco_pRM7halhvO_zIAPu7QZl_KTtNwPqzdvWFh0Ufi8_uDAl2EVkKXoZpM&sai=AMfl-YSxWfa5wwOZ89siGgJ1brZAEjfaXOkY6cDbF-8L-za8TKKkyp5P_fhfTnLMftYCXRYFJg_zCKy2UpKK95LG1U3ykcw50257fpYAEgypGB0YyVkKKpYHdqOVLIs&sig=Cg0ArKJSzG_58qqV9ZcnEAE&urlfix=1&adurl=;
</script>
<script
src="https://tpc.googlesyndication.com/pagead/js/r20180620/r20110914/activeview/osd_listener.js"></script><script
type="text/javascript">osdlfm(-1,'','BPseSg9I5W6_FBpStygWC6aWoDgAAAAAQATgByAEJwAIC4AIA4AQBoAYf0ggFCIAhEAE','',4184806750,true,'ud\u003d1\u0026la\u003d1\u0026alp\u003dxai\u0026alh\u003d1408570963\u0026',3,'CAASEuRoFpXXIAWbRobaarNQtESBmA','https://pagead2.googlesyndication.com/pcs/activeview?xai\u003dAKAOjsufB1pBNKRg0UN69yZxYxOIaOp8GABp4Ncr9o5PZtQM_NW3-ctnYKyJh0N1e2zpK0NXJ0WSbWvr1okN1FnNZM8wp29bkKP3iQc\u0026sig\u003dCg0ArKJSzNG5R-BR_zufEAE','');</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+AciWmZzWAAAAAnRSTlMAApidrBQAAAB9SURBVBjTbVEJDsAwCKI/4P+v7RQPmsxsrUZEtMC/HZmcjcDM0v44E4FAxzfRlyEJ7p1n5+PGgx7uxBV39e6KVjLGQK9uicexWEqMfdwe1Cd2RHGHHIqtB629vEK6U3imW3hIE00Pq+jZYC9+JSRuRNF25g2cm/5Ko8TKgAsUAAVVIUYsbwAAAABJRU5ErkJggg==')
!important"></div>