/***********************************
	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] = "2010 Toyota Venza";
fvTitle[1] = "2011 Ford Taurus";
fvTitle[2] = "2011 Chevy Camaro";
fvTitle[3] = "2011 Nissan Maxima";
fvTitle[4] = "2011 Scion iQ";

// Descripions:

fvDesc[0] = "Because you're more than one thing."
fvDesc[1] = "It's America's Most Innovative Full-Size Sedan.";
fvDesc[2] = "An extraordinary presence in a new age of precision.";
fvDesc[3] = "Innovation beyond 2 Doors. Innovation for all.";
fvDesc[4] = "Arriving in Spring 2011.";

// 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/search/Venza+Venza+tM";
fvURL[1] = "http://www.thayerford.com/search/New+Taurus+tM";
fvURL[2] = "http://www.thayerchevrolet.com/search/New+Camaro+tM";
fvURL[3] = "http://www.thayernissan.com/search/New+Maxima+tM";
fvURL[4] = "http://www.thayerscion.com/";

/* 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>");
}
