<!-- Begin Resident Images Script
// 2005-08-23 Updated and standardized by SNelson
// 2005-10-13 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/Residents/';
theImages[0] = '../images/RotatingImages/Residents/beach.jpg';
theImages[1] = '../images/RotatingImages/Residents/beachwalk.jpg';
theImages[2] = '../images/RotatingImages/Residents/fiesta.jpg';
theImages[3] = '../images/RotatingImages/Residents/airport_amelia.jpg';
theImages[4] = '../images/RotatingImages/Residents/airport_five_airlines_2.jpg';
theImages[5] = '../images/RotatingImages/Residents/airport_misson_flowers.jpg';
theImages[6] = '../images/RotatingImages/Residents/airport_parking.jpg';
theImages[7] = '../images/RotatingImages/Residents/airport_scenic_wetland_slough.jpg';
theImages[8] = '../images/RotatingImages/Residents/airport_terminal_2.jpg';
theImages[9] = '../images/RotatingImages/Residents/airport_tower.jpg';
theImages[10] = '../images/RotatingImages/Residents/airport_small_craft.jpg';

var theImagesDesc = new Array();
// theImagesDesc[0] = '';
theImagesDesc[0] = '<b>Santa Barbara\'s many beautiful beaches.</b> Whether you want to swim, surf, play Frisbee, or just lay in the sun, Santa Barbara has a beach for everyone along it\'s 100 miles of coastline. The moderate weather is perfect for beach-going almost anytime of year.';
theImagesDesc[1] = '<b>The gorgeous Santa Barbara waterfront.</b> Strolling along Santa Barbara\'s many beautiful beaches is a favorite past-time of residents.';
theImagesDesc[2] = '<b>Old Spanish Days Fiesta</b> has been an important Santa Barbara tradition for over 75 years. Fiesta provides an education of the history, customs, and traditions of the American Indian, Spanish, Mexican & American settlers that comprise our cultural heritage.';
theImagesDesc[3] = '<b>Amelia Earhart</b>, Charles Lindbergh and Earle Ovington were some of the early aviation pioneers who helped create the Santa Barbara Airport. You can read more about the history on www.flysba.com.';
theImagesDesc[4] = '<b>Five major airlines serve Santa Barbara Airport</b> and share the air with many private aircraft. Both enjoy the dramatic coastal views as they approach Santa Barbara.';
theImagesDesc[5] = '<b>The Airport is active in many community efforts.</b> These flowers were painted with chalk at the annual Mission Art festival.';
theImagesDesc[6] = '<b>Parking is easy at the convenient Santa Barbara Airport.</b>  You can download parking info and more in the General Information Guide on www.flysba.com';
theImagesDesc[7] = '<b>The Santa Barbara Airport</b> is prominent in the protection of the scenic wetland slough. Here the wetlands glow in the foreground of the nearby mountains at dusk.';
theImagesDesc[8] = '<b>The garden setting of the Santa Barbara Airport</b> provides over 90 commercial flights daily to over 300 cities worldwide with only one stop. A flight schedule is available to view and download on www.flysba.com.';
theImagesDesc[9] = '<b>Santa Barbara Airport\'s state of the art tower</b> stands tall and proud on Hollister Avenue, guiding over 90 commercial flights per day to over 300 one-stops worldwide.';
theImagesDesc[10] = '<b>Santa Barbara Airport is a favorite of many small craft pilots.</b>  Mercury Air Center and Signature Flight Support provide the best of service to both local and visiting aircraft. Three flight schools continually train new pilots to enjoy our scenic airways.';

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 Resident Images Script
 -->