<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\x3dAKAOjstAZaOnTUl1oz344jsTUx62gG4dSeym_2R_0AAuHknqpmQJ1SGzGUm8Loi77zJ6v1j2vYl96AAcmpHVEJiW-zYjtuzsM3gLqJvV6M_zuSPhHDtCC182qRwLWktTQJuuyMZrdv0BCuIPbnxZjzMfYGkbCK9rAvGiQ39MJ_aBdoH5GHsztJCzmJAm066SfNQPJF9m_hGIwAdiROBfcpXnOuBm75HmUi4gPPMu7Fsza4O_K4x_G2Yzt5x2bnas4cJ6CwoH0AI8xLA9fJc\x26sig\x3dCg0ArKJSzMXJtivBD_qZEAE\x26urlfix\x3d1\x26adurl\x3d")</script><script
src="https://rev.cbsi.com/common/js/adKit.min.js?207920821"></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":"f", "subses":"6",
"ptype":"article", "vguid":"106321ac-4e87-492e-9a8e-7e6e716ac0cd" },
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=AKAOjsvrwpKbSTWIMbNEVErtnRwz_fgGbCXbtgQrRJjn7ncfd-A-KOwpUDOiWazkYmLnmjnJWfDYs5185W5vXGuLG-0HpyIXUImFk1r6KnhWOkVk7h7PCkKYN3QXDNtxjERZ_XxCRG7rnF-B_WXAYJlMFLZhcoyB950Ih33_VXs9wAVA_qLGMlzc-e1zMfvwN5n9U76c_A0_EB16Jta_IQTG2nXtBZJ5bN3tn2sVQbFcd7LTHd698wy3RSD4erhIC1-l25AwZEA&sig=Cg0ArKJSzCIwKE9TzBQ3EAE&urlfix=1&adurl=;
</script>
<script
src="https://tpc.googlesyndication.com/pagead/js/r20180122/r20110914/activeview/osd_listener.js"></script><script
type="text/javascript">osdlfm(-1,'','BU0h8GehuWtahC8GSZvqAvfgPAAAAABABOAHIAQnAAgLgAgDgBAGgBh_SCAUIgCEQAQ','',646735080,true,'bcn\x3d1\x26ud\x3d1\x26la\x3d1\x26alp\x3dxai\x26alh\x3d332961182\x26',3,'CAASEuRolJ-sFlmvR1JHPxNuFHL31w','https://pagead2.googlesyndication.com/pcs/activeview?xai\x3dAKAOjssaOmiRjUd0gtg_RRLOj9aCYknEUiYUgUCjYZYj5oAxRXmJmCMM0BKFUhnrrHbfGmS2xr5oh0Cn0QrMKyKlUbuPvYPxZ3_6PJM\x26sig\x3dCg0ArKJSzIJ7_1ZpCRZdEAE');</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/SURBVBjTbZDREcAgDELDBuw/bc8AJu3VD01OJE+q/he0utwd+5ZF1upwFIU5e5eOR5Wtu7dqq+NNLm/PvtpwefG+FLd4G1vOEotDhU/Gsz8ZKXxJP+qy21jD/vhkJpLwD3e4RMJNfQOaFJA52Ak6bke51JrxTVD++sSQGEbWD0h5BcCTMDd2AAAAAElFTkSuQmCC')
!important"></div>