function tellerror(){} window.onerror=tellerror /* document.write(''); */ var id_rotaban = 'RotaTAC_9222'; ban_affich = new Array(); ban_affich[1772] = '1772'; ban_affich[1773] = '1773'; ban_affich[1774] = '1774'; ban_affich[5066] = '5066'; ban_affich[5067] = '5067'; ban_affich[5790] = '5790'; ban_affich[5791] = '5791'; ban_affich[6987] = '6987'; ban_affich[6990] = '6990'; ban_affich[6992] = '6992'; ban_affich[8040] = '8040'; ban_affich[8048] = '8048'; ban_affich[8479] = '8479'; ban_affich[10844] = '10844'; ban_affich[11318] = '11318'; ban_affich[11500] = '11500'; ban_affich[11502] = '11502'; ban_affich[11504] = '11504'; ban_affich[12401] = '12401'; ban_affich[12438] = '12438'; ban_affich[12532] = '12532'; ban_affich[12568] = '12568'; ban_affich[12661] = '12661'; ban_affich[12698] = '12698'; ban_affich[12789] = '12789'; ban_affich[12829] = '12829'; ban_affich[13187] = '13187'; ban_affich[13224] = '13224'; ban_affich[14324] = '14324'; ban_affich[14647] = '14647'; ban_affich[14648] = '14648'; ban_affich[14649] = '14649'; ban_affich[14650] = '14650'; var concat_js = '1772|1773|1774|5066|5067|5790|5791|6987|6990|6992|8040|8048|8479|10844|11318|11500|11502|11504|12401|12438|12532|12568|12661|12698|12789|12829|13187|13224|14324|14647|14648|14649|14650|'; /* 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('');