
function fillCategory(){ 
 // this function is used to fill the category list on load
//addOption(document.drop_list.Category, "Alaska", "Alaska", "");
addOption(document.drop_list.Category, "Arizona", "Arizona", "");
addOption(document.drop_list.Category, "California", "California", "");
addOption(document.drop_list.Category, "Colorado", "Colorado", "");
//addOption(document.drop_list.Category, "Delaware", "Delaware", "");
//addOption(document.drop_list.Category, "Kansas", "Kansas", "");
//addOption(document.drop_list.Category, "Missouri", "Missouri", "");
addOption(document.drop_list.Category, "Nevada", "Nevada", "");
addOption(document.drop_list.Category, "New Mexico", "New Mexico", "");
//addOption(document.drop_list.Category, "North Carolina", "North Carolina", "");
addOption(document.drop_list.Category, "Oklahoma", "Oklahoma", "");
//addOption(document.drop_list.Category, "Oregon", "Oregon", "");
addOption(document.drop_list.Category, "Texas", "Texas", "");
addOption(document.drop_list.Category, "Utah", "Utah", "");
//addOption(document.drop_list.Category, "Washington", "Washington", "");
//addOption(document.drop_list.Category, "Wisconsin", "Wisconsin", "");
}

function SelectSubCat(){
// ON selection of category this function will work

removeAllOptions(document.drop_list.SubCat);
addOption(document.drop_list.SubCat, "", "City", "");
document.drop_list.SubCat.disabled = false;

/*
if(document.drop_list.Category.value == 'Alaska'){
addOption(document.drop_list.SubCat,"anchorage-alaska.html", "Anchorage");
//addOption(document.drop_list.SubCat,"scottsdale-arizona.html", "Scottsdale");
//addOption(document.drop_list.SubCat,"tucson-arizona.html", "Tucson");
}
*/
if(document.drop_list.Category.value == 'Arizona'){
addOption(document.drop_list.SubCat,"phoenix-arizona.html", "Phoenix");
addOption(document.drop_list.SubCat,"scottsdale-arizona.html", "Scottsdale");
addOption(document.drop_list.SubCat,"tempe-arizona.html", "Tempe");
addOption(document.drop_list.SubCat,"tucson-arizona.html", "Tucson");
}

if(document.drop_list.Category.value == 'California'){
//addOption(document.drop_list.SubCat,"anaheim-california.html", "Anaheim");
//addOption(document.drop_list.SubCat,"bakersfield-california.html", "Bakersfield");
addOption(document.drop_list.SubCat,"carlsbad-california.html", "Carlsbad");//
addOption(document.drop_list.SubCat,"hollywood-california.html", "Hollywood");//
//addOption(document.drop_list.SubCat,"cerritos-california.html", "Cerritos");
//addOption(document.drop_list.SubCat,"costa-mesa-california.html", "Costa Mesa");
//addOption(document.drop_list.SubCat,"culver-city-california.html", "Culver City");
//addOption(document.drop_list.SubCat,"dana-point-california.html", "Dana Point");
//addOption(document.drop_list.SubCat,"garden-grove-california.html", "Garden Grove");
//addOption(document.drop_list.SubCat,"la-jolla-california.html", "La Jolla");
//addOption(document.drop_list.SubCat,"long-beach-california.html", "Long Beach");
addOption(document.drop_list.SubCat,"los-angeles-california.html", "Los Angeles");//
//addOption(document.drop_list.SubCat,"millbrae-california.html", "Millbrae");
//addOption(document.drop_list.SubCat,"milpitas-california.html", "Milpitas");
addOption(document.drop_list.SubCat,"mammoth-lakes-california.html", "Mammoth Lakes");//
//addOption(document.drop_list.SubCat,"napa-california.html", "Napa");
//addOption(document.drop_list.SubCat,"ontario-california.html", "Ontario");
//addOption(document.drop_list.SubCat,"orange-county-california.html", "Orange County");
//addOption(document.drop_list.SubCat,"palo-alto-california.html", "Palo Alto");
//addOption(document.drop_list.SubCat,"pasadena-california.html", "Pasadena");
//addOption(document.drop_list.SubCat,"petaluma-california.html", "Petaluma");
//addOption(document.drop_list.SubCat,"pleasanton-california.html", "Pleasanton");
//addOption(document.drop_list.SubCat,"pomona-california.html", "Pomona");
//addOption(document.drop_list.SubCat,"rancho-cucamonga-california.html", "Rancho Cucamonga");
//addOption(document.drop_list.SubCat,"rancho-mirage-california.html", "Rancho Mirage");
//addOption(document.drop_list.SubCat,"sacramento-california.html", "Sacramento");
addOption(document.drop_list.SubCat,"san-diego-california.html", "San Diego");//
//addOption(document.drop_list.SubCat,"san-francisco-california.html", "San Francisco");
//addOption(document.drop_list.SubCat,"san-rafael-california.html", "San Rafael");
//addOption(document.drop_list.SubCat,"san-jose-california.html", "San Jose");
addOption(document.drop_list.SubCat,"santa-monica-california.html", "Santa Monica");//
//addOption(document.drop_list.SubCat,"silicon-valley-california.html", "Silicon Valley");
//addOption(document.drop_list.SubCat,"sonoma-california.html", "Sonoma");
//addOption(document.drop_list.SubCat,"sunnyvale-california.html", "Sunnyvale");
addOption(document.drop_list.SubCat,"universal-city-california.html", "Universal City");//
}

if(document.drop_list.Category.value == 'Colorado'){
//addOption(document.drop_list.SubCat,"aspen-colorado.html", "Aspen");
addOption(document.drop_list.SubCat,"aurora-colorado.html", "Aurora");
//addOption(document.drop_list.SubCat,"beaver-creek-colorado.html", "Beaver Creek");
addOption(document.drop_list.SubCat,"broomfield-colorado.html", "Broomfield");
addOption(document.drop_list.SubCat,"denver-colorado.html", "Denver");
addOption(document.drop_list.SubCat,"greenwood-village-colorado.html", "Greenwood Village");
addOption(document.drop_list.SubCat,"lone-tree-colorado.html", "Lone Tree");
addOption(document.drop_list.SubCat,"steamboat-colorado.html", "Steamboat Springs");
}

if(document.drop_list.Category.value == 'Delaware'){
addOption(document.drop_list.SubCat,"dover-delaware.html", "Dover");
}
/*
if(document.drop_list.Category.value == 'Kansas'){
addOption(document.drop_list.SubCat,"leawood-kansas.html", "Leawood");
addOption(document.drop_list.SubCat,"overland-park-kansas.html", "Overland Park");
}

if(document.drop_list.Category.value == 'Missouri'){
addOption(document.drop_list.SubCat,"kansas-city-missouri.html", "Kansas City");
addOption(document.drop_list.SubCat,"st-louis-missouri.html", "St. Louis");
}
*/
if(document.drop_list.Category.value == 'Nevada'){
addOption(document.drop_list.SubCat,"las-vegas-nevada.html", "Las Vegas");
}

if(document.drop_list.Category.value == 'New Mexico'){
addOption(document.drop_list.SubCat,"albuquerque-new-mexico.html", "Albuquerque");
}
/*
if(document.drop_list.Category.value == 'North Carolina'){
addOption(document.drop_list.SubCat,"durham-north-carolina.html", "Durham");
}
*/
if(document.drop_list.Category.value == 'Oklahoma'){
addOption(document.drop_list.SubCat,"midwest-city-oklahoma.html", "Midwest City");
addOption(document.drop_list.SubCat,"oklahoma-city-oklahoma.html", "Oklahoma City");
}

if(document.drop_list.Category.value == 'Oregon'){
addOption(document.drop_list.SubCat,"portland-oregon.html", "Portland");
//addOption(document.drop_list.SubCat,"St. Lucia", "St. Lucia");
}

if(document.drop_list.Category.value == 'Texas'){
addOption(document.drop_list.SubCat,"arlington-texas.html", "Arlington");
addOption(document.drop_list.SubCat,"austin-texas.html", "Austin");
addOption(document.drop_list.SubCat,"dallas-texas.html", "Dallas");
//addOption(document.drop_list.SubCat,"fort-worth-texas.html", "Fort Worth");
addOption(document.drop_list.SubCat,"frisco-texas.html", "Frisco");
addOption(document.drop_list.SubCat,"houston-texas.html", "Houston");
addOption(document.drop_list.SubCat,"plano-texas.html", "Plano");
addOption(document.drop_list.SubCat,"irving-texas.html", "Irving");
addOption(document.drop_list.SubCat,"san-antonio-texas.html", "San Antonio");
addOption(document.drop_list.SubCat,"south-padre-island-texas.html", "South Padre Island");
}

if(document.drop_list.Category.value == 'Utah'){
//addOption(document.drop_list.SubCat,"park-city-utah.html", "Park City");
addOption(document.drop_list.SubCat,"salt-lake-city-utah.html", "Salt Lake City");
}
/*
if(document.drop_list.Category.value == 'Washington'){
addOption(document.drop_list.SubCat,"bellevue-washington.html", "Bellevue");
addOption(document.drop_list.SubCat,"seattle-washington.html", "Seattle");
}

if(document.drop_list.Category.value == 'Wisconsin'){
addOption(document.drop_list.SubCat,"milwaukee-wisconsin.html", "Milwaukee");
}
*/
///
}


function removeAllOptions(selectbox)
{
	var i;
	for(i=selectbox.options.length-1;i>=0;i--)
	{
		//selectbox.options.remove(i);
		selectbox.remove(i);
	}
}


function addOption(selectbox, value, text )
{
	var optn = document.createElement("OPTION");
	optn.text = text;
	optn.value = value;

	selectbox.options.add(optn);
}
