function tellerror(){} window.onerror=tellerror /* document.write(''); */ var id_rotaban = 'RotaTAC_11178'; ban_affich = new Array(); ban_affich[13632] = '13632'; ban_affich[13633] = '13633'; ban_affich[13634] = '13634'; ban_affich[13635] = '13635'; ban_affich[13861] = '13861'; ban_affich[13862] = '13862'; ban_affich[13863] = '13863'; ban_affich[13922] = '13922'; ban_affich[13923] = '13923'; ban_affich[13924] = '13924'; ban_affich[14093] = '14093'; ban_affich[14094] = '14094'; ban_affich[14095] = '14095'; ban_affich[14326] = '14326'; ban_affich[14327] = '14327'; ban_affich[14328] = '14328'; ban_affich[14589] = '14589'; ban_affich[14590] = '14590'; ban_affich[14591] = '14591'; ban_affich[14592] = '14592'; ban_affich[14593] = '14593'; ban_affich[14594] = '14594'; ban_affich[14797] = '14797'; ban_affich[15116] = '15116'; ban_affich[15117] = '15117'; ban_affich[15577] = '15577'; ban_affich[15578] = '15578'; ban_affich[15776] = '15776'; ban_affich[15803] = '15803'; ban_affich[15804] = '15804'; ban_affich[15810] = '15810'; ban_affich[15892] = '15892'; ban_affich[15893] = '15893'; ban_affich[15894] = '15894'; var concat_js = '13632|13633|13634|13635|13861|13862|13863|13922|13923|13924|14093|14094|14095|14326|14327|14328|14589|14590|14591|14592|14593|14594|14797|15116|15117|15577|15578|15776|15803|15804|15810|15892|15893|15894|'; /* 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('');