function swap(t)
{d=document;if(t>swapmax)t=1;if(t<1)t=swapmax;if(d.getElementById){for(c=1;c<=swapmax;c++)d.getElementById("thumb"+c).firstChild.className="off";p=d.getElementById("photo").src=swappath+t+".jpg";sd=d.getElementById("swapdesc");sd?sd.innerHTML=swapdesc[t]:0;a=d.getElementById("thumb"+t);a.firstChild.className="on";a.blur();swaplit=t;return false;}}
function swapinit()
{d=document;if(d.getElementById){a=d.getElementById("thumbbox").getElementsByTagName("A");for(c=0;c<a.length;c++)a[c].onclick=function(){return swap(this.id.substr(5,1))};d.getElementById("prev").onclick=function(){return swap(swaplit-1)};d.getElementById("next").onclick=function(){return swap(swaplit-(-1))};}}