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; } $("#launchShow").text("Stop Slideshow"); var active = setInterval("s.nextPage()",interval); function endShow(active) { clearInterval(active); $("#launchShow") .click(function() { s.page=0; s.init(); $("#launchShow").text("Stop Slideshow"); } } $("#launchShow") .click(function() { endShow(active); }) .text("Start Slideshow"); }, 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">Start Slideshow</button>