Делаем картинки как на Яндексе:
Code
<script>
var aPictures = new Array();
var oTemp = new Object();
var nPMaxX, nPMaxY;
oTemp.x = nPMaxX = 450;
oTemp.y = nPMaxY = 450;
oTemp.s ='$OTHER1$';
aPictures[aPictures.length] = oTemp;
</script><table cellpadding="0" cellspacing="0" border="0"><tr><td>
<a href="$OTHER1$" onclick="open_photo(); return false"><img src="$OTHER1$" alt="" title="Увеличить" border="0"></a></p></td></tr></table>
<script type="text/javascript">
function open_photo(pos){
var imgnum = pos || 0;
var hp = 100 + nPMaxY;
var wp = 20 + nPMaxX;
var vphoto = window.open("","Bigphoto","copyhistory=0,directories=0,width="+wp+",height="+hp+"");
vphoto.document.write('<script>\n');
vphoto.document.write('var pcounter = 0;\n');
vphoto.document.write('var aPictures = new Array();\n');
var i;
for(i=0;i < aPictures.length; ++i){vphoto.document.write('aPictures['+i+']="'+aPictures[i].s+'";\n');}
vphoto.document.write('function next(){var c=pcounter+1==aPictures.length?0:pcounter+1; set(c);}');
vphoto.document.write('function prev(){var c=pcounter==0?aPictures.length-1:pcounter-1; set(c);}');
vphoto.document.write('function set(c){');
vphoto.document.write('var oldlink = document.getElementById("counter" + pcounter);');
vphoto.document.write('if(!oldlink){return true;}');
vphoto.document.write('oldlink.style.borderColor = "white";');
vphoto.document.write('var newlink = document.getElementById("counter" + c);');
vphoto.document.write('newlink.style.borderColor = "#BEBEBE"; pcounter = c;'); vphoto.document.write('document.getElementById("bigpicture").src=aPictures[pcounter];');
vphoto.document.write('newlink.style.borderColor = "#BEBEBE"; pcounter = c;'); vphoto.document.write('return true;');
vphoto.document.write('}');
vphoto.document.write('</scr'+'ipt>');
vphoto.document.write("<div align=center>");
vphoto.document.write("<b>$ENTRY_NAME$</b>");
vphoto.document.write("<br>");
if(aPictures.length > 1){
vphoto.document.write("<table><tr><td width='40%'></td>");
var c;
for (c=0;c < aPictures.length; ++c){
vphoto.document.write("<td id='counter"+c+"' style='padding:4px;border:1px solid white;'><a href='#' onclick='set("+c+"); return false;'><img border='0' src='"+(aPictures[c].s)+"&size=1'/></a></td>");
}
}
vphoto.document.write("<td width='40%'></td></tr></table>");
vphoto.document.write("<div style='height:"+nPMaxY+";width:"+nPMaxX+";' title='Кликните, чтобы закрыть'>");
vphoto.document.write("<a href='javascript:window.close();'>");
vphoto.document.write("<img id='bigpicture' src='$OTHER1$' border='0'>");
vphoto.document.write("</a>");
vphoto.document.write("</div>");
vphoto.document.write("</div>");
vphoto.document.write('<scr'+'ipt>');
vphoto.document.write("set("+imgnum+");");
vphoto.document.write('</scr'+'ipt>');
vphoto.focus();
vphoto.document.close();
return false;
}
</script>
)