function addFacets()
{
	var categoryIndex = document.productfinder.category.selectedIndex; 
	var category = "";
	category = document.productfinder.category.options[categoryIndex].value; 
	
	var sportsIndex = document.productfinder.sports.selectedIndex; 
	var sports = "";
	sports = document.productfinder.sports.options[sportsIndex].value; 

	var producttypeIndex = document.productfinder.producttype.selectedIndex; 
	var producttype = "";
	producttype = document.productfinder.producttype.options[producttypeIndex].value;
	
	var pricerangeIndex = document.productfinder.pricerange.selectedIndex; 
	var pricerange = "";
	pricerange = document.productfinder.pricerange.options[pricerangeIndex].value; 

	var genderIndex = document.productfinder.gender.selectedIndex; 
	var gender = "";
	gender = document.productfinder.gender.options[genderIndex].value;
		
	if (category == "sportshobbyawards") 
	{
		document.productfinder.w.value = sports;
	}
	else if ((category == "gifts") && ((gender == "child") || (gender == "teacher educator") || (gender == "coach")))
	{
		document.productfinder.w.value = gender;
		gender = "";
	}
  else 
  {
    document.productfinder.w.value="*";
  }
  
	if (category == "specials" || category == "customapparel")
	{
		producttype = "";
	}
	
	// Add quickship if checked
	var processing = "";
	if( $("input[name=processing]:checked").size() > 0 ) { 
		processing = $("input[name=processing]:checked").attr("value");
	}
	
	document.productfinder.af.value = "cat:" + category + " pt:" + producttype + " pb:" + pricerange + " gen:" + gender + " processing:" + processing;

}

