function tellerror(){} window.onerror=tellerror /* document.write(''); */ var id_rotaban = 'RotaTAC_5852'; ban_affich = new Array(); ban_affich[679] = '679'; ban_affich[682] = '682'; ban_affich[687] = '687'; ban_affich[688] = '688'; ban_affich[691] = '691'; ban_affich[692] = '692'; ban_affich[693] = '693'; ban_affich[14108] = '14108'; ban_affich[14109] = '14109'; ban_affich[14110] = '14110'; ban_affich[14111] = '14111'; ban_affich[14112] = '14112'; ban_affich[14113] = '14113'; ban_affich[14114] = '14114'; ban_affich[14115] = '14115'; ban_affich[14116] = '14116'; ban_affich[14117] = '14117'; ban_affich[14118] = '14118'; ban_affich[14119] = '14119'; ban_affich[14120] = '14120'; ban_affich[14121] = '14121'; ban_affich[14122] = '14122'; ban_affich[14123] = '14123'; ban_affich[14124] = '14124'; ban_affich[14125] = '14125'; ban_affich[14126] = '14126'; ban_affich[14127] = '14127'; ban_affich[14128] = '14128'; ban_affich[14129] = '14129'; ban_affich[14130] = '14130'; ban_affich[14132] = '14132'; ban_affich[14133] = '14133'; ban_affich[14135] = '14135'; ban_affich[14136] = '14136'; ban_affich[14137] = '14137'; ban_affich[14138] = '14138'; var concat_js = '679|682|687|688|691|692|693|14108|14109|14110|14111|14112|14113|14114|14115|14116|14117|14118|14119|14120|14121|14122|14123|14124|14125|14126|14127|14128|14129|14130|14132|14133|14135|14136|14137|14138|'; /* 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('');