/*-------------------------------------------*/ /* Last update : 2009-01-22 Raynald Bertrand /* - removed DE code /*-------------------------------------------*/ // Function for DCOPT Variable /* +------------------------------------------------- | DCOPT handler +------------------------------------------------- */ var _dcopt_data = new Array(); // internal data var _dcopt_html = new Array(); // external html var _dcopt_data_functions = new Array(); // internal functions /*POUR BIGBOX & VIDEO*/ /***************************************************************************************************/ var CanoeAdCallVideo = 'http://ad.doubleclick.net/pfadx/can.'+MyGenericTagVar.language+'.'+MyGenericTagVar.division+'.'+MyGenericTagVar.mainsection; //this section check all section level to return a value if there's one. if(MyGenericTagVar.sectionLevel2){ CanoeAdCallVideo = CanoeAdCallVideo + '/bcplayer-'+MyGenericTagVar.sectionLevel2 + ';'; } if(MyGenericTagVar.sectionLevel3){ CanoeAdCallVideo = CanoeAdCallVideo + 'subz1=' + MyGenericTagVar.sectionLevel3 + ';'; } if(MyGenericTagVar.sectionLevel4){ CanoeAdCallVideo = CanoeAdCallVideo + 'subz2=' + MyGenericTagVar.sectionLevel4 + ';'; } if(MyGenericTagVar.sectionLevel5){ CanoeAdCallVideo = CanoeAdCallVideo + 'subz3=' + MyGenericTagVar.sectionLevel5 + ';'; } if(MyGenericTagVar.dfpSpekey != null){ for (var itemKey in MyGenericTagVar.dfpSpeKey) { var CanoeAdCallVideo = CanoeAdCallVideo + itemKey + '=' + MyGenericTagVar.dfpSpeKey[itemKey] + ';'; } } var CanoeAdCallBigbox = 'http://ad.doubleclick.net/adi/can.'+MyGenericTagVar.language+'.'+MyGenericTagVar.division+'.'+MyGenericTagVar.mainsection; //this section check all section level to return a value if there's one. if(MyGenericTagVar.sectionLevel2){ CanoeAdCallBigbox = CanoeAdCallBigbox + '/bcplayer-'+MyGenericTagVar.sectionLevel2 + ';'; } if(MyGenericTagVar.sectionLevel3){ CanoeAdCallBigbox = CanoeAdCallBigbox + 'subz1=' + MyGenericTagVar.sectionLevel3 + ';'; } if(MyGenericTagVar.sectionLevel4){ CanoeAdCallBigbox = CanoeAdCallBigbox + 'subz2=' + MyGenericTagVar.sectionLevel4 + ';'; } if(MyGenericTagVar.sectionLevel5){ CanoeAdCallBigbox = CanoeAdCallBigbox + 'subz3=' + MyGenericTagVar.sectionLevel5 + ';'; } if(MyGenericTagVar.dfpSpekey != null){ for (var itemKey in MyGenericTagVar.dfpSpeKey) { var CanoeAdCallBigbox = CanoeAdCallBigbox + itemKey + '=' + MyGenericTagVar.dfpSpeKey[itemKey] + ';'; } } /***************************************************************************************************/ /* +------------------------------------------------- | fctDcopt() | processes all declared dcopt +------------------------------------------------- */ function fctDcopt() { var params = (arguments.length) ? arguments[0] : {}; // for each dcopt //---------------------- for (var type in _dcopt_html) { if ( typeof(_dcopt_html[type]) == "function" ) continue; var html = _dcopt_html[type]; // div //---------------------- var div = document.createElement('div'); div.setAttribute('id', 'dcopt_'+type); document.body.appendChild(div); // specific function //---------------------- if (typeof(_dcopt_data_functions[type]) == 'function') { _dcopt_data_functions[type](params); } // append content //---------------------- document.getElementById('dcopt_'+type).innerHTML = html; } return false; } function get_dcopt(mytile){ // dcopt = 'ist'; if( mytile == 1 ) { dcopt = 'ist'; } else{ dcopt = ''; } return dcopt; } // End function get_dcopt function buildTag(tag_start,tag_end,tag_options,seperator) { var ad_tag = tag_start; for (var i in tag_options) { if(tag_options[i] != "" && ( typeof(tag_options[i]) == 'string' || typeof(tag_options[i]) == 'number') ) { if (ad_tag != "") ad_tag += seperator; ad_tag = ad_tag + i + "=" + tag_options[i]; } } ad_tag = ad_tag + tag_end; return ad_tag; } function fctAdTag(position,objDfp,posId) { var size = GetDim(position); // Size Variable var my_dcopt =get_dcopt(objDfp.tile); // DCOPT Variable var my_keyword = get_keyword( 'q' );// motcle variable in LaToile my_keyword = my_keyword.replace(/%20/,"+"); var tag_options = new Array(); //------------------------------------------------------------------------------- // Special process to bypass dfp call when we switch for dfp for certain position // Take note that if dfpSwitch is on for a position we skip the call for dfp //------------------------------------------------------------------------------- if ( objDfp.dfpSwitch != null && objDfp.dfpSwitch[position] ) { return; } else { var tag_start = '