var current_photo;var limit=14;function showPic(_1){var _2=_1.id;var _3=document.getElementById("previous");var _4=document.getElementById("next");var _5=current_photo+1;var _6=document.getElementById("image");var _7=_1.getAttribute("href");_6.setAttribute("src",_7);(_2=="previous"?current_photo--:current_photo++);_3.className="";_4.className="";if(current_photo==0){_3.setAttribute("href","");_3.className="inactive";_4.setAttribute("href","images/gallery_"+(current_photo+1)+".jpg");}else{_3.setAttribute("href","images/gallery_"+(current_photo-1)+".jpg");preloadImage(_5);}
if(current_photo==limit){_4.setAttribute("href","");_4.className="inactive";_3.setAttribute("href","images/gallery_"+(current_photo-1)+".jpg");}else{_4.setAttribute("href","images/gallery_"+(current_photo+1)+".jpg");}}
function prepareGallery(){if(!document.getElementsByTagName||!document.getElementById){return false;}
current_photo=0;var _8=document.getElementById("previous");var _9=document.getElementById("next");_8.onclick=function(){if(current_photo!=0){showPic(this);}
return false;};_9.onclick=function(){if(current_photo!=limit){showPic(this);}
return false;};}
addLoadEvent(prepareGallery);