<!-- Begin Government Images Script
// 2005-08-23 Updated and standardized by SNelson
// 2005-10-11 Updated for standardized image size by SNelson
// Set up the image files to be used.

rnd.today=new Date();
rnd.seed=rnd.today.getTime();

function rnd() {
        rnd.seed = (rnd.seed*9301+49297) % 233280;
        return rnd.seed/(233280.0);
}

function rand(number) {
        return Math.ceil(rnd()*number);
}

var theImages = new Array();
// To add more image files, continue with the pattern below, adding to the array.
// All images should be 180 px by 240 px
// theImages[0] = '../images/RotatingImages/Government/';
theImages[0] = '../images/RotatingImages/Government/airport.jpg';
theImages[1] = '../images/RotatingImages/Government/city_hall.jpg';
theImages[2] = '../images/RotatingImages/Government/library.jpg';
theImages[3] = '../images/RotatingImages/Government/control_tower.jpg';

var theImagesDesc = new Array();
// theImagesDesc[0] = '';
theImagesDesc[0] = '<b>The Santa Barbara Airport\'s Spanish-style terminal was commissioned in 1942.</b> Designed by architects William Edwards & Joseph Plunkett, whose work includes the Arlington Theatre and the National Armory, it helped shape the Mediterranean style of the city.';
theImagesDesc[1] = '<b>Santa Barbara City Hall.</b> Beautiful arches line the City Hall building in Santa Barbara.';
theImagesDesc[2] = '<b>The Santa Barbara Public Library System</b> presents a variety of free public programs and provides facilities for local events. At some locations, art exhibits showcase the work of local artists and displays offer information on local groups and interests.';
theImagesDesc[3] = '<b>Santa Barbara Airport - SBA.</b> The air traffic team of Santa Barbara Tower/TRACON is made up of controllers, supervisors, staff management and technicians whose prime objective is public safety and our continued enjoyment of flying.';

var j = 0;
// Count the number of images
var p = theImages.length;
var preBuffer = new Array();
for (i = 0; i < p; i++){
   preBuffer[i] = new Image();
   preBuffer[i].src = theImages[i];
}

// Generate an integer between 0 and the number of images minus one
var whichImage = rand(p)-1;
// Remove the bold tags for the image alternate text
var startBold = /<b>/;
var endBold = /<\/b>/;

function showImage(){
	document.write('<img src="'+theImages[whichImage]+'" alt="'+(theImagesDesc[whichImage].replace(startBold,"")).replace(endBold,"")+'" width="180" height="240" border="0" hspace="0" vspace="0">');
}

function showImageDescription(){
	document.write(theImagesDesc[whichImage]);
}
//  End Government Images Script
 -->