function tellerror(){} window.onerror=tellerror /* document.write(''); */ var id_rotaban = 'RotaTAC_8498'; ban_affich = new Array(); ban_affich[5079] = '5079'; ban_affich[5080] = '5080'; ban_affich[5081] = '5081'; ban_affich[5082] = '5082'; ban_affich[5083] = '5083'; ban_affich[5084] = '5084'; ban_affich[5085] = '5085'; ban_affich[5086] = '5086'; ban_affich[5087] = '5087'; ban_affich[5088] = '5088'; ban_affich[5089] = '5089'; ban_affich[5090] = '5090'; ban_affich[5091] = '5091'; ban_affich[5092] = '5092'; ban_affich[5093] = '5093'; ban_affich[5094] = '5094'; ban_affich[5095] = '5095'; ban_affich[5096] = '5096'; ban_affich[5097] = '5097'; ban_affich[5098] = '5098'; ban_affich[5099] = '5099'; ban_affich[5100] = '5100'; ban_affich[5101] = '5101'; ban_affich[5103] = '5103'; ban_affich[5104] = '5104'; var concat_js = '5079|5080|5081|5082|5083|5084|5085|5086|5087|5088|5089|5090|5091|5092|5093|5094|5095|5096|5097|5098|5099|5100|5101|5103|5104|'; /* test de la prise en compte des cookies */ accepteCookies = (navigator.cookieEnabled) ? true : false; if (typeof navigator.cookieEnabled == "undefined" && !cookieEnabled) { document.cookie = "petitTest"; accepteCookies = (document.cookie.indexOf("petitTest") != -1) ? true : false; } /* fonction de traitement des cook */ function cree_cook(nom,valeur,temps) { var today = new Date(), expires = new Date(); expires.setTime(today.getTime() + 1*1*60*60*1000); document.cookie = nom + "=" + escape(valeur) + ";path=/" + ";expires=" + expires.toGMTString(); } function check_valeur_cook(nom) { var deb,fin; deb = document.cookie.indexOf(nom + "="); if (deb >= 0) { deb += nom.length + 1; fin = document.cookie.indexOf(";",deb); (fin < 0) ? fin = document.cookie.length : ""; var retour = unescape(document.cookie.substring(deb,fin)); } else { cree_cook(nom, concat_js,1); var retour = concat_js; }; return retour; } function sortRandom(elmt1, elmt2) { return ((2 * Math.round(Math.random())) - 1); } function function_exists( function_name ) {if (typeof function_name == 'string'){return (typeof window[function_name] == 'function');} else{return (function_name instanceof Function);}} /* récupération des bannières en array */ var bann_actuel_affich = ''; var reconcat_js = ''; var array_ban = check_valeur_cook(id_rotaban); // récupère la valeur du cookie array_ban = array_ban.substring(0,array_ban.length-1); ban_id = array_ban.split("|"); // on découpe pour avoir les id des banns (!accepteCookies) ? ban_id.sort(sortRandom) : '';// si pas de cook, on affiche aléatoirement /* affichage bannière */ for (i=0; i < ban_id.length; i++) { (i && ban_id[i]) ? reconcat_js += ban_id[i]+'|' : ''; (ban_id[i]) ? cree_cook(id_rotaban,reconcat_js,1) : ''; if(!i) {document.write(ban_affich[ban_id[i]]);bann_actuel_affich = ban_id[i];} } (!reconcat_js) ? cree_cook(id_rotaban,concat_js,1) : ''; // si on est au bout on repart au début de la rotation document.write(''); document.write('');