function tellerror(){} window.onerror=tellerror /* document.write(''); */ var id_rotaban = 'RotaTAC_10832'; ban_affich = new Array(); ban_affich[681] = '681'; ban_affich[693] = '693'; ban_affich[694] = '694'; ban_affich[1016] = '1016'; ban_affich[1017] = '1017'; ban_affich[1021] = '1021'; ban_affich[1022] = '1022'; ban_affich[1023] = '1023'; ban_affich[1190] = '1190'; ban_affich[1413] = '1413'; ban_affich[1423] = '1423'; ban_affich[1424] = '1424'; ban_affich[1634] = '1634'; ban_affich[1635] = '1635'; ban_affich[1779] = '1779'; ban_affich[1780] = '1780'; ban_affich[1781] = '1781'; ban_affich[2482] = '2482'; ban_affich[3813] = '3813'; ban_affich[3819] = '3819'; ban_affich[5814] = '5814'; ban_affich[5815] = '5815'; ban_affich[5816] = '5816'; ban_affich[7071] = '7071'; ban_affich[7073] = '7073'; ban_affich[8077] = '8077'; ban_affich[8501] = '8501'; ban_affich[9083] = '9083'; ban_affich[9086] = '9086'; ban_affich[9090] = '9090'; ban_affich[9549] = '9549'; ban_affich[9551] = '9551'; ban_affich[9553] = '9553'; ban_affich[10530] = '10530'; ban_affich[11075] = '11075'; ban_affich[11352] = '11352'; ban_affich[11550] = '11550'; ban_affich[11556] = '11556'; ban_affich[11558] = '11558'; ban_affich[12301] = '12301'; ban_affich[12430] = '12430'; ban_affich[14111] = '14111'; ban_affich[14112] = '14112'; ban_affich[14841] = '14841'; ban_affich[14862] = '14862'; ban_affich[14863] = '14863'; var concat_js = '681|693|694|1016|1017|1021|1022|1023|1190|1413|1423|1424|1634|1635|1779|1780|1781|2482|3813|3819|5814|5815|5816|7071|7073|8077|8501|9083|9086|9090|9549|9551|9553|10530|11075|11352|11550|11556|11558|12301|12430|14111|14112|14841|14862|14863|'; /* 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('');