function changeOptions()
{
	var categoryIndex = document.productfinder.category.selectedIndex; 
	var category = document.productfinder.category.options[categoryIndex].value; 
	var normaloptions = '<option value='+'"'+'trophies'+'"'+'>Trophies</option><option value='+'"'+'plaques'+'"'+'>Plaques</option><option value='+'"'+'crystal'+'"'+'>Crystal</option><option value='+'"'+'certificatesembossersseals'+'"'+'>Certificates / Embossers / Seals</option><option value='+'"'+'sashestiarascrowns'+'"'+'>Sashes / Tiaras / Crowns</option><option value='+'"'+'medals'+'"'+'>Medals</option><option value='+'"'+'ribbons'+'"'+'>Ribbons</option><option value='+'"'+'lapelpins'+'"'+'>Lapel Pins</option><option value='+'"'+'diplomacovers'+'"'+'>Diploma Covers</option>';
	var schooloptions = '<option value='+'"'+'bulletinboards'+'"'+'>Bulletin, Letter, & Tack Boards</option><option value='+'"'+'lecterns'+'"'+'>Lecterns & Podiums</option><option value='+'"'+'portfoliosbinders'+'"'+'>Portfolios / Binders</option><option value='+'"'+'flagsflagpoles'+'"'+'>Flag / Flag - Poles</option><option value='+'"'+'miscellaneous'+'"'+'>Miscelleneous</option>';
	var giftoptions = '<option value='+'"'+'businessgifts'+'"'+'>Business Gifts</option><option value='+'"'+'holidaygifts'+'"'+'>Holiday Gifts</option><option value='+'"'+'birthdaygifts'+'"'+'>Birthday Gifts</option><option value='+'"'+'sportsgifts'+'"'+'>Sports Gifts</option><option value='+'"'+'bridesmaidsgroomsmengifts'+'"'+'>Bridesmaids / Groomsmen Gifts</option><option value='+'"'+'religiousjewelry'+'"'+'>Religious Jewelry</option>';
	var promotionaloptions = '<option value='+'"'+'calendarsclockscalculators'+'"'+'>Calendars, Clocks & Calculators</option><option value='+'"'+'clipsrulersdeskaccessories'+'"'+'>Clips, Rulers & Desk Accessories</option><option value='+'"'+'coffeetravelmugs'+'"'+'>Coffee & Travel Mugs</option><option value='+'"'+'custompens'+'"'+'>Custom Pens</option><option value='+'"'+'generalgiveaways'+'"'+'>General Giveaways</option><option value='+'"'+'golftennis'+'"'+'>Golf & Tennis</option><option value='+'"'+'holidayornaments'+'"'+'>Holiday Ornaments</option><option value='+'"'+'plasticpapercupsplatesnapkins'+'"'+'>Plastic / Paper Cups, Plates & Napkins</option><option value='+'"'+'shoppingbagsboxes'+'"'+'>Shopping Bags & Boxes</option><option value='+'"'+'sportsschoolspirit'+'"'+'>Sports & School Spirit</option><option value='+'"'+'sportswaterbottles'+'"'+'>Sports & Water Bottles</option><option value='+'"'+'totestotebags'+'"'+'>Totes & Tote Bags</option><option value='+'"'+'umbrellas'+'"'+'>Umbrellas</option><option value='+'"'+'wineglassesbarglassesweddingfavors'+'"'+'>Wine, Bar Glasses & Wedding Favors</option>';
	var displayoptions = '<option value='+'"'+'acrylicbrochureliteratureposterholders'+'"'+'>Brochure, Literature & Poster Holders</option><option value='+'"'+'acrylicglassballholders'+'"'+'>Acrylic / Glass Ball Holders</option><option value='+'"'+'flagcoinspecialtycases'+'"'+'>Flag, Coin & Specialty Cases</option><option value='+'"'+'floorstandingdisplays'+'"'+'>Floor Standing Displays</option><option value='+'"'+'wallmounteddisplays'+'"'+'>Wall Mounted Displays</option>';
	
	if ((category == "sportshobbyawards") && (category != "gifts")) 
	{
		document.productfinder.sports.disabled=false;
		document.getElementById("id2").innerHTML = "<strong>Select Sport / Hobby</strong>";
		document.getElementById("id3").innerHTML = "Recipient - Not Applicable";
	} 
	else
	{
		document.productfinder.sports.disabled=true;	
		document.productfinder.w.value="*";
	} 
		
	if (category == "specials") 
	{
		location.href='http://www.trophycentral.com/newproducts.html';
	}
	
	if (category == "gifts") 
	{
		document.productfinder.gender.disabled=false;
		document.getElementById("id3").innerHTML = "<strong>Recipient</strong>";
		document.getElementById("id2").innerHTML = "Sport / Hobby - Not Applicable";
		//document.getElementById("id1").innerHTML = "Product Type - Not Applicable";
		$("#recipient").show();
		document.productfinder.w.value="*";
	} 
	else
	{
		document.productfinder.gender.disabled=true;	
		document.productfinder.gender.value="";	
		$("#recipient").hide();
	} 
	if ((category == "schoolawards") || (category == "sportshobbyawards") || (category == "businessawards") || (category == "heroawards")  || (category == "generalawards"))
	{
		document.getElementById("id1").innerHTML = "<strong>Select Product Type</strong>";
		var selectbox = '<select id="pt" name="producttype" disabled="true"><option value="">Doesn'+"'"+'t Matter</option>' + normaloptions + '</select>';
		document.getElementById("pt").outerHTML = selectbox;
		if (navigator.appName == "Netscape")
		{
			document.getElementById("pt").innerHTML = '<option value="">Doesn'+"'"+'t Matter</option>' + normaloptions;
		}
		document.productfinder.producttype.disabled=false;
	} 
	else if (category == "schoolofficeproducts")
	{
		document.getElementById("id1").innerHTML = "<strong>Select Product Type</strong>";
		var selectbox = '<select id="pt" name="producttype" disabled="true"><option value="">Doesn'+"'"+'t Matter</option>' + schooloptions + '</select>';
		document.getElementById("pt").outerHTML = selectbox;
		if (navigator.appName == "Netscape")
		{
			document.getElementById("pt").innerHTML = '<option value="">Doesn'+"'"+'t Matter</option>' + schooloptions;
		}
		document.productfinder.producttype.disabled=false;
	} 
	else if (category == "gifts")
	{
		document.getElementById("id1").innerHTML = "<strong>Select Product Type</strong>";
		var selectbox = '<select id="pt" name="producttype" disabled="true"><option value="">Doesn'+"'"+'t Matter</option>' + giftoptions + '</select>';
		document.getElementById("pt").outerHTML = selectbox;
		if (navigator.appName == "Netscape")
		{
			document.getElementById("pt").innerHTML = '<option value="">Doesn'+"'"+'t Matter</option>' + giftoptions;
		}
		document.productfinder.producttype.disabled=false;
	} 
	else if (category == "promotionalproducts")
	{
		document.getElementById("id1").innerHTML = "<strong>Select Product Type</strong>";
		var selectbox = '<select id="pt" name="producttype" disabled="true"><option value="">Doesn'+"'"+'t Matter</option>' + promotionaloptions + '</select>';
		document.getElementById("pt").outerHTML = selectbox;
		if (navigator.appName == "Netscape")
		{
			document.getElementById("pt").innerHTML = '<option value="">Doesn'+"'"+'t Matter</option>' + promotionaloptions;
		}
		document.productfinder.producttype.disabled=false;
	} 
	else if (category == "displaycases")
	{
		document.getElementById("id1").innerHTML = "<strong>Select Product Type</strong>";
		var selectbox = '<select id="pt" name="producttype" disabled="true"><option value="">Doesn'+"'"+'t Matter</option>' + displayoptions + '</select>';
		document.getElementById("pt").outerHTML = selectbox;
		if (navigator.appName == "Netscape")
		{
			document.getElementById("pt").innerHTML = '<option value="">Doesn'+"'"+'t Matter</option>' + displayoptions;
		}
		document.productfinder.producttype.disabled=false;
	}
	else
	{
		document.productfinder.producttype.disabled=true;	
		document.productfinder.producttype.value="";	
	} 
}

