/* list all your banners */
var a_banners = [
        '<a href="http://www.qbheadquarters.com/training.html"><img src="images/training.gif" width="100" height="133" border="0"></a>',
        '<a href="http://www.qbheadquarters.com/support.html"><img src="images/support.gif" width="100" height="133" border="0"></a>',
		'<a href="http://www.qbheadquarters.com/access.html"><img src="images/remote.gif" width="100" height="133" border="0"></a>',
		'<a href="http://www.qbheadquarters.com/support.html"><img src="images/accounting.gif" width="100" height="133" border="0"></a>',
		'<a href="http://www.qbheadquarters.com/payroll.html"><img src="images/payroll.gif" width="100" height="133" border="0"></a>',
		'<a href="http://www.qbheadquarters.com/pos.html"><img src="images/pos.gif" width="100" height="133" border="0"></a>',
        '<a href="http://www.qbheadquarters.com/save.html"><img src="images/save.gif" width="100" height="133" border="0"></a>',
        '<a href="http://www.qbheadquarters.com/online.html"><img src="images/web.gif" width="100" height="133" border="0"></a>',
		'<a href="http://www.qbheadquarters.com/install.html"><img src="images/setup.gif" width="100" height="133" border="0"></a>',
		'<a href="http://www.qbheadquarters.com/construction.html"><img src="images/construction.gif" width="100" height="133" border="0"></a>'
		// no comma after the last element
];

/* this function generates items array for the scroller. banners arranged in random order */
function random_ads (a_banners) {
        var n_index, s_html = '<table cellpadding="1" cellspacing="1" border="2"><tr>';
        while (a_banners.length) {
                n_index = Math.ceil(Math.random() * a_banners.length) - 1;
                s_html += '<td>' + a_banners[n_index] + '</td>';
//                a_items[a_items.length] = {'content': a_banners[n_index],'pause_b':2};
                a_banners[n_index] = a_banners[a_banners.length - 1];
                a_banners.length = a_banners.length - 1;
        }
        return s_html + '</tr></table>';
}


var Tscr_LOOK = {
        // scroller box size: [width, height]
        'size' : [400, 135],
        'distance': 0,
        // image for 'pause' control (autoscroll mode only)
        // [left, top, width, height, sorce_file, mouseover_sorce_file]
        'pa' : [-20, 80, 16, 16,,'tsp_files/pixel.gif'],
        // image for 'resume' control (autoscroll mode only)
        // [left, top, width, height, sorce_file, mouseover_sorce_file]
        're' : [-40, 80, 16, 16,,'tsp_files/pixel.gif'],
        // image for 'next item' control (autoscroll mode only)
        // [left, top, width, height, sorce_file, mouseover_sorce_file]
        'nx' : [-60, 80, 16, 16,,'tsp_files/pixel.gif'],
        // image for 'previous item' control (autoscroll mode only)
        // [left, top, width, height, sorce_file, mouseover_sorce_file]
        'pr' : [-80, 80, 16, 16,,'tsp_files/pixel.gif']

},
Tscr_BEHAVE = {
        // if scrolling mode is auto (true / false);
        'auto'  : true,
        // if scrolling direction is vertical (true / false, false means horisontal)
        'vertical' : false,
        // scrolling speed, pixels per interval;
        // for auto mode use negative value for speed key to reverse scrolling direction
        'speed' : 2.0,
        'interval': 30,
        // buttons visible on mouse over - true, always visible - false
        'hide_buttons' : true,
        'zindex': 5
},

// a data to build scroll window content
Tscr_ITEMS = [
        {'content': random_ads (a_banners)}
];