// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= //
// Package : makemodel                 Version : 2.3
// Date    : 09/17/2003                Author  : Shaun Thomas
// Req     : Javascript 1.0              Type  : function
//
// Descripion:
// -=-=-=-=-=-
// When searching, it is sometimes nice to be able to restrict search terms
// down before executing.  In this case, the user may select make, model, or
// clas.  This set of functions will restrict the list of makes to a certain
// clas, and the list of models to a certain make.  It also keeps track of
// counts so those may be updated, and each category of make will have
// updated stats when a new clas is selected.
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= //

aModel = new Array();
aMake  = new Array();
aMakeType = new Array();
aModelType = new Array();

// -------------------------------------------------------------------------- //
// Function Definitions
// -------------------------------------------------------------------------- //

/**
 * Inserts a make into our global arrays.
 *
 * Since there are many attributes we're keeping track of, it didn't make any
 * sense to generate all of the javascript on a per-make basis.  Given
 * proper parameters, this function should construct everything for us.
 *
 * @param nID       Numeric ID of the make.
 * @param sModel     String name of the make.
 * @param nTotal    Total number of vehicles under this make.
 */
function insert_model(nID, nMakeID, sModel, sType, nCount)
{
    aModel[nID] = new Array();
    aModel[nID]['name'] = sModel;
    aModel[nID]['make'] = nMakeID;
    aModel[nID]['count'] = 0;

  aModel[nID]['count'] += nCount;

} // End function insert_model.

// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= //