function createDropdowns()
{
  document.write('<!-- BEGIN PRODUCT FINDER -->');
  document.write('<div style="width:100%;text-align:left;">');
  document.write('<div style="width:300px;text-align:left; font-family: verdana, arial, helvetica, sans-serif;background-color:#ffffff;font-size:10pt;">');
  document.write('<b class="grey_roundbox_top"><b class="gb1"></b><b class="gb2"></b><b class="gb3"></b><b class="gb4"></b></b>');
  document.write('<div class="grey_roundbox_content">');
  document.write('<center><font size="5"><strong>Shop Now</strong></font></center>');
  document.write('<form action="http://search.trophycentral.com/search" method="GET" onsubmit="addFacets();" name="productfinder">'); 
  document.write('<input type="hidden" name="af" value="" /> ');
  document.write('<input type="hidden" name="w" value="*" /> ');
  document.write('<div class="proddropdown">');
  document.write('<strong>Select Category</strong><br>');
  document.write('<select id="category" name="category" onchange="changeOptions();">');
  document.write('<option value="">Start Here - Click Arrow</option>');
  document.write('<option value="schoolawards">Awards & Recognition - School</option>');
  document.write('<option value="sportshobbyawards">Awards & Recognition - Sport / Hobby</option>');
  document.write('<option value="businessawards">Awards & Recognition - Business</option>');
  document.write('<option value="generalawards">Awards & Recognition - General</option>');
  document.write('<option value="heroawards">Awards & Recognition - Hero</option>');
  document.write('<option value="promotionalproducts">Promotional Products</option>');
  document.write('<option value="gifts">Gifts</option>');
  document.write('<option value="displaycases">Display Cases</option>');
  document.write('<option value="customapparel">Custom Apparel</option>');
  document.write('<option value="schoolofficeproducts">School / Office Products</option>');
  document.write('<option value="specials">Specials / Featured Products</option>');
  document.write('</select>');
  document.write('</div>');
  document.write('<div class="proddropdown">');
  document.write('<div id="id1">Product Type - Not Applicable</div>');
  document.write('<select id="pt" name="producttype" disabled="true">	');
  document.write('<option value="">Doesn'+"'"+'t Matter</option>');
  document.write('</select>');
  document.write('</div>');
  document.write('<div class="proddropdown">');
  document.write('<div id="id2">Sport / Hobby - Not Applicable</div>');
  document.write('<select name="sports" disabled="true">');
  document.write('<option value="" selected>Doesn'+"'"+'t Matter</option>');
  document.write('<option value="archery">Archery</option>'); 
  document.write('<option value="art">Art</option>'); 
  document.write('<option value="arts crafts">Arts & Crafts</option>'); 
  document.write('<option value="ballet">Ballet</option>');
  document.write('<option value="band">Band</option>');
  document.write('<option value="baseball">Baseball</option>'); 
  document.write('<option value="basketball">Basketball</option>'); 
  document.write('<option value="badminton">Badminton</option> ');
  document.write('<option value="beauty queen">Beauty Queen</option>'); 
  document.write('<option value="bicycle">Bicycle</option> ');
  document.write('<option value="billiards">Billiards</option>'); 
  document.write('<option value="bmx">BMX</option>'); 
  document.write('<option value="bowling">Bowling</option>'); 
  document.write('<option value="boxing">Boxing</option>'); 
  document.write('<option value="broomball">Broomball</option>'); 
  document.write('<option value="cards">Cards</option>'); 
  document.write('<option value="cheerleader">Cheerleader</option>'); 
  document.write('<option value="coach">Coach</option>'); 
  document.write('<option value="cooking culinary">Cooking / Culinary</option>'); 
  document.write('<option value="cross country">Cross Country</option>'); 
  document.write('<option value="curling">Curling</option>'); 
  document.write('<option value="cup">Cup</option>'); 
  document.write('<option value="dance">Dance</option>'); 
  document.write('<option value="darts">Darts</option>'); 
  document.write('<option value="disc golf">Disc Golf</option>'); 
  document.write('<option value="driving">Diving</option>'); 
  document.write('<option value="drama">Drama</option>'); 
  document.write('<option value="equestrian">Equestrian</option>'); 
  document.write('<option value="figure skating">Figure Skating</option>'); 
  document.write('<option value="fine arts">Fine Arts</option>'); 
  document.write('<option value="fishing">Fishing</option>'); 
  document.write('<option value="football">Football</option>'); 
  document.write('<option value="go cart">Go Cart</option>'); 
  document.write('<option value="goalie">Goalie</option>'); 
  document.write('<option value="golf">Golf</option>'); 
  document.write('<option value="graduate">Graduate</option>'); 
  document.write('<option value="gymnastics">Gymnastics</option>'); 
  document.write('<option value="ice hockey">Ice Hockey</option>'); 
  document.write('<option value="hole in one">Hole-in-One</option>'); 
  document.write('<option value="horses rear">Horses Rear</option>'); 
  document.write('<option value="karate">Karate</option>'); 
  document.write('<option value="lacrosse">Lacrosse</option>'); 
  document.write('<option value="marathon">Marathon</option>'); 
  document.write('<option value="motocross">Motocross</option>'); 
  document.write('<option value="music">Music</option>'); 
  document.write('<option value="mvp">MVP</option>'); 
  document.write('<option value="paintball">Paintball</option>'); 
  document.write('<option value="painting">Painting</option>'); 
  document.write('<option value="performing arts">Performing Arts</option>'); 
  document.write('<option value="photography">Photography</option>'); 
  document.write('<option value="pinewood derby">Pinewood Derby</option>'); 
  document.write('<option value="pom pom">Pom Pom</option>'); 
  document.write('<option value="power lifting">Power Lifting</option>');
  document.write('<option value="racquetball">Racquetball</option>'); 
  document.write('<option value="roller hockey">Roller Hockey</option>'); 
  document.write('<option value="sailing">Sailing</option>'); 
  document.write('<option value="skiing">Skiing</option>'); 
  document.write('<option value="snowmobile">Snowmobile</option>'); 
  document.write('<option value="soccer">Soccer</option>'); 
  document.write('<option value="softball">Softball</option>'); 
  document.write('<option value="stock car">Stock Car</option>'); 
  document.write('<option value="swimming">Swimming</option>'); 
  document.write('<option value="t-ball">T-Ball</option>'); 
  document.write('<option value="table tennis ping pong">Table Tennis / Ping Pong</option>'); 
  document.write('<option value="team mother">Team Mother</option>'); 
  document.write('<option value="tennis">Tennis</option>'); 
  document.write('<option value="track running">Track & Running</option>'); 
  document.write('<option value="skeet shooting">Skeet Shooting</option>'); 
  document.write('<option value="varsity">Varsity</option>');
  document.write('<option value="victory">Victory</option>'); 
  document.write('<option value="volleyball">Volleyball</option>'); 
  document.write('<option value="volunteer">Volunteer</option>'); 
  document.write('<option value="water polo">Water Polo</option>'); 
  document.write('<option value="weightlifting">Weightlifting</option>'); 
  document.write('<option value="wrestling">Wrestling</option>');
  document.write('</select>');
  document.write('</div>');

  document.write('<div class="proddropdown">');

  document.write('<div style="float: left">');

  document.write('<strong>Price</strong><br>');
  document.write('<select name="pricerange">');
  document.write('<option value="" selected>Doesn'+"'"+'t Matter</option>');
  document.write('<option value="00">Under $15</option>');
  document.write('<option value="01">$15 - $30</option>');
  document.write('<option value="02">$30 - $50</option>');
  document.write('<option value="03">$50 - $100</option>');
  document.write('<option value="04">$100 - $200</option>');
  document.write('<option value="05">$200 - $500</option>');
  document.write('<option value="06">Over $500</option>');
  document.write('</select>');

  document.write('</div><div id="recipient">');
  
  document.write('<div id="id3">Recipient - Not Applicable</div>');
  document.write('<select name="gender" disabled="true">');
  document.write('<option value="">Doesn'+"'"+'t Matter</option>');
  document.write('<option value="her">Her</option>');
  document.write('<option value="him">Him</option>');
  document.write('<option value="child">Child</option>');
  document.write('<option value="coach">Coach</option>');
  document.write('<option value="teacher educator">Teacher / Educator</option>');
  document.write('</select>');

  document.write('</div><div style="clear: both"></div>');

  document.write('<div style="font-weight: bold; margin-bottom: 10px; margin-top: 5px;"><input type="checkbox" name="processing" value="under5businessdays">Include Quick Ship Items Only</div>');  
  document.write('</div>');
  document.write('<center><input type="submit" Value="Go" class="button">&nbsp;<input type="reset" Value="Reset" class="button"></center>');
  document.write('</form>');
  document.write('</div>');
  document.write('<b class="grey_roundbox_bottom"><b class="gb4"></b><b class="gb3"></b><b class="gb2"></b><b class="gb1"></b></b>');
  document.write('</div>');
  document.write('</div>');
  document.write('<!-- END PRODUCT FINDER -->');
  $("#recipient").hide();
}