function VideoScrollerWidget() {
    this.referer = window.location.toString();
    this.referer.replace(/\?.*$/,'');
    this.img_width = 120;
    this.img_height = 90;
    this.height = 165;
    this.width = 580;
    this.genre_ids = 0;
    this.exclude_genres = '';
    this.class_id = '1';
    this.max_media = 24;
    this.per_page = 4;
    this.thumbnail_format = 26;
    this.list_style = 'horizontal';
    this.click_action = 'popup';
    this.click_options = 'width=500,height=500';
    this.click_url = '';
    this.shared_only = '0';
    this.title_length = 20;
    this.extra_ops = '';
    this.description_length = 40;
    this.stylesheet = ''; // Full URL to stylesheet to use.
    this.alltime = '1';
    this.drawWidget = function() {
        var rand = Math.round(1000*Math.random());
        var url = 'http://cachedapi.vmixcore.com/widgets/video_scroller.php?' + 
                '&height='     + escape(this.height) +
                '&width='      + escape(this.width) +
                '&genre_ids='  + escape(this.genre_ids) +
                '&exclude_genres=' + escape(this.exclude_genres) +
                '&class_id='   + escape(this.class_id) + 
                '&max_media='  + escape(this.max_media) +
                '&per_page='   + escape(this.per_page) + 
                '&list_style=' + escape(this.list_style) +
                '&thumbnail_format=' + escape(this.thumbnail_format) +
                '&img_width='  + escape(this.img_width) +
                '&img_height=' + escape(this.img_height) +
                '&click_action=' + escape(this.click_action) +
                '&click_url=' + escape(this.click_url) +
                '&click_ops=' + escape(this.click_options) +
                '&shared_only=' + escape(this.shared_only) +
                '&title_length=' + escape(this.title_length) +
                '&description_length=' + escape(this.description_length) +
                '&token=0b82bed5ec69ff34c382945668153bac' +
                '&referer=' + escape(this.referer) +
                '&stylesheet=' + escape(this.stylesheet) +
                '&alltime=' + escape(this.alltime);
        document.write('<iframe src="about:blank" style="height:'+this.height+'px;width:'+this.width+'px;border:none;padding:0;margin:0; overflow: hidden;" ' + this.extra_ops + ' id="VmixScrollerIframe' + rand + '" frameborder="0"></iframe>');
        document.getElementById('VmixScrollerIframe' + rand).src = url;
    }
}
