rendered paste body<script>function SlideShow(div) { var $d = $("#"+div); var s = { cookie:readCookie('licGallery'), page:0; init:function() { var interval; if (s.cookie) { interval = s.cookie; } else { interval = 5000; } var active = setInterval("s.nextPage()",interval); function endShow(active) { clearInterval(active); $("#launchShow") .click(function() { s.page=0; s.init(); } } $("#launchShow").click(function(){endShow(active)}); }, nextPage:function() { s.page++; $(d).load("slideshowcontent.php",{page:s.page}); } } return s;}$(function) { var slideShow = new SlideShow("myDiv"); $("#launchShow") .click(function() { slideShow.init(); }); });</script><div id="myDiv"></div><button id="launchShow">Launch Show</button>