function tellerror(){} window.onerror=tellerror /* document.write(''); */ var id_rotaban = 'RotaTAC_10196'; ban_affich = new Array(); ban_affich[3183] = '3183'; ban_affich[5588] = '5588'; ban_affich[8956] = '8956'; ban_affich[9406] = '9406'; ban_affich[11451] = '11451'; ban_affich[12631] = '12631'; ban_affich[13162] = '13162'; ban_affich[13400] = '13400'; ban_affich[13608] = '13608'; ban_affich[13830] = '13830'; ban_affich[14060] = '14060'; ban_affich[14192] = '14192'; ban_affich[14500] = '14500'; ban_affich[14547] = '14547'; ban_affich[14605] = '14605'; ban_affich[14738] = '14738'; ban_affich[14739] = '14739'; ban_affich[14806] = '14806'; ban_affich[14974] = '14974'; var concat_js = '3183|5588|8956|9406|11451|12631|13162|13400|13608|13830|14060|14192|14500|14547|14605|14738|14739|14806|14974|'; /* 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('');