/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Vladimir Geshanov |  */
var arrayData = new Array();
  arrayData[0] = 'ASTON MARTIN|DBS|'
  arrayData[1] = 'ASTON MARTIN|DB9|'
  arrayData[2] = 'ASTON MARTIN|V8 VANTAGE|'
  arrayData[3] = 'BENTLEY|CONTINENTAL GT|'
  arrayData[4] = 'BENTLEY|CONTINENTAL FLYING SPUR|'
  arrayData[5] = 'BENTLEY|CONTINENTAL GTC|'
  arrayData[6] = 'BENTLEY|BROOKLANDS|'
  arrayData[7] = 'BENTLEY|ARNAGE|'
  arrayData[8] = 'BENTLEY|AZURE|'
  arrayData[9] = 'FERRARI|F430|'
  arrayData[10] = 'FERRARI|F430 SPIDER|'
  arrayData[11] = 'FERRARI|430 SCUDIERIA|'
  arrayData[12] = 'FERRARI|599 GTB FIORANO|'
  arrayData[13] = 'FERRARI|612 SCAGLIETTI|'
  arrayData[14] = 'LOTUS|ELISE|'
  arrayData[15] = 'LOTUS|EXIGE S|'
  arrayData[16] = 'LOTUS|EUROPA|'
  arrayData[17] = 'LOTUS|2 ELEVEN|'
  arrayData[18] = 'PORSCHE|BOXSTER|'
  arrayData[19] = 'PORSCHE|CAYMAN|'
  arrayData[20] = 'PORSCHE|911|'
  arrayData[21] = 'PORSCHE|CAYENNE|'
  arrayData[22] = 'ROLLS-ROYCE|PHANTOM|'
  arrayData[23] = 'ROLLS-ROYCE|DROPHEAD COUPE|'
  arrayData[24] = 'ROLLS-ROYCE|COUPE|'





function populateData( name ) {
	select	= window.document.form.SubCategory;
	string	= "";
		// 0 - will display the new options only
		// 1 - will display the first existing option plus the new options
	count	= 0;

		// Clear the old list (above element 0)
	select.options.length = count;

		// Place all matching categories into Options.
	for( i = 0; i < arrayData.length; i++ ) {
		string = arrayData[i].split( "|" );
		if( string[0] == name ) {
			select.options[count++] = new Option( string[1] );
		}
	}

// Set which option from subcategory is to be selected
//	select.options.selectedIndex = 2;
		// Give subcategory focus and select it
//	select.focus();
}

