
// Set up the image files to be used.
var theCars = new Array() // do not change this
var theParts = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.

theCars[0] = 'images/cars/63-impala.png';
theCars[1] = 'images/cars/65-gto.png';
theCars[2] = 'images/cars/442.png';
theCars[3] = 'images/cars/bandit.png';
theCars[4] = 'images/cars/camero.png';
theCars[5] = 'images/cars/camino2.png';
theCars[6] = 'images/cars/camino.png';
theCars[7] = 'images/cars/chevelle.png';
theCars[8] = 'images/cars/cutlass.png';
theCars[9] = 'images/cars/firebird.png';
theCars[10] = 'images/cars/gnx.png';
theCars[11] = 'images/cars/gsx.png';
theCars[12] = 'images/cars/hurst.png';
theCars[13] = 'images/cars/impala.png';
theCars[14] = 'images/cars/monte2.png';
theCars[15] = 'images/cars/monte.png';
theCars[16] = 'images/cars/nova2.png';
theCars[17] = 'images/cars/nova.png';
theCars[18] = 'images/cars/pace.png';
theCars[19] = 'images/cars/skylark.png';
theCars[20] = 'images/cars/z28.png';

theParts[0] = 'images/parts/body.png';
theParts[1] = 'images/parts/emblem.png';
theParts[2] = 'images/parts/engine.png';
theParts[3] = 'images/parts/exhaust-manifold.png';
theParts[4] = 'images/parts/formula-wheel.png';
theParts[5] = 'images/parts/gauge.png';
theParts[6] = 'images/parts/grille.png';
theParts[7] = 'images/parts/hood-scoop.png';
theParts[8] = 'images/parts/intake.png';
theParts[9] = 'images/parts/lens.png';
theParts[10] = 'images/parts/lid.png';
theParts[11] = 'images/parts/pmd.png';
theParts[12] = 'images/parts/rally-wheel.png';
theParts[13] = 'images/parts/tach.png';
theParts[14] = 'images/parts/tail-lamp.png';
theParts[15] = 'images/parts/w27.png';
theParts[16] = 'images/parts/wheel.png';
theParts[17] = 'images/parts/wz.png';

// do not edit anything below this line

//var j = 0;
var p = theCars.length;
//var preBuffer = new Array()
//for (i = 0; i < p; i++){
//   preBuffer[i] = new Image()
//   preBuffer[i].src = theCars[i]
//}
var whichCar = Math.round(Math.random()*(p-1));

//j = 0;
p = theParts.length;
//var preBuffer2 = new Array()
//for (i = 0; i < p; i++){
//   preBuffer2[i] = new Image();
//   preBuffer2[i].src = theParts[i];
//}
var whichPart = Math.round(Math.random()*(p-1));
function showCar(){
document.write('<img src="'+theCars[whichCar]+'">');
}
function showPart(){
document.write('<img src="'+theParts[whichPart]+'">');
}