function change(pic) {
	document.getElementById('chase_photo').src = fileNames[pic];
	document.getElementById('chase_caption').firstChild.nodeValue = fileCaptions[pic];
	}

function next() {
	current_photo++;
	if(current_photo>=fileNames.length) {
		current_photo = 0;
		}
	change(current_photo);
}

function previous() {
	current_photo--;
	if(current_photo < 0) {
		current_photo = (fileNames.length - 1);
		}
	change(current_photo);
}

function goPic() {
	current_photo = (document.getElementById('index').value - 1);
	if(current_photo>=fileNames.length) {
		current_photo = (fileNames.length - 1);
		}
	if(current_photo < 0) {
			current_photo = 0;
			}
	change(current_photo);
}

/* driver profile functions */
var driver_profile;
var popUrl;
var d = document;

function highlightOn(driver) {
	d.getElementById('driver_'+driver).className = 'highlight_on';
	d.getElementById('cursor_'+driver).style.cursor = 'pointer';
}
function highlightOff(driver) {
	d.getElementById('driver_'+driver).className = 'highlight_off';
}
function pop_profile(url)
{
	popUrl = '/promos/2005/chase/dps/' + url + '/index.html';
	driver_profile = open(popUrl,'driver_profile','width=600,height=678,scrolling=no,resize=no');
}