function displayRSS(URI,myid,page) { var URL = URI+escape('&so='+page+''); var xmlhttp=false; var mydiv = document.getElementById(myid); mydiv.innerHTML = ""; /*@cc_on @*/ /*@if (@_jscript_version >= 5) // JScript gives us Conditional compilation, we can cope with old IE versions. // and security blocked creation of the objects. try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } @end @*/ if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } xmlhttp.open("GET", URL,true); mytag = document.createElement("p"); mytag.setAttribute('align','center'); image = document.createElement('img'); image.setAttribute('border','0'); image.src = '../img/wait.gif'; mytag.appendChild(image); mydiv.appendChild(mytag); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { xmlDoc=xmlhttp.responseXML; items=xmlDoc; formatRSS(); } } xmlhttp.send(null); function formatRSS() { var items_count=items.getElementsByTagName('item').length; if(items_count == 0) { ptag = document.createElement("p"); ptag.appendChild(document.createTextNode("Error")); mydiv.appendChild(ptag); return; } //contenu var spantag = ''; spantag += '
';
if(page > 0){
var prec = eval(page) - 1;
spantag += '
';
}
var suiv = eval(page) + 1;
spantag += '
';
spantag += '
';
spantag += '';
}
}
mydiv.innerHTML = spantag;
}
}