var maxRecords = 150;
//alert( 'In stopsites.js' );

function setToRed(image) {
	source = image.src;
	image.src = source.replace(/blk/,'red');
}

function setToBlack(image, fromBlue) {
	source = image.src;
	if (fromBlue) {
		image.src = source.replace(/blue/,'blk');
	} else {
		image.src = source.replace(/red/,'blk');
	}
}

function setToBlue(image) {
	source = image.src;
	image.src = source.replace(/blk/,'blue');
}

function first(city, count, isFelony) {
//	alert( 'In first: ' + city + "--" + count + "--" + isFelony );
	if (isFelony) {
		 getFeloniesInclude('cellblockDUI', maxRecords, count);
	} else {
		getMisdemeanorsInclude('dui', city, count);
	}
}

function last(city, count, isFelony) {
//	alert( 'In last: ' + city + "--" + count + "--" + isFelony );
	if (isFelony) {
		 getFeloniesInclude('cellblockDUI', maxRecords, count);
	} else {
		getMisdemeanorsInclude('dui', city, count);
	}
}

function goForward(city, count, isFelony) {
//	alert( 'In goForward: ' + city + "--" + count + "--" + isFelony );
	if (isFelony) {
		 getFeloniesInclude('cellblockDUI', maxRecords, count);
	} else {
		getMisdemeanorsInclude('dui', city, count);
	}
}

function goBack(city, count, isFelony) {
//	alert( 'In goBack: ' + city + "--" + count + "--" + isFelony );

	if (isFelony) {
		 getFeloniesInclude('cellblockDUI', maxRecords, count);
	} else {
		getMisdemeanorsInclude('dui', city, count);
	}
}