/* Cross browser Marquee script- © Dynamic Drive (www.dynamicdrive.com)
  For full source code, 100's more DHTML scripts, and Terms Of Use, visit http://www.dynamicdrive.com
  Credit MUST stay intact
  
  Modifications by BB (c) 2007

  -- this file to be placed in the HEAD;
  -- file marquee2.js is required in the BODY */

//Specify the marquee's width (in pixels)
var marqueewidth = "190px";
//Specify the marquee's height
var marqueeheight = "140px";
//Specify the marquee's marquee speed (larger is faster 1-10)
//Note that the ticker runs faster in firefox.
var marqueespeed = 1;  // recommended value= 3;
//configure background color of marquee box:
var marqueebgcolor = "#fff";
//configure text color in marquee box:
var marqueetextstyle = "color:#800000;font-weight:700;font-size:14pt";
// configure background text. Put a non-braking space here for no text
var marqueebgtext = "";
//Pause marquee onMousever (0=no. 1=yes)?
var pauseit = 1;

// Configure data for picture list
var pictureprefix = "img/bank";  // Name of pictures, script adds the sequence no.
var picturesuffix = ".jpg";                // Type of pictures. Any graphics will do. All pictures must be of same type
var numberofpictures = 8;                  // Number of real pictures, i.e. do not include separator pictures here!
var separatorimage = 'no';                // Separator image between pictures: yes or no (default). Make sure that 'yes' is spelled correctly!

//// No editing required below this line!! ////
/* Pre-load images voor Ticker */
var Pictures = new Array();
for (i=0; i<numberofpictures; i++) {
  Pictures[i] = new Image;
  Pictures[i].src =  pictureprefix + i + picturesuffix;
}

if (separatorimage == 'yes') {
  var Picture_xx = new Image;  // Picture-separator, may be ignored
  Picture_xx.src = pictureprefix + "xx" + picturesuffix;
}

function PictureList() {                  // compile picture sequence, start at random position
  var nn = Pictures.length;               // Separator pictures not yet included!
  var rr = Math.floor(Math.random()*nn);  // Choose first image to show
  var TheList = '';
  if (separatorimage == 'yes') TheList += '<img src="' + Picture_xx.src + '" border="0" vspace="0" hspace="0">';
  for (i=rr; i<nn; i++) {
    TheList += '<img src="' + Pictures[i].src + '" border="0" vspace="0" hspace="0">';
    if (separatorimage == 'yes') TheList += '<img src="' + Picture_xx.src + '" border="0" vspace="0" hspace="0">';
  }
  for (i=0; i<rr; i++) {
    TheList += '<img src="' + Pictures[i].src + '" border="0" vspace="0" hspace="0">';
    if (separatorimage == 'yes') TheList += '<img src="' + Picture_xx.src + '" border="0" vspace="0" hspace="0">';
  }
  return TheList;
}


