/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Michael J. Damato | http://developing.damato.net/ */
// State lists
var states = new Array();

states['Aerial Lift Equipment'] = new Array('ALL Aerial Lift Equipment (see Rental Rates Page for detailed listing)');
states['Air Compressors'] = new Array('ALL Air Compressors (see Rental Rates Page for detailed listing)');
states['Air Tools and Accessories'] = new Array('ALL Air Tools and Accessories (see Rental Rates Page for detailed listing)');
states['Asphalt Equipment'] = new Array('Vibratory Ride-On Rollers','ALL Traffic Control Equipment (see Rental Rates Page for detailed listing)','ALL Other Asphalt Equipment (see Rental Rates Page for detailed listing)');
states['Automotive Equipment'] = new Array('ALL Automotive Equipment (see Rental Rates Page for detailed listing)');
states['Compaction Equipment'] = new Array('Padded and Smooth Drum Rollers','ALL Other Compaction Equipment (see Rental Rates Page for detailed listing)');
states['Concrete Equipment'] = new Array('ALL Concrete Equipment (see Rental Rates Page for detailed listing)');
states['Electrical Tools'] = new Array('ALL Electrical Tools (see Rental Rates Page for detailed listing)');
states['Floor Care Equipment'] = new Array('Ride-On 57 Inch Floor Scrubbing Machine','ALL Other Floor Care Equipment (see Rental Rates Page for detailed listing)');
states['Forklifts and Material Handling Equipment'] = new Array('ALL Forklifts (see Rental Rates Page for detailed listing)','ALL Other Material Handling Equipment (see Rental Rates Page for detailed listing)');
states['Generators and Temporary Power'] = new Array('ALL Generators and Temporary Power Equipment (see Rental Rates Page for detailed listing)');
states['Ladders and Scaffolding'] = new Array('ALL Ladders and Scaffolding (see Rental Rates Page for detailed listing)');
states['Lawn and Garden Equipment'] = new Array('ALL Lawn and Garden Equipment (see Rental Rates Page for detailed listing)');
states['Lights, Heaters, Fans, and Blowers'] = new Array('ALL Lights, Heaters, Fans, and Blowers (see Rental Rates Page for detailed listing)');
states['Painting Equipment'] = new Array('ALL Painting Equipment (see Rental Rates Page for detailed listing)');
states['Plumbing Equipment'] = new Array('ALL Plumbing Equipment (see Rental Rates Page for detailed listing)');
states['Pressure Washers'] = new Array('ALL Pressure Washers (see Rental Rates Page for detailed listing)');
states['Pumps and Accessories'] = new Array('ALL Pumps and Accessories (see Rental Rates Page for detailed listing)');
states['Sandblasting Equipment'] = new Array('ALL Sandblasting Equipment (see Rental Rates Page for detailed listing)');
states['Saws'] = new Array('ALL Saws (see Rental Rates Page for detailed listing)');
states['Surveying Equipment'] = new Array('ALL Surveying Equipment (see Rental Rates Page for detailed listing)');
states['Tractors and Earthmoving Equipment'] = new Array('Horizontal Boring Tools & Walk Behind Trenchers','ALL Other Tractors and Earthmoving Equipment (see Rental Rates Page for detailed listing)');
states['Trucks and Trailers'] = new Array('Utility, Equip., Hydraulic, & Vehicle Trailers (see Rental Rates Page for detailed listing)','Vacuum Trailers, Utility Vehicles, & Dump Trucks (see Rental Rates Page for detailed listing)','Water Trailers and Miscellaneous Equipment (see Rental Rates Page for detailed listing)');
states['Welding Equipment'] = new Array('ALL Welding Equipment (see Rental Rates Page for detailed listing)');
states['Woodworking Equipment'] = new Array('ALL Woodworking Equipment (see Rental Rates Page for detailed listing)');


// City lists
var cities = new Array();

cities['Aerial Lift Equipment'] = new Array();
cities['Aerial Lift Equipment']['ALL Aerial Lift Equipment (see Rental Rates Page for detailed listing)'] = new Array('Santa Clara County - $100.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $115.00 ea. way','All Other Counties - $100.00 per hr. portal to portal');

cities['Air Compressors'] = new Array();
cities['Air Compressors']['ALL Air Compressors (see Rental Rates Page for detailed listing)'] = new Array('Santa Clara County - $75.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $85.00 ea. way','All Other Counties - $75.00 per hr. portal to portal');

cities['Air Tools and Accessories'] = new Array();
cities['Air Tools and Accessories']['ALL Air Tools and Accessories (see Rental Rates Page for detailed listing)'] = new Array('Santa Clara County - $75.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $85.00 ea. way','All Other Counties - $75.00 per hr. portal to portal');

cities['Asphalt Equipment'] = new Array();
cities['Asphalt Equipment']['Vibratory Ride-On Rollers'] = new Array('Santa Clara County - $100.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $115.00 ea. way','All Other Counties - $100.00 per hr. portal to portal');
cities['Asphalt Equipment']['ALL Traffic Control Equipment (see Rental Rates Page for detailed listing)'] = new Array('Santa Clara County - $75.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $85.00 ea. way','All Other Counties - $75.00 per hr. portal to portal');
cities['Asphalt Equipment']['ALL Other Asphalt Equipment (see Rental Rates Page for detailed listing)'] = new Array('Santa Clara County - $75.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $85.00 ea. way','All Other Counties - $75.00 per hr. portal to portal');

cities['Automotive Equipment'] = new Array();
cities['Automotive Equipment']['ALL Automotive Equipment (see Rental Rates Page for detailed listing)'] = new Array('Santa Clara County - $75.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $85.00 ea. way','All Other Counties - $75.00 per hr. portal to portal');

cities['Compaction Equipment'] = new Array();
cities['Compaction Equipment']['Padded and Smooth Drum Rollers'] = new Array('Santa Clara County - $100.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $115.00 ea. way','All Other Counties - $100.00 per hr. portal to portal');
cities['Compaction Equipment']['ALL Other Compaction Equipment (see Rental Rates Page for detailed listing)'] = new Array('Santa Clara County - $75.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $85.00 ea. way','All Other Counties - $75.00 per hr. portal to portal');

cities['Concrete Equipment'] = new Array();
cities['Concrete Equipment']['ALL Concrete Equipment (see Rental Rates Page for detailed listing)'] = new Array('Santa Clara County - $75.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $85.00 ea. way','All Other Counties - $75.00 per hr. portal to portal');

cities['Electrical Tools'] = new Array();
cities['Electrical Tools']['ALL Electrical Tools (see Rental Rates Page for detailed listing)'] = new Array('Santa Clara County - $75.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $85.00 ea. way','All Other Counties - $75.00 per hr. portal to portal');

cities['Floor Care Equipment'] = new Array();
cities['Floor Care Equipment']['Ride-On 57 Inch Floor Scrubbing Machine'] = new Array('Santa Clara County - $100.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $115.00 ea. way','All Other Counties - $100.00 per hr. portal to portal');
cities['Floor Care Equipment']['ALL Other Floor Care Equipment (see Rental Rates Page for detailed listing)'] = new Array('Santa Clara County - $75.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $85.00 ea. way','All Other Counties - $75.00 per hr. portal to portal');

cities['Forklifts and Material Handling Equipment'] = new Array();
cities['Forklifts and Material Handling Equipment']['ALL Forklifts (see Rental Rates Page for detailed listing)'] = new Array('Santa Clara County - $100.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $115.00 ea. way','All Other Counties - $100.00 per hr. portal to portal');
cities['Forklifts and Material Handling Equipment']['ALL Other Material Handling Equipment (see Rental Rates Page for detailed listing)'] = new Array('Santa Clara County - $75.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $85.00 ea. way','All Other Counties - $75.00 per hr. portal to portal');

cities['Generators and Temporary Power'] = new Array();
cities['Generators and Temporary Power']['ALL Generators and Temporary Power Equipment (see Rental Rates Page for detailed listing)'] = new Array('Santa Clara County - $75.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $85.00 ea. way','All Other Counties - $75.00 per hr. portal to portal');

cities['Ladders and Scaffolding'] = new Array();
cities['Ladders and Scaffolding']['ALL Ladders and Scaffolding (see Rental Rates Page for detailed listing)'] = new Array('Santa Clara County - $75.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $85.00 ea. way','All Other Counties - $75.00 per hr. portal to portal');

cities['Lawn and Garden Equipment'] = new Array();
cities['Lawn and Garden Equipment']['ALL Lawn and Garden Equipment (see Rental Rates Page for detailed listing)'] = new Array('Santa Clara County - $75.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $85.00 ea. way','All Other Counties - $75.00 per hr. portal to portal');

cities['Lights, Heaters, Fans, and Blowers'] = new Array();
cities['Lights, Heaters, Fans, and Blowers']['ALL Lights, Heaters, Fans, and Blowers (see Rental Rates Page for detailed listing)'] = new Array('Santa Clara County - $75.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $85.00 ea. way','All Other Counties - $75.00 per hr. portal to portal');

cities['Painting Equipment'] = new Array();
cities['Painting Equipment']['ALL Painting Equipment (see Rental Rates Page for detailed listing)'] = new Array('Santa Clara County - $75.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $85.00 ea. way','All Other Counties - $75.00 per hr. portal to portal');

cities['Plumbing Equipment'] = new Array();
cities['Plumbing Equipment']['ALL Plumbing Equipment (see Rental Rates Page for detailed listing)'] = new Array('Santa Clara County - $75.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $85.00 ea. way','All Other Counties - $75.00 per hr. portal to portal');

cities['Pressure Washers'] = new Array();
cities['Pressure Washers']['ALL Pressure Washers (see Rental Rates Page for detailed listing)'] = new Array('Santa Clara County - $75.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $85.00 ea. way','All Other Counties - $75.00 per hr. portal to portal');

cities['Pumps and Accessories'] = new Array();
cities['Pumps and Accessories']['ALL Pumps and Accessories (see Rental Rates Page for detailed listing)'] = new Array('Santa Clara County - $75.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $85.00 ea. way','All Other Counties - $75.00 per hr. portal to portal');

cities['Sandblasting Equipment'] = new Array();
cities['Sandblasting Equipment']['ALL Sandblasting Equipment (see Rental Rates Page for detailed listing)'] = new Array('Santa Clara County - $75.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $85.00 ea. way','All Other Counties - $75.00 per hr. portal to portal');

cities['Saws'] = new Array();
cities['Saws']['ALL Saws (see Rental Rates Page for detailed listing)'] = new Array('Santa Clara County - $75.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $85.00 ea. way','All Other Counties - $75.00 per hr. portal to portal');

cities['Surveying Equipment'] = new Array();
cities['Surveying Equipment']['ALL Surveying Equipment (see Rental Rates Page for detailed listing)'] = new Array('Santa Clara County - $75.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $85.00 ea. way','All Other Counties - $75.00 per hr. portal to portal');

cities['Tractors and Earthmoving Equipment'] = new Array();
cities['Tractors and Earthmoving Equipment']['Horizontal Boring Tools & Walk Behind Trenchers'] = new Array('Santa Clara County - $75.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $85.00 ea. way','All Other Counties - $75.00 per hr. portal to portal');
cities['Tractors and Earthmoving Equipment']['ALL Other Tractors and Earthmoving Equipment (see Rental Rates Page for detailed listing)'] = new Array('Santa Clara County - $100.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $115.00 ea. way','All Other Counties - $100.00 per hr. portal to portal');

cities['Trucks and Trailers'] = new Array();
cities['Trucks and Trailers']['Utility, Equip., Hydraulic, & Vehicle Trailers (see Rental Rates Page for detailed listing)'] = new Array('For insurance purposes, public safety, and traffic law compliance, ALL Utility Trailers, Equipment Trailers,','Hydraulic Drop Trailers, and Vehicle Hauling Dollies & Trailers MUST be picked up at the Dahls facility','to ensure legal hauling capability.');
cities['Trucks and Trailers']['Vacuum Trailers, Utility Vehicles, & Dump Trucks (see Rental Rates Page for detailed listing)'] = new Array('Santa Clara County - $100.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $115.00 ea. way','All Other Counties - $100.00 per hr. portal to portal');
cities['Trucks and Trailers']['Water Trailers and Miscellaneous Equipment (see Rental Rates Page for detailed listing)'] = new Array('Santa Clara County - $75.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $85.00 ea. way','All Other Counties - $75.00 per hr. portal to portal');

cities['Welding Equipment'] = new Array();
cities['Welding Equipment']['ALL Welding Equipment (see Rental Rates Page for detailed listing)'] = new Array('Santa Clara County - $75.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $85.00 ea. way','All Other Counties - $75.00 per hr. portal to portal');

cities['Woodworking Equipment'] = new Array();
cities['Woodworking Equipment']['ALL Woodworking Equipment (see Rental Rates Page for detailed listing)'] = new Array('Santa Clara County - $75.00 ea. way','Alameda, Contra Costa, San Mateo, San Francisco, Monterey, and Santa Cruz Counties - $85.00 ea. way','All Other Counties - $75.00 per hr. portal to portal');


function setStates() {
  cntrySel = document.getElementById('country');
  stateList = states[cntrySel.value];
  changeSelect('state', stateList, stateList);
  setCities();
}

function setCities() {
  cntrySel = document.getElementById('country');
  stateSel = document.getElementById('state');
  cityList = cities[cntrySel.value][stateSel.value];
  changeSelect('city', cityList, cityList);
}

function changeSelect(fieldID, newOptions, newValues) {
  selectField = document.getElementById(fieldID);
  selectField.options.length = 0;
  for (i=0; i<newOptions.length; i++) {
    selectField.options[selectField.length] = new Option(newOptions[i], newValues[i]);
  }
}

// Multiple onload function created by: Simon Willison
// http://simonwillison.net/2004/May/26/addLoadEvent/
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

addLoadEvent(function() {
  setStates();
});
