// ----------------------------------------------------------------------------------------------
// ------------------------------------- SERVICE AREAS ------------------------------------------
// ----------------------------------------------------------------------------------------------

function ShowServiceAreas(stateDropDown, areaDropDown) {

	var serviceStateArray = new Array ('AZ','AZ','AZ','AZ','AZ','AZ','AZ','CA-N','CA-N','CA-N','CA-S','CA-S','CA-S','CA-S','CA-S',
		'CO','CO','CT','DE','FL','FL','FL','FL','FL','FL','FL','GA','IL','IN','KS','MA','MD','MD','MI','MN','MO','NC','NC','NC',
		'NH','NJ','NJ','NM','NV','NV','NY','NY','OH','PA','PA','RI','SC','TN','TX','TX','TX','TX','UT','VA','WI');
		
	var serviceAreaArray = new Array ('Anthem','North Valley','Southeast Valley','Springfield',
	  'Tucson','West Valley','Winfield','Bay Area','Central Valley',
	  'Sacramento','North Inland Empire','North LA / Ventura County','Orange County / S. Riverside County','San Diego',
		'Sun Lakes','Colorado Springs','Denver','Connecticut','Wilmington',
		'Ft.Myers / Naples','Jacksonville','Ocala','Orlando','Sarasota',
		'South East Florida','Tampa','Atlanta','Illinois','Indianapolis',
		'Kansas City','New England','Montgomery County','Other Counties',
		'Metro Detroit','Minneapolis','Kansas City','Charlotte','Greesnboro','Raleigh','New Hampshire','Delaware Valley/South NJ',
		'Metro NY/NJ','New Mexico','Las Vegas - Del Webb Communities','Las Vegas - Pulte Communities',
		'Long Island','Metro NY/NJ','Cleveland','Delaware Valley',
		'Lehigh Valley','Rhode Island','SC Coastal','Tennessee',
		'Austin','Dallas','Houston','San Antonio',
		'Salt Lake City','Washington DC Area','Wisconsin');
		
	var serviceEmailArray = new Array ('NCSLPhoenixEast@pulte.com','NCSLPhoenixEast@pulte.com','NCSLPhoenixEast@pulte.com','NCSLPhoenixEast@pulte.com',
		'NCSLTucson@pulte.com','NCSLPhoenixWest@pulte.com','NCSLPhoenixEast@pulte.com','NCSLBayArea@pulte.com','NCSLBayArea@pulte.com',
		'NCSLSacramento@pulte.com','NCSLSouthernCalifornia@pulte.com','NCSLSouthernCalifornia@pulte.com','NCSLSouthernCalifornia@pulte.com','NCSLSouthernCalifornia@pulte.com',
		'NCSLSouthernCalifornia@pulte.com','NCSLColorado@pulte.com','NCSLColorado@pulte.com','NCSLNewEngland@pulte.com','NCSLDelawareValley@pulte.com',
		'NCSLSouthFlorida@pulte.com','NCSLNorthFlorida@pulte.com','NCSLNorthFlorida@pulte.com','NCSLCentralFlorida@pulte.com','NCSLSouthFlorida@pulte.com',
		'NCSLSouthFlorida@pulte.com','NCSLCentralFlorida@pulte.com','NCSLGeorgia@pulte.com','NCSLIllinois@pulte.com','NCSLIndianapolis@pulte.com',
		'NCSLKansasCity@pulte.com','NCSLNewEngland@pulte.com','NCSLMidAtlantic@pulte.com','NCSLMidAtlantic@pulte.com',
		'NCSLMichigan@pulte.com','NCSLMinneapolis@pulte.com','NCSLKansasCity@pulte.com','NCSLCharlotte@pulte.com',
		'NCSLRaleigh@pulte.com','NCSLRaleigh@pulte.com','NCSLNewEngland@pulte.com','NCSLDelawareValley@pulte.com',
		'NCSLMetroNYNJ@pulte.com','NCSLNewMexico@pulte.com','NCSLLasVegas@pulte.com','NCSLLasVegas@pulte.com',
		'MHamer@HarvestRES.com','NCSLMetroNYNJ@pulte.com','NCSLCleveland@pulte.com','NCSLDelawareValley@pulte.com',
		'NCSLDelawareValley@pulte.com','NCSLNewEngland@pulte.com','NCSLSouthCarolinaCoastal@pulte.com','NCSLTennessee@pulte.com',
		'NCSLCentralTexas@pulte.com ','NCSLDallas@pulte.com','NCSLHouston@pulte.com','NCSLSanAntonio@pulte.com',
		'NCSLColorado@pulte.com','NCSLMidAtlantic@pulte.com','NCSLIllinois@pulte.com');
    
	// get the selected state id
	var stateIDSelected = stateDropDown.options[stateDropDown.selectedIndex].value;

	// clear the area dropdown list
	areaDropDown.options.length = 0;
	areaDropDown.options[0] = new Option('Select');
	areaDropDown.options[0].value = '';

	// set it to 1 only because we just added the default selection
	var areaMatches = 1;

	for(i = 0; i < serviceStateArray.length; i++) {
		// stateidselected == '0' means any state
		if((stateIDSelected == '0') || (serviceStateArray[i] == stateIDSelected)) {
			areaDropDown.options[areaMatches] = new Option(serviceAreaArray[i]);
			areaDropDown.options[areaMatches].value = serviceEmailArray[i];
			areaMatches++;
		}
	}
	YUD.replaceClass(document.getElementById('homeOwnerStep2'),'hide','show');
}
 
// ----------------------------------------------------------------------------------------------
