rendered paste body<a href="javascript:void(0);" onclick="showPics(-1)" id="prev">prev</a>
<img id="img1" src="" />
<img id="img2" src="" />
<img id="img3" src="" />
<a href="javascript:void(0);" onclick="showPics(1);" id="next">Next</a>
<script>
var $pad ='../../gfx/thumb/';
var $foto = new Array();
$foto[0] = 'thumb1.jpg';
$foto[1] = 'thumb2.jpg';
$foto[2] = 'thumb3.jpg';
$foto[3] = 'thumb4.jpg';
var $pos = 1;
function wrap(index, length) {
if (0 < index && index < length) { return index; }
else if (0 < index) { return 0; }
else { return length - index - 1; }
}
function showPics($stap) {
$pos += $stap;
document.getElementById('img1').src = $pad + $foto[wrap($pos-1, $foto.length)];
document.getElementById('img2').src = $pad + $foto[wrap($pos, $foto.length)];
document.getElementById('img3').src = $pad + $foto[wrap($pos+1, $foto.length)];
}
showPics(0);
</script>