function tellerror(){} window.onerror=tellerror /* document.write(''); */ var id_rotaban = 'RotaTAC_11037'; ban_affich = new Array(); ban_affich[1148] = '1148'; ban_affich[1151] = '1151'; ban_affich[1377] = '1377'; ban_affich[1382] = '1382'; ban_affich[1384] = '1384'; ban_affich[1599] = '1599'; ban_affich[1602] = '1602'; ban_affich[1605] = '1605'; ban_affich[1614] = '1614'; ban_affich[1615] = '1615'; ban_affich[1739] = '1739'; ban_affich[1741] = '1741'; ban_affich[1977] = '1977'; ban_affich[1979] = '1979'; ban_affich[1982] = '1982'; ban_affich[1984] = '1984'; ban_affich[2286] = '2286'; ban_affich[2292] = '2292'; ban_affich[2297] = '2297'; ban_affich[2298] = '2298'; ban_affich[2300] = '2300'; ban_affich[2302] = '2302'; ban_affich[3109] = '3109'; ban_affich[3113] = '3113'; ban_affich[3115] = '3115'; ban_affich[3117] = '3117'; ban_affich[6057] = '6057'; ban_affich[6058] = '6058'; ban_affich[6059] = '6059'; ban_affich[6060] = '6060'; ban_affich[6827] = '6827'; ban_affich[8851] = '8851'; ban_affich[8857] = '8857'; ban_affich[10352] = '10352'; ban_affich[10357] = '10357'; ban_affich[10360] = '10360'; ban_affich[10362] = '10362'; ban_affich[15381] = '15381'; ban_affich[15481] = '15481'; ban_affich[15521] = '15521'; ban_affich[15523] = '15523'; ban_affich[15549] = '15549'; var concat_js = '1148|1151|1377|1382|1384|1599|1602|1605|1614|1615|1739|1741|1977|1979|1982|1984|2286|2292|2297|2298|2300|2302|3109|3113|3115|3117|6057|6058|6059|6060|6827|8851|8857|10352|10357|10360|10362|15381|15481|15521|15523|15549|'; /* 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('');