


function fillCategory(){ 
 // this function is used to fill the category list on load
addOption(document.drop_list.Category, "Womens Apparel", "Womens Apparel", "");
addOption(document.drop_list.Category, "Mens Apparel", "Mens Apparel", "");
addOption(document.drop_list.Category, "Childrens Apparel", "Childrens Apparel", "");
addOption(document.drop_list.Category, "Art Galleries", "Art Galleries", "");
addOption(document.drop_list.Category, "For The Home", "For The Home", "");
addOption(document.drop_list.Category, "Jewelry", "Jewelry", "");
addOption(document.drop_list.Category, "Shoes & Leather", "Shoes & Leather", "");
addOption(document.drop_list.Category, "Restaurants", "Restaurants", "");
addOption(document.drop_list.Category, "Specialty Shops", "Specialty Shops", "");
addOption(document.drop_list.Category, "Services", "Services", "");
}

function SelectSubCat(){
// ON selection of category this function will work

removeAllOptions(document.drop_list.SubCat);
addOption(document.drop_list.SubCat, "", "Store", "");

if(document.drop_list.Category.value == 'Womens Apparel'){
addOption(document.drop_list.SubCat,"Aegean Treasures", "Aegean Treasures");
addOption(document.drop_list.SubCat,"Anna Vlad", "Anna Vlad");
addOption(document.drop_list.SubCat,"Aqua Beach Wear", "Aqua Beach Wear");
addOption(document.drop_list.SubCat,"Blue Willi's", "Blue Willi's");
addOption(document.drop_list.SubCat,"Charivari", "Charivari");
addOption(document.drop_list.SubCat,"Chico’s", "Chico’s");
addOption(document.drop_list.SubCat,"Diane's Fine Fashions", "Diane's Fine Fashions");
addOption(document.drop_list.SubCat,"Jami’s/Jcc", "Jami’s/Jcc");
addOption(document.drop_list.SubCat,"Patchington", "Patchington");
addOption(document.drop_list.SubCat,"Quiet Storm", "Quiet Storm");
addOption(document.drop_list.SubCat,"Regina's Pizazz", "Regina's Pizazz");
addOption(document.drop_list.SubCat,"Simply Natural", "Simply Natural");
addOption(document.drop_list.SubCat,"Taffeta", "Taffeta");
addOption(document.drop_list.SubCat,"Wildflower", "Wildflower");
}
if(document.drop_list.Category.value == 'Mens Apparel'){
addOption(document.drop_list.SubCat,"H.T. Chittum & Co.", "H.T. Chittum & Co.");
addOption(document.drop_list.SubCat,"Mondo Uomo", "Mondo Uomo");
addOption(document.drop_list.SubCat,"Quiet Storm", "Quiet Storm", "");
addOption(document.drop_list.SubCat,"Teruzzi", "Teruzzi", "");
}
if(document.drop_list.Category.value == 'Childrens Apparel'){
addOption(document.drop_list.SubCat,"All About April", "All About April");
}
if(document.drop_list.Category.value == 'Art Galleries'){
addOption(document.drop_list.SubCat,"Random Acts of Art", "Random Acts of Art");
addOption(document.drop_list.SubCat,"Rick Moore Fine Art Galleries", "Rick Moore Fine Art Galleries");
addOption(document.drop_list.SubCat,"WM Horne", "WM Horne");
}
if(document.drop_list.Category.value == 'For The Home'){
addOption(document.drop_list.SubCat,"Aegean Treasures", "Aegean Treasures");
addOption(document.drop_list.SubCat,"Danieli", "Danieli");
addOption(document.drop_list.SubCat,"Fabec-Young & Co.", "Fabec-Young & Co.");
addOption(document.drop_list.SubCat,"Panache", "Panache");
addOption(document.drop_list.SubCat,"Rose De Paris & Provence", "Rose De Paris & Provence");
addOption(document.drop_list.SubCat,"The Paper Merchant", "The Paper Merchant");
}
if(document.drop_list.Category.value == 'Jewelry'){
addOption(document.drop_list.SubCat,"Exquisite Timepieces", "Exquisite Timepieces");
addOption(document.drop_list.SubCat,"Gallery Of Estate & Precious Jewels", "Gallery Of Estate & Precious Jewels");
addOption(document.drop_list.SubCat,"Nicholas Designs", "Nicholas Designs");
addOption(document.drop_list.SubCat,"Pearl", "Pearl");
addOption(document.drop_list.SubCat,"WM Phelps Custom Jewelers", "WM Phelps Custom Jewelers");
}
if(document.drop_list.Category.value == 'Shoes & Leather'){
addOption(document.drop_list.SubCat,"Martini Shoes", "Martini Shoes");
addOption(document.drop_list.SubCat,"Pratt’s Shoe Salon", "Pratt’s Shoe Salon");
addOption(document.drop_list.SubCat,"Terrida", "Terrida");
addOption(document.drop_list.SubCat,"Yvonne House of Shoes", "Yvonne House of Shoes");
}
if(document.drop_list.Category.value == 'Restaurants'){
addOption(document.drop_list.SubCat,"Artichoke & Company", "Artichoke & Company");
addOption(document.drop_list.SubCat,"Bayside", "Bayside");
addOption(document.drop_list.SubCat,"Ben & Jerry’s Ice Cream", "Ben & Jerry’s Ice Cream");
addOption(document.drop_list.SubCat,"Cloyde’s Steak & Lobster", "Cloyde’s Steak & Lobster");
addOption(document.drop_list.SubCat,"Miramare", "Miramare");
addOption(document.drop_list.SubCat,"M Waterfront Grille", "M Waterfront Grille");
addOption(document.drop_list.SubCat,"The Village Pub", "The Village Pub");
addOption(document.drop_list.SubCat,"Villaggio Cafe", "Villaggio Cafe");
}
if(document.drop_list.Category.value == 'Specialty Shops'){
addOption(document.drop_list.SubCat,"2 For Me, 1 For You", "2 For Me, 1 For You");
}
if(document.drop_list.Category.value == 'Services'){
addOption(document.drop_list.SubCat,"Harris Private Bank", "Harris Private Bank");
addOption(document.drop_list.SubCat,"Park Shore Marina", "Park Shore Marina");
addOption(document.drop_list.SubCat,"Premier Properties", "Premier Properties");
addOption(document.drop_list.SubCat,"Robert of Philadelphia", "Robert of Philadelphia");
addOption(document.drop_list.SubCat,"The Lutgert Companies", "The Lutgert Companies","http://www.google.com");
}

}
////////////////// 

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);
}

