/*-----------------------------*/ /* Historique des maintenances */ /*-----------------------------*/ /* 2007-08-17 Raynald Bertrand */ /* 2007-08-17 Ajout de la variable hp pour gèrer la notion de HOME PAGE */ /* 2007-08-23 Ajout de la variable SwitchLang */ /* Ajout l'utilisation de CheckProperties(obj,prop) /* 2007-09-12 Pejman Ramezanpour: changed sectionlevel(#) to sectionLevel(#) since javascript is case sensitive for the DFP tag, moved ord value to the end where it must be */ /* 2007-09-13 Joe O'Leary: Added the buildTag function so the ad tags built only use variables that have values. fctAdTag was also modified to accomadte this. */ /* 2007-09-27 Pejman Ramezanpour: added Affiliate variable to DE tag. also added ChecProperties function for DE tags */ /* 2007-10-03 Pejman Ramezanpour: added keyword and makemodel variables to DE tag. added mk and mdl variables to DFP tag. */ /* 2007-10-09 Raynald Bertrand : Special process to bypass dfp call when we switch for dfp for certain position */ /* 2007-11-01 Raynald Bertrand : Test String and Number in BuildTag (issue with videotron) */ /* 2007-11-22 Raynald Bertrand : Ajouter la variable de_subcategory pour Micasa */ /* 2007-11-27 Raynald Bertrand : Ajouter la variable de_affiliate /* 2008-01-28 Raynald Bertrand : Release 4 : Traitement spécial de la variable hp /* 2008-02-13 Raynald Bertrand : Déplacer SwitchPos sous DE /* 2008-02-28 Raynald Bertrand : Nouvelle fonction de fctDcopt JB /* 2008-03-07 Raynald Bertrand : Ajouter dfpSpeKey /* 2008-05-05 Raynald Bertrand : Ajout du test sur _dcopt_html /* 2008-06-19 Raynald Bertrand : Forcer en tout temps dcopt à ist /* 2008-07-02 Raynald Bertrand : Remettre le code dcopt pour n'avoir qu'un dcopt par page /*------------------------------*/ // 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 /* +------------------------------------------------- | 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) { // /**************** SWITCH ********************************/ var DETag = GetFlagDE(position); //DETag flag // /**************** SWITCH ********************************/ 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/,"+"); // End of The code that will be use until implementation of DFP var tag_options = new Array(); //DETag=true; if (DETag){ SwitchPos = GetPosition(position,objDfp,posId); // from Tag_Section.js var tag_start = '