/**
* http://blogs-google.blogspot.com/
* Si vous utilisez ce script , laissez cette entete merci d'avance 
* If you use this script, please let this header. thanks
*
*/
var oDmu={_Testinit:function(){if(typeof(oDmd$.Hostn)=='undefined')return false;if(typeof(oDmd$.Nomdiv)=='undefined'){oDmd$.Nomdiv='derniersmessages'}if(typeof(oDmd$.Feedtype)=='undefined'){oDmd$.Feedtype='posts'}if(typeof(oDmd$.Maxresults)=='undefined'){var iData=oDmu._Trouve(oDmd$.Nomdiv);if(iData==0)oDmd$.Maxresults=10;else oDmd$.Maxresults=iData}},_Previousdeep:function(oNoeud){if(!oNoeud)return null;while(oNoeud.childNodes.length){oNoeud=oNoeud.lastChild}return oNoeud},_Prevnode:function(oNoeud){if(!oNoeud)return null;if(oNoeud.previousSibling){return oDmu._Previousdeep(oNoeud.previousSibling)}return oNoeud.parentNode},_ExtraireNombre:function(chaine){var sExp=new RegExp("[0-9]+");var aNombre=chaine.match(sExp);var iRetour=0;if(aNombre!=null){iRetour=parseInt(aNombre[0])}return iRetour},_Trouve:function(Idv){var oElement=document.getElementById(Idv);var oParent=oElement.parentNode;var iValeur=0;var oGparent=oDmu._Prevnode(oParent);while(oGparent.nodeName!='H2'){if(oGparent.nodeType==3){iValeur=oGparent.nodeValue}oGparent=oDmu._Prevnode(oGparent)}iValeur=oDmu._ExtraireNombre(iValeur);if(iValeur==0){iValeur=10}return iValeur}};
function listlastEntries(json){removeOldResults();var ul=document.createElement('ul');for(var i=0;i<json.feed.entry.length;i++){var entry=json.feed.entry[i];var alturl;for(var k=0;k<entry.link.length;k++){if(entry.link[k].rel=='alternate'){alturl=entry.link[k].href;break}}var li=document.createElement('li');var a=document.createElement('a');a.href=alturl;var txt=document.createTextNode(entry.title.$t);a.appendChild(txt);li.appendChild(a);ul.appendChild(li)}document.getElementById(oDmd$.Nomdiv).appendChild(ul)}function Searchlast(query){removeOldJSONScriptNodes();removeOldResults();var div=document.getElementById(oDmd$.Nomdiv);var p=document.createElement('p');p.appendChild(document.createTextNode('Chargement...'));div.appendChild(p);var script=document.createElement('script');script.setAttribute('src','http://'+query+'/feeds/'+oDmd$.Feedtype+'/default?max-results='+oDmd$.Maxresults+'&alt=json-in-script&callback=listlastEntries');script.setAttribute('id','jsonScript');script.setAttribute('type','text/javascript');document.documentElement.firstChild.appendChild(script)}function removeOldJSONScriptNodes(){var jsonScript=document.getElementById('jsonScript');if(jsonScript){jsonScript.parentNode.removeChild(jsonScript)}}function removeOldResults(){var div=document.getElementById(oDmd$.Nomdiv);if(div.firstChild){div.removeChild(div.firstChild)}}
