/***********************************
	Random Featured Vehicle v0.1
	
	For Thayer BG, by Josh
************************************/

/* Don't edit these arrays! Edit their elements below. */

var fvTitle = new Array();
var fvDesc = new Array();
var fvImage = new Array();
var fvURL = new Array();

/* Configure the arrays below: */

// Titles:

fvTitle[0] = "2009 Toyota Camry";
fvTitle[1] = "2010 Ford Fusion";
fvTitle[2] = "2009 Chevy Malibu";
fvTitle[3] = "2009 Nissan Altima";
fvTitle[4] = "2009 Scion xB";

// Descripions:

fvDesc[0] = "Commonly chosen. Uncommonly engineered."
fvDesc[1] = "Coming soon to a passing lane near you.";
fvDesc[2] = "\"Highest ranked midsized car in inital quality.\"";
fvDesc[3] = "The Altima: Luxury. Now available to all.";
fvDesc[4] = "The xB: Boxy done bold. Bye-bye to boring.";

// Images:

fvImage[0] = "/images/featured_vehicles_toyota.jpg";
fvImage[1] = "/images/featured_vehicles_ford.jpg";
fvImage[2] = "/images/featured_vehicles_chevrolet.jpg";
fvImage[3] = "/images/featured_vehicles_nissan.jpg";
fvImage[4] = "/images/featured_vehicles_scion.jpg";

// URLs:

fvURL[0] = "http://www.thayertoyota.com/carresearch/TrimsBuildDealer/year_2009/make_Toyota/model_Camry/confid_thayertoyota/";
fvURL[1] = "http://www.thayerford.com/carresearch/TrimsBuildDealer/year_2010/make_Ford/model_Fusion/confid_thayerford/";
fvURL[2] = "http://www.thayerchevrolet.com/carresearch/TrimsBuildDealer/year_2009/make_Chevrolet/model_Malibu/confid_thayerchevrolet/";
fvURL[3] = "http://www.thayernissan.com/carresearch/TrimsBuildDealer/year_2009/make_Nissan/model_Altima%20Sedan/confid_thayernissan/";
fvURL[4] = "http://www.thayerscion.com/carresearch/Trims2/year_2009/make_Scion/model_xB/confid_thayerscion/";

/* Don't edit below! */

var totalVehicles = fvTitle.length;
var whichVehicle = Math.round(Math.random()*(totalVehicles-1));

function getTitle () {
	var vehicleTitle = fvTitle[whichVehicle];
	document.write(vehicleTitle);
}

function getDesc () {
	var vehicleDesc = fvDesc[whichVehicle];
	document.write(vehicleDesc);
}

function getImage () {
	var vehicleImage = "<img src=\"" + fvImage[whichVehicle] + "\">";
	document.write(vehicleImage);
}

function getURL () {
	var vehicleURL = fvURL[whichVehicle];
	document.write("<a href=\"" + vehicleURL + "\">More Info</a> <a href=\"" + vehicleURL + "\"><img src=\"/images/buttons_small_circle.png\" alt=\"More Info\" /></a>");
}