Programatic output of views block breaks jquery I am using the following code to load a views slideshow block:

  &lt;?php
            $view       =   'pagetopimage';
            $block_id   =   'block_1';
            $args       =   array(32);
            print views_embed_view( $view, $block_id, $args );
        ?&gt;


The block is produced just fine but the javascript that makes the slideshow work is abscent.

 Can you enlighten me about a way to programmatically load the block whilst maintaining the javascript functionality, please?
I would assume you are just missing the jQuery Cycle plugin.  You might try adding 

drupal_add_js(drupal_get_path('module', 'views_slideshow') . '/js/jquery.cycle.all.min.js');
drupal_add_js(drupal_get_path('module', 'views_slideshow') . '/contrib/views_slideshow_singleframe/views_slideshow.js');


before outputting the view and see if that works.