image = new Array();
alt = new Array();
title = new Array();
image[0] = './images/0001.jpg';
image[1] = './images/0002.jpg';
image[2] = './images/0003.jpg';
image[3] = './images/0004.jpg';
image[4] = './images/0005.jpg';
image[5] = './images/0006.jpg';
image[6] = './images/0008.jpg';
image[7] = './images/0009.jpg';
image[8] = './images/0010.jpg';
image[9] = './images/0011.jpg';
image[10] = './images/0012.jpg';
image[11] = './images/0013.jpg';
image[12] = './images/0014.jpg';
image[13] = './images/0015.jpg';
image[14] = './images/0016.jpg';
image[15] = './images/0017.jpg';
image[16] = './images/0018.jpg';
image[17] = './images/0019.jpg';

alt[0] = 'Alabama State Trooper using the eCitation program';
alt[1] = 'Tuscaloosa PD Officer using the eCitation program';
alt[2] = 'Tuscaloosa PD was the first municipality to pilot the eCitation program';
alt[3] = 'Alabama State Troopers';
alt[4] = 'Motor Carrier Troopers first piloted eCitation at the Heflin weigh station';
alt[5] = 'Shelby Hall, home of CAPS';
alt[6] = 'Dr. David Brown working with programmer Matthew Hudnall';
alt[7] = 'CAPS can help your state improve highway safety';
alt[8] = 'CARE software has been implemented in ten states';
alt[9] = 'CARE software is used to analyze crash data';
alt[10] = 'CAPS can help your state improve highway safety';
alt[11] = 'CAPS can help your state improve highway safety';
alt[12] = 'Inside the rotunda in Shelby Hall';
alt[13] = 'The University of Alabama prides itself on tradition. One of those traditions is the beautiful architecture throughout the campus';
alt[14] = 'The University of Alabama seal on the floor of the rotunda in Shelby Hall';
alt[15] = 'Shelby Hall, home of CAPS';
alt[16] = 'CARE saves lives';
alt[17] = 'eCitation has special features for commercial vehicle enforcement';

title[0] = 'Alabama State Trooper using the eCitation program';
title[1] = 'Tuscaloosa PD Officer using the eCitation program';
title[2] = 'Tuscaloosa PD was the first municipality to pilot the eCitation program';
title[3] = 'Alabama State Troopers';
title[4] = 'Motor Carrier Troopers first piloted eCitation at the Heflin weigh station';
title[5] = 'Shelby Hall, home of CAPS';
title[6] = 'Dr. David Brown working with programmer Matthew Hudnall';
title[7] = 'CAPS can help your state improve highway safety';
title[8] = 'CARE software has been implemented in ten states';
title[9] = 'CARE software is used to analyze crash data';
title[10] = 'CAPS can help your state improve highway safety';
title[11] = 'CAPS can help your state improve highway safety';
title[12] = 'Inside the rotunda in Shelby Hall';
title[13] = 'The University of Alabama prides itself on tradition. One of those traditions is the beautiful architecture throughout the campus';
title[14] = 'The University of Alabama seal on the floor of the rotunda in Shelby Hall';
title[15] = 'Shelby Hall, home of CAPS';
title[16] = 'CARE saves lives';
title[17] = 'eCitation has special features for commercial vehicle enforcement';

var currentdate = 0
var core = 0
var ran = 60/image.length;

function ranimage() {
  currentdate = new Date();
  core = currentdate.getSeconds();
  core = Math.floor(core/ran);
  document.getElementById("dynamic_image").alt = alt[core];
  document.getElementById("dynamic_image").title = title[core];
  return(image[core]);
}

function swap_image(){
	document.getElementById("dynamic_image").src = ranimage();
}

swap_image();
