var header=document.getElementsByTagName("head")[0];if(header){var scripts=header.getElementsByTagName("script");var links=header.getElementsByTagName("link");var isScriptAlreadyExists=false;var isCommonAlreadyExist=false;for(var i=0;i<scripts.length;i++){var script=scripts[i];if(script.src.indexOf("hashtable.js")>0){isScriptAlreadyExists=true}if(script.src.indexOf("common.js")>0){isCommonAlreadyExist=true}if(isCommonAlreadyExist==true&&isScriptAlreadyExists==true){break}}if(isScriptAlreadyExists==false){var newScript=document.createElement("script");newScript.type="text/javascript";newScript.src="http://www.filigranes.be/js/methods/hashtable.js";header.appendChild(newScript)}if(isCommonAlreadyExist==false){var newScript=document.createElement("script");newScript.type="text/javascript";newScript.src="http://www.filigranes.be/js/methods/common.js";header.appendChild(newScript)}}var hashtable=undefined;function RSSViewer(a,c,b){this.DivID=a;this.RSSUrl=b;this.lastTabPage="";this.lastTabIndex=0;this.lastPage=0;this.limit=c;this.maxPage=0;this.xml="";this.RootUrl="http://www.filigranes.be/";this.FullPlayerVersion=false;if(hashtable==undefined){hashtable=new Hashtable()}hashtable_put(a,this)}GetRssData=function(a){if(a.DivID&&document.getElementById(a.DivID)){imgLoad=document.createElement("div");imgLoad.id="loading_"+a.DivID+"_Left";imgLoad.className="ImageLoading";document.getElementById(a.DivID).appendChild(imgLoad)}new Ajax.Request(a.RootUrl+"RSSViewer.ashx",{method:"get",onSuccess:function(b){a.OnGetRssData(b)},onFailure:function(){a.OnGetRssData()},parameters:{ms:new Date().getTime(),rssurl:a.RSSUrl}})};RSSViewer.prototype.OnGetRssData=function(b){divId=this.divID;if(b&&b.responseXML){this.xml=b.responseXML;var a=document.createElement("div");a.style.height="100%";a.id="RSSContent"+this.DivID;document.getElementById(this.DivID).appendChild(a);this.BuildHTML()}if(this.DivID){document.getElementById("loading_"+this.DivID+"_Left").style.display="none"}};NextRSSPage=function(b){var a=hashtable_get(b);if(a){if(a.lastPage+1<a.maxPage){a.lastPage=a.lastPage+1;a.BuildHTML()}}};PreviousRSSPage=function(b){var a=hashtable_get(b);if(a){if(a.lastPage-1>=0){a.lastPage=a.lastPage-1;a.BuildHTML()}}};RSSViewer.prototype.BuildHTML=function(){try{var o=this.xml.getElementsByTagName("item");if(document.getElementById("RSSContent"+this.DivID).hasChildNodes()){while(document.getElementById("RSSContent"+this.DivID).childNodes.length>=1){document.getElementById("RSSContent"+this.DivID).removeChild(document.getElementById("RSSContent"+this.DivID).firstChild)}}if(o&&o.length>0){this.maxPage=((this.limit>0)?Math.round((o.length/this.limit)+0.49999999999):0);var m=document.getElementById("RSSContent"+this.DivID);m.style.height="100%";var c=document.createElement("div");c.style.height="95%";c.style.overflow="auto";m.appendChild(c);var t=document.createElement("table");t.setAttribute("width","95%");t.setAttribute("border","0");t.setAttribute("cellpadding","0");t.setAttribute("cellspacing","0");c.appendChild(t);var a=document.createElement("tbody");t.appendChild(a);countNode=0;imax=0;imax=(this.lastPage*this.limit)+this.limit;if(imax>o.length){imax=o.length}for(j=(this.lastPage*this.limit);j<imax;j++){var v="";var g="";var p="";if(o[j].getElementsByTagName("title")&&o[j].getElementsByTagName("title").length>0&&o[j].getElementsByTagName("title")[0].firstChild){v=o[j].getElementsByTagName("title")[0].firstChild.nodeValue}if(o[j].getElementsByTagName("link")&&o[j].getElementsByTagName("link").length>0&&o[j].getElementsByTagName("link")[0].firstChild){g=o[j].getElementsByTagName("link")[0].firstChild.nodeValue}var q=document.createElement("tr");a.appendChild(q);tdTitle=document.createElement("td");q.appendChild(tdTitle);if(g){aUrl=document.createElement("a");aUrl.className="snap_shot";aUrl.setAttribute("href",g);aUrl.setAttribute("target","_self");aUrl.appendChild(document.createTextNode(v));tdTitle.appendChild(aUrl)}else{tdTitle.appendChild(document.createTextNode(v))}if(o[j].getElementsByTagName("dc:creator")&&o[j].getElementsByTagName("dc:creator").length>0&&o[j].getElementsByTagName("dc:creator")[0].firstChild){author=o[j].getElementsByTagName("dc:creator")[0].firstChild.nodeValue}if(o[j].getElementsByTagName("description")&&o[j].getElementsByTagName("description").length>0&&o[j].getElementsByTagName("description")[0].firstChild){p=o[j].getElementsByTagName("description")[0].firstChild.nodeValue}var l=document.createElement("tr");a.appendChild(l);tdContent=document.createElement("td");l.appendChild(tdContent);if(p){tdContent.innerHTML=p}if(o[j].getElementsByTagName("enclosure")&&o[j].getElementsByTagName("enclosure").length>0){var f="";for(k=0;k<o[j].getElementsByTagName("enclosure").length;k++){var b=o[j].getElementsByTagName("enclosure")[k].attributes.getNamedItem("url");var d=o[j].getElementsByTagName("enclosure")[k].attributes.getNamedItem("type");if(b&&d){if(d.nodeValue.toLowerCase()=="audio/mpeg"){if(this.FullPlayerVersion==false){trEnclosure=document.createElement("tr");a.appendChild(trEnclosure)}var n=b.nodeValue.split("/");var u=n[n.length-1];if(f!=""){f+="|"}f+=encodeURI(b.nodeValue);if(this.FullPlayerVersion==false){tdEnclosure=document.createElement("td");tdEnclosure.innerHTML="<a href='"+b.nodeValue+"'>"+u+'</a>  <object type="application/x-shockwave-flash" data="'+this.RootUrl+'js/Mp3Player/player_mp3_maxi.swf" width="200" height="20"><param name="wmode" value="transparent" /><param name="movie" value="'+this.RootUrl+'js/Mp3Player/player_mp3_maxi.swf" /><param name="FlashVars" value="mp3='+encodeURI(b.nodeValue)+'&amp;bgcolor1=ffffff&amp;bgcolor2=cccccc&amp;buttoncolor=999999&amp;buttonovercolor=0&amp;slidercolor1=cccccc&amp;slidercolor2=999999&amp;sliderovercolor=666666&amp;textcolor=0&amp;showvolume=1" /><p>'+u+"</p></object>";trEnclosure.appendChild(tdEnclosure)}}}}if(this.FullPlayerVersion==true){if(f!=""){trEnclosure=document.createElement("tr");a.appendChild(trEnclosure);tdEnclosure=document.createElement("td");tdEnclosure.innerHTML='<object type="application/x-shockwave-flash" data="'+this.RootUrl+'js/Mp3Player/player_mp3_multi.swf" width="300" height="100"><param name="movie" value="'+this.RootUrl+'js/Mp3Player/player_mp3_multi.swf" /><param name="bgcolor" value="#BA0032" /><param name="FlashVars" value="mp3='+encodeURI(f)+'&amp;width=250&amp;showvolume=1" /></object>';trEnclosure.appendChild(tdEnclosure)}}}}var r=document.createElement("div");r.className="Pager";m.appendChild(r);r.setAttribute("style","vertical-align:center;");var h=this.DivID;aPrevious=document.createElement("a");aPrevious.className="Previous";aPrevious.setAttribute("href","#PreviousRSS"+this.DivID);aPrevious.style.visibility=((this.lastPage!=0)?"":"hidden");aPrevious.setAttribute("onclick","javascript:PreviousRSSPage('"+this.DivID+"');");aPrevious.onclick=function(){PreviousRSSPage(h)};aPrevious.innerHTML="Précédent";r.appendChild(aPrevious);r.appendChild(document.createTextNode(""));aNext=document.createElement("a");aNext.className="Next";aNext.setAttribute("href","#NextRSS"+this.DivID);aNext.style.visibility=((imax!=o.length)?"":"hidden");aNext.setAttribute("onclick","javascript:NextRSSPage('"+this.DivID+"');");aNext.onclick=function(){NextRSSPage(h)};aNext.innerHTML="Suivant";r.appendChild(aNext);m.appendChild(r)}addSnap()}catch(s){}};
