diff --git a/scripts/im.js b/scripts/im.js index b184c2d4..aa3ac22c 100644 --- a/scripts/im.js +++ b/scripts/im.js @@ -22,28 +22,35 @@ function im(id, thumb, image, cmd) try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer } - catch (e) { - try { - xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); - } catch (e) { - alert("Your browser does not support AJAX!"); - return false; + try { + xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); + } + catch (e) { + alert("Your browser does not support AJAX!"); + return false; + } } - } - } + } - xmlHttp.onreadystatechange = function() - { - if(xmlHttp.readyState == 4) - { - if (xmlHttp.responseText != "") - alert(xmlHttp.responseText); - document.getElementById(id).src = thumb+'?'+dummy; - dummy++; - } - } + xmlHttp.onreadystatechange = function() + { + if(xmlHttp.readyState == 4) { + if (xmlHttp.responseText != "" && + xmlHttp.responseText.search(/Fonts/) == -1) + alert(xmlHttp.responseText); + o = document.getElementById(id); + if (o) + o.src = thumb+'?'+dummy; + for (i=0 ; i<8 ; i++) { + o = document.getElementById(id+'_'+i); + if (o) + o.src = thumb+'-'+i+'.png'+'?'+dummy; + } + dummy++; + } + } - xmlHttp.open("GET","?cmd=im&req="+cmd+"&img="+image, true); - xmlHttp.send(null); + xmlHttp.open("GET","?cmd=im&req="+cmd+"&img="+image, true); + xmlHttp.send(null); }