function generateLegend(conteneur){if(!document.getElementById||!document.createElement)return;var image_loupe='http://m.bestofmedia.com/i/presencepc/design/loupe.gif';var conteneur=(conteneur)?$(conteneur):document;var images=$A($(conteneur).getElementsByClassName('imgContent'));for(var i=0;i<images.length;i++){if(images[i].getElementsBySelector('a')[0]){var text_legend=images[i].getElementsBySelector('img')[0].title;if(text_legend=='')text_legend='Zoom';var source_a_tag=images[i].getElementsBySelector('a')[0];var url_legend=source_a_tag.href;var larg=images[i].getElementsBySelector('img')[0].width;var blockLegend=document.createElement('span');if(text_legend=='Zoom'&&url_legend.substr(0,30)=='http://www.tomshardware.de')text_legend='Vergrößern ';if(text_legend=='Zoom'&&url_legend.substr(0,26)=='http://www.tomshardware.tw')text_legend='放大 ';if(text_legend=='Zoom'&&url_legend.substr(0,26)=='http://www.tomshardware.com/cn')text_legend='放大 ';blockLegend.className='spipLegend';blockLegend.style.width=larg+'px';var loupe=document.createElement('img');loupe.setAttribute('src',image_loupe);loupe.setAttribute('alt','');loupe.style.marginRight='3px';var lien=document.createElement('a');lien.setAttribute('href',url_legend);if(url_legend.charAt(url_legend.length-1)=='#'||!source_a_tag.hasAttribute('href')||url_legend==''){var onclick_legend=images[i].getElementsBySelector('a')[0].onclick;lien.onclick=onclick_legend}if(images[i].getElementsByClassName('spipLegend')[0]==undefined){var texte=document.createTextNode(text_legend);lien.appendChild(texte);blockLegend.appendChild(loupe);blockLegend.appendChild(lien);images[i].appendChild(blockLegend);if(navigator.appName=='Microsoft Internet Explorer'){if((images[i].className.indexOf('imgLeft')!=-1)||(images[i].className.indexOf('imgRight')!=-1))images[i].style.width=larg+'px'}}}}}
