// JavaScript Document

			var lastChangedTier;
			var totalTierCount;
			
			
			totalTierCount=2;
			lastChangedTier=0;
			n = new Array;
			c = new Array;
			
			function categoryInformation(name,id,endtier) 
			{ 
			   this.name = name 
			   this.id = id
			   this.endtier = endtier
			} 
n[0]=new categoryInformation("Building Materials",1,"");
n[1]=new categoryInformation("Electrical products",2,"");
n[2]=new categoryInformation("Food Products",3,"");
n[3]=new categoryInformation("General",4,"");
n[4]=new categoryInformation("Industrial supplies",5,"");
n[5]=new categoryInformation("Janitorial",6,"");
n[6]=new categoryInformation("Medical equipment",7,"");
n[7]=new categoryInformation("other",8,"");
n[8]=new categoryInformation("Bakery",9,"");
n[9]=new categoryInformation("Bar",10,"");
n[10]=new categoryInformation("Bed & Breakfast",11,"");
n[11]=new categoryInformation("Beer & Wine store",12,"");
n[12]=new categoryInformation("Bagel Shop",13,"");
n[13]=new categoryInformation("Catering",14,"");
n[14]=new categoryInformation("Coffee Shop",15,"");
n[15]=new categoryInformation("Deli",16,"");
n[16]=new categoryInformation("Diner",17,"");
n[17]=new categoryInformation("Ethnic Restaurant",18,"");
n[18]=new categoryInformation("Fast Food Restaurant",19,"");
n[19]=new categoryInformation("Fine Dining",20,"");
n[20]=new categoryInformation("Food-other",21,"");
n[21]=new categoryInformation("Pizza Restaurant",22,"");
n[22]=new categoryInformation("Restaurant",23,"");
n[23]=new categoryInformation("Restaurant Supply",24,"");
n[24]=new categoryInformation("Restaurant Upscale",25,"");
n[25]=new categoryInformation("Subshop",26,"");
n[26]=new categoryInformation("Machine Shop",27,"");
n[27]=new categoryInformation("General",28,"");
n[28]=new categoryInformation("Furniture",29,"");
n[29]=new categoryInformation("Injection Molding",30,"");
n[30]=new categoryInformation("Other",31,"");
n[31]=new categoryInformation("Electrical",32,"");
n[32]=new categoryInformation("Fabricated Metal",33,"");
n[33]=new categoryInformation("Food products",34,"");
n[34]=new categoryInformation("General",35,"");
n[35]=new categoryInformation("Industrial supplies",36,"");
n[36]=new categoryInformation("lumber and wood",37,"");
n[37]=new categoryInformation("medical equipment",38,"");
n[38]=new categoryInformation("rubber and plastic",39,"");
n[39]=new categoryInformation("Small",40,"");
n[40]=new categoryInformation("Auto Body Repair",41,"");
n[41]=new categoryInformation("New Cars",42,"");
n[42]=new categoryInformation("Used Cars",43,"");
n[43]=new categoryInformation("Auto Detailing",44,"");
n[44]=new categoryInformation("Auto Lube Shop",45,"");
n[45]=new categoryInformation("Auto Muffler",46,"");
n[46]=new categoryInformation("Auto Parts",47,"");
n[47]=new categoryInformation("Auto Repair",48,"");
n[48]=new categoryInformation("Auto Transmission",49,"");
n[49]=new categoryInformation("Car rental",50,"");
n[50]=new categoryInformation("Car Wash",51,"");
n[51]=new categoryInformation("Gas service station",52,"");
n[52]=new categoryInformation("Gas Service Station with Convenience store Deli",53,"");
n[53]=new categoryInformation("Gas Service Station with Repairs",54,"");
n[54]=new categoryInformation("Limo Service",55,"");
n[55]=new categoryInformation("Taxi Cab",56,"");
n[56]=new categoryInformation("Antique Store",57,"");
n[57]=new categoryInformation("Appliance Store",58,"");
n[58]=new categoryInformation("Arts and Crafts Store",59,"");
n[59]=new categoryInformation("Book Store",60,"");
n[60]=new categoryInformation("Bridal Shop",61,"");
n[61]=new categoryInformation("Bycycle shop",62,"");
n[62]=new categoryInformation("Card Shop",63,"");
n[63]=new categoryInformation("Carpet Store",64,"");
n[64]=new categoryInformation("Cellular store",65,"");
n[65]=new categoryInformation("Childrens Shop",66,"");
n[66]=new categoryInformation("Cigar Store",67,"");
n[67]=new categoryInformation("Clothing store",68,"");
n[68]=new categoryInformation("Computer Sales",69,"");
n[69]=new categoryInformation("Convenience Store",70,"");
n[70]=new categoryInformation("Convenience store with beer wine",71,"");
n[71]=new categoryInformation("Convenience Store with Gas",72,"");
n[72]=new categoryInformation("Donut Shop",73,"");
n[73]=new categoryInformation("Drug Store",74,"");
n[74]=new categoryInformation("Fabric Shop",75,"");
n[75]=new categoryInformation("Flower Shop",76,"");
n[76]=new categoryInformation("Fresh Produce Store",77,"");
n[77]=new categoryInformation("Furniture Store",78,"");
n[78]=new categoryInformation("Garden center",79,"");
n[79]=new categoryInformation("Gift Store",80,"");
n[80]=new categoryInformation("Golf Shop",81,"");
n[81]=new categoryInformation("Grocery Store",82,"");
n[82]=new categoryInformation("Hardware Store",83,"");
n[83]=new categoryInformation("Health Food Store",84,"");
n[84]=new categoryInformation("Hobby Shop",85,"");
n[85]=new categoryInformation("Ice Cream Shop",86,"");
n[86]=new categoryInformation("Jewelry Store",87,"");
n[87]=new categoryInformation("Liquor store",88,"");
n[88]=new categoryInformation("Mens Clothing Store",89,"");
n[89]=new categoryInformation("Motorcycle Dealership",90,"");
n[90]=new categoryInformation("Music Store",91,"");
n[91]=new categoryInformation("Nursery",92,"");
n[92]=new categoryInformation("Office Equipment",93,"");
n[93]=new categoryInformation("Other Retail",94,"");
n[94]=new categoryInformation("Pet Shop",95,"");
n[95]=new categoryInformation("Shoe Store",96,"");
n[96]=new categoryInformation("Sporting Goods Store",97,"");
n[97]=new categoryInformation("Tire Store",98,"");
n[98]=new categoryInformation("Used Furniture",99,"");
n[99]=new categoryInformation("Vending",100,"");
n[100]=new categoryInformation("Video Store",101,"");
n[101]=new categoryInformation("Wholesaling",102,"");
n[102]=new categoryInformation("Womens Clothing Store",103,"");
n[103]=new categoryInformation("Accounting Practices",104,"");
n[104]=new categoryInformation("Adult day care center",105,"");
n[105]=new categoryInformation("Advertising Agency",106,"");
n[106]=new categoryInformation("Appliance Repair",107,"");
n[107]=new categoryInformation("Appraisal Service",108,"");
n[108]=new categoryInformation("Architectural services",109,"");
n[109]=new categoryInformation("Assisted living",110,"");
n[110]=new categoryInformation("Beauty Salons",111,"");
n[111]=new categoryInformation("Billboard advertising",112,"");
n[112]=new categoryInformation("Billiards",113,"");
n[113]=new categoryInformation("Boat Marina",114,"");
n[114]=new categoryInformation("Bowling center",115,"");
n[115]=new categoryInformation("Building Maintenance",116,"");
n[116]=new categoryInformation("Call Center",117,"");
n[117]=new categoryInformation("Candy Store",118,"");
n[118]=new categoryInformation("Carpet cleaning",119,"");
n[119]=new categoryInformation("Check Cashing",120,"");
n[120]=new categoryInformation("Chiropractor",121,"");
n[121]=new categoryInformation("Collection Agency",122,"");
n[122]=new categoryInformation("Commecial Cleaning",123,"");
n[123]=new categoryInformation("Computer Service",124,"");
n[124]=new categoryInformation("General",125,"");
n[125]=new categoryInformation("Heating and AC",126,"");
n[126]=new categoryInformation("Specific",127,"");
n[127]=new categoryInformation("Day care Center",128,"");
n[128]=new categoryInformation("Delivery service",129,"");
n[129]=new categoryInformation("Dental practice",130,"");
n[130]=new categoryInformation("Direct Mail",131,"");
n[131]=new categoryInformation("Dry Cleaners",132,"");
n[132]=new categoryInformation("E commerce",133,"");
n[133]=new categoryInformation("Electrical",134,"");
n[134]=new categoryInformation("Employment agency",135,"");
n[135]=new categoryInformation("Engineering or Architectural practices",136,"");
n[136]=new categoryInformation("Equipment Rental",137,"");
n[137]=new categoryInformation("Event Management",138,"");
n[138]=new categoryInformation("Exercise Center",139,"");
n[139]=new categoryInformation("Film Processing",140,"");
n[140]=new categoryInformation("Fitness Center",141,"");
n[141]=new categoryInformation("Funeral Home",142,"");
n[142]=new categoryInformation("Glass Shop",143,"");
n[143]=new categoryInformation("Golf Course",144,"");
n[144]=new categoryInformation("Health Club",145,"");
n[145]=new categoryInformation("Heating Air Conditioner contractor",146,"");
n[146]=new categoryInformation("Hotel and Motel",147,"");
n[147]=new categoryInformation("Insurance Agency",148,"");
n[148]=new categoryInformation("Interior Design",149,"");
n[149]=new categoryInformation("Janitorial Service",150,"");
n[150]=new categoryInformation("Landscape contractor",151,"");
n[151]=new categoryInformation("Laundromat",152,"");
n[152]=new categoryInformation("Law practice",153,"");
n[153]=new categoryInformation("Marina",154,"");
n[154]=new categoryInformation("Medical Practice",155,"");
n[155]=new categoryInformation("Medical Supplies",156,"");
n[156]=new categoryInformation("Min self Storage",157,"");
n[157]=new categoryInformation("Miniature Golf",158,"");
n[158]=new categoryInformation("Motel",159,"");
n[159]=new categoryInformation("Movie theater",160,"");
n[160]=new categoryInformation("Muffler Shop",161,"");
n[161]=new categoryInformation("Newspaper",162,"");
n[162]=new categoryInformation("Nursing Home",163,"");
n[163]=new categoryInformation("Optical practice",164,"");
n[164]=new categoryInformation("Packaging and shipping",165,"");
n[165]=new categoryInformation("Party Service Supply",166,"");
n[166]=new categoryInformation("Personnel Agency",167,"");
n[167]=new categoryInformation("Photography",168,"");
n[168]=new categoryInformation("Picture Framing",169,"");
n[169]=new categoryInformation("Plumbing",170,"");
n[170]=new categoryInformation("Pool Company",171,"");
n[171]=new categoryInformation("Printing Shop",172,"");
n[172]=new categoryInformation("Property Management",173,"");
n[173]=new categoryInformation("Publishing",174,"");
n[174]=new categoryInformation("Real Estate agency",175,"");
n[175]=new categoryInformation("Rental Store",176,"");
n[176]=new categoryInformation("Resort",177,"");
n[177]=new categoryInformation("Retirement Home",178,"");
n[178]=new categoryInformation("Roofing",179,"");
n[179]=new categoryInformation("other",180,"");
n[180]=new categoryInformation("Sign Company",181,"");
n[181]=new categoryInformation("Tanning salon",182,"");
n[182]=new categoryInformation("Temporary Staffing",183,"");
n[183]=new categoryInformation("Travel Agency",184,"");
n[184]=new categoryInformation("Tree Service",185,"");
n[185]=new categoryInformation("Truck Stop",186,"");
n[186]=new categoryInformation("Trucking",187,"");
n[187]=new categoryInformation("Veterinarian",188,"");
n[188]=new categoryInformation("Video and TV Repair",189,"");
n[189]=new categoryInformation("Waste management",190,"");
n[190]=new categoryInformation("Woodworking",191,"");
n[191]=new categoryInformation("Information technology",192,"");
n[192]=new categoryInformation("Internet Service Provider",193,"");
n[193]=new categoryInformation("Software company",194,"");
n[194]=new categoryInformation("Other",195,"");

n[195]=new categoryInformation("",196,"");

n[196]=new categoryInformation("Distribution",197,"");
n[197]=new categoryInformation("Food and Drink",198,"");
n[198]=new categoryInformation("Manufacturing",199,"");
n[199]=new categoryInformation("Auto Related",200,"");
n[200]=new categoryInformation("Retail",201,"");
n[201]=new categoryInformation("Services",202,"");
n[202]=new categoryInformation("Technology",203,"");

c[0]=new Array(n[196],n[0]);
c[1]=new Array(n[196],n[1]);
c[2]=new Array(n[196],n[2]);
c[3]=new Array(n[196],n[3]);
c[4]=new Array(n[196],n[4]);
c[5]=new Array(n[196],n[5]);
c[6]=new Array(n[196],n[6]);
c[7]=new Array(n[196],n[7]);
c[8]=new Array(n[197],n[8]);
c[9]=new Array(n[197],n[9]);
c[10]=new Array(n[197],n[10]);
c[11]=new Array(n[197],n[11]);
c[12]=new Array(n[197],n[12]);
c[13]=new Array(n[197],n[13]);
c[14]=new Array(n[197],n[14]);
c[15]=new Array(n[197],n[15]);
c[16]=new Array(n[197],n[16]);
c[17]=new Array(n[197],n[17]);
c[18]=new Array(n[197],n[18]);
c[19]=new Array(n[197],n[19]);
c[20]=new Array(n[197],n[20]);
c[21]=new Array(n[197],n[21]);
c[22]=new Array(n[197],n[22]);
c[23]=new Array(n[197],n[23]);
c[24]=new Array(n[197],n[24]);
c[25]=new Array(n[197],n[25]);
c[26]=new Array(n[198],n[26]);
c[27]=new Array(n[198],n[27]);
c[28]=new Array(n[198],n[28]);
c[29]=new Array(n[198],n[29]);
c[30]=new Array(n[198],n[30]);
c[31]=new Array(n[198],n[31]);
c[32]=new Array(n[198],n[32]);
c[33]=new Array(n[198],n[33]);
c[34]=new Array(n[198],n[34]);
c[35]=new Array(n[198],n[35]);
c[36]=new Array(n[198],n[36]);
c[37]=new Array(n[198],n[37]);
c[38]=new Array(n[198],n[38]);
c[39]=new Array(n[198],n[39]);
c[40]=new Array(n[199],n[40]);
c[41]=new Array(n[199],n[41]);
c[42]=new Array(n[199],n[42]);
c[43]=new Array(n[199],n[43]);
c[44]=new Array(n[199],n[44]);
c[45]=new Array(n[199],n[45]);
c[46]=new Array(n[199],n[46]);
c[47]=new Array(n[199],n[47]);
c[48]=new Array(n[199],n[48]);
c[49]=new Array(n[199],n[49]);
c[50]=new Array(n[199],n[50]);
c[51]=new Array(n[199],n[51]);
c[52]=new Array(n[199],n[52]);
c[53]=new Array(n[199],n[53]);
c[54]=new Array(n[199],n[54]);
c[55]=new Array(n[199],n[55]);
c[56]=new Array(n[200],n[56]);
c[57]=new Array(n[200],n[57]);
c[58]=new Array(n[200],n[58]);
c[59]=new Array(n[200],n[59]);
c[60]=new Array(n[200],n[60]);
c[61]=new Array(n[200],n[61]);
c[62]=new Array(n[200],n[62]);
c[63]=new Array(n[200],n[63]);
c[64]=new Array(n[200],n[64]);
c[65]=new Array(n[200],n[65]);
c[66]=new Array(n[200],n[66]);
c[67]=new Array(n[200],n[67]);
c[68]=new Array(n[200],n[68]);
c[69]=new Array(n[200],n[69]);
c[70]=new Array(n[200],n[70]);
c[71]=new Array(n[200],n[71]);
c[72]=new Array(n[200],n[72]);
c[73]=new Array(n[200],n[73]);
c[74]=new Array(n[200],n[74]);
c[75]=new Array(n[200],n[75]);
c[76]=new Array(n[200],n[76]);
c[77]=new Array(n[200],n[77]);
c[78]=new Array(n[200],n[78]);
c[79]=new Array(n[200],n[79]);
c[80]=new Array(n[200],n[80]);
c[81]=new Array(n[200],n[81]);
c[82]=new Array(n[200],n[82]);
c[83]=new Array(n[200],n[83]);
c[84]=new Array(n[200],n[84]);
c[85]=new Array(n[200],n[85]);
c[86]=new Array(n[200],n[86]);
c[87]=new Array(n[200],n[87]);
c[88]=new Array(n[200],n[88]);
c[89]=new Array(n[200],n[89]);
c[90]=new Array(n[200],n[90]);
c[91]=new Array(n[200],n[91]);
c[92]=new Array(n[200],n[92]);
c[93]=new Array(n[200],n[93]);
c[94]=new Array(n[200],n[94]);
c[95]=new Array(n[200],n[95]);
c[96]=new Array(n[200],n[96]);
c[97]=new Array(n[200],n[97]);
c[98]=new Array(n[200],n[98]);
c[99]=new Array(n[200],n[99]);
c[100]=new Array(n[200],n[100]);
c[101]=new Array(n[200],n[101]);
c[102]=new Array(n[200],n[102]);
c[103]=new Array(n[201],n[103]);
c[104]=new Array(n[201],n[104]);
c[105]=new Array(n[201],n[105]);
c[106]=new Array(n[201],n[106]);
c[107]=new Array(n[201],n[107]);
c[108]=new Array(n[201],n[108]);
c[109]=new Array(n[201],n[109]);
c[110]=new Array(n[201],n[110]);
c[111]=new Array(n[201],n[111]);
c[112]=new Array(n[201],n[112]);
c[113]=new Array(n[201],n[113]);
c[114]=new Array(n[201],n[114]);
c[115]=new Array(n[201],n[115]);
c[116]=new Array(n[201],n[116]);
c[117]=new Array(n[201],n[117]);
c[118]=new Array(n[201],n[118]);
c[119]=new Array(n[201],n[119]);
c[120]=new Array(n[201],n[120]);
c[121]=new Array(n[201],n[121]);
c[122]=new Array(n[201],n[122]);
c[123]=new Array(n[201],n[123]);
c[124]=new Array(n[201],n[124]);
c[125]=new Array(n[201],n[125]);
c[126]=new Array(n[201],n[126]);
c[127]=new Array(n[201],n[127]);
c[128]=new Array(n[201],n[128]);
c[129]=new Array(n[201],n[129]);
c[130]=new Array(n[201],n[130]);
c[131]=new Array(n[201],n[131]);
c[132]=new Array(n[201],n[132]);
c[133]=new Array(n[201],n[133]);
c[134]=new Array(n[201],n[134]);
c[135]=new Array(n[201],n[135]);
c[136]=new Array(n[201],n[136]);
c[137]=new Array(n[201],n[137]);
c[138]=new Array(n[201],n[138]);
c[139]=new Array(n[201],n[139]);
c[140]=new Array(n[201],n[140]);
c[141]=new Array(n[201],n[141]);
c[142]=new Array(n[201],n[142]);
c[143]=new Array(n[201],n[143]);
c[144]=new Array(n[201],n[144]);
c[145]=new Array(n[201],n[145]);
c[146]=new Array(n[201],n[146]);
c[147]=new Array(n[201],n[147]);
c[148]=new Array(n[201],n[148]);
c[149]=new Array(n[201],n[149]);
c[150]=new Array(n[201],n[150]);
c[151]=new Array(n[201],n[151]);
c[152]=new Array(n[201],n[152]);
c[153]=new Array(n[201],n[153]);
c[154]=new Array(n[201],n[154]);
c[155]=new Array(n[201],n[155]);
c[156]=new Array(n[201],n[156]);
c[157]=new Array(n[201],n[157]);
c[158]=new Array(n[201],n[158]);
c[159]=new Array(n[201],n[159]);
c[160]=new Array(n[201],n[160]);
c[161]=new Array(n[201],n[161]);
c[162]=new Array(n[201],n[162]);
c[163]=new Array(n[201],n[163]);
c[164]=new Array(n[201],n[164]);
c[165]=new Array(n[201],n[165]);
c[166]=new Array(n[201],n[166]);
c[167]=new Array(n[201],n[167]);
c[168]=new Array(n[201],n[168]);
c[169]=new Array(n[201],n[169]);
c[170]=new Array(n[201],n[170]);
c[171]=new Array(n[201],n[171]);
c[172]=new Array(n[201],n[172]);
c[173]=new Array(n[201],n[173]);
c[174]=new Array(n[201],n[174]);
c[175]=new Array(n[201],n[175]);
c[176]=new Array(n[201],n[176]);
c[177]=new Array(n[201],n[177]);
c[178]=new Array(n[201],n[178]);
c[179]=new Array(n[201],n[179]);
c[180]=new Array(n[201],n[180]);
c[181]=new Array(n[201],n[181]);
c[182]=new Array(n[201],n[182]);
c[183]=new Array(n[201],n[183]);
c[184]=new Array(n[201],n[184]);
c[185]=new Array(n[201],n[185]);
c[186]=new Array(n[201],n[186]);
c[187]=new Array(n[201],n[187]);
c[188]=new Array(n[201],n[188]);
c[189]=new Array(n[201],n[189]);
c[190]=new Array(n[201],n[190]);
c[191]=new Array(n[202],n[191]);
c[192]=new Array(n[202],n[192]);
c[193]=new Array(n[202],n[193]);
c[194]=new Array(n[202],n[194]);






			function loadLowerTier(form)
			{
			
				var currentTierID;
				var currentID;
				var currentCategoryName;
				currentArrayList = new Array;
				var currentArrayListIndex = 0;
			
				currentTierID = getCurrentTierID(form.name);
				currentID = form.options[form.selectedIndex].value;
				currentCategoryName = form.options[form.selectedIndex].text;
				
				if (lastChangedTier >= currentTierID || currentID == 0) 
				{
					doCleanUp(currentTierID)
				}
			
			
				if (lastTier(currentCategoryName)) 
				{
					lastChangedTier = currentTierID;
					return false
				}
				
				for (var i=0; i < c.length; i++) {
					
					if (c[i].length !== 1)
					{
						
						if (c[i].length >= parseInt(currentTierID)) 
						{
			
							if (c[i][currentTierID-1].id==currentID) 
							{
						
								if (!categoryAlreadyExists(currentArrayList,c[i][currentTierID].name,c[i][currentTierID].id)) 
								{
							
									var isEndTier;
								
									if ((c[i].length-1) == parseInt(currentTierID)) 
									{
										isEndTier = "y";						
									} else {
										isEndTier = "n";
									}
								
								currentArrayList[currentArrayListIndex] = new categoryInformation(c[i][currentTierID].name,c[i][currentTierID].id,isEndTier);
								currentArrayListIndex = currentArrayListIndex + 1;
							}
						}
			
					}
				}
			}
				
				populateOptionList(currentArrayList,currentTierID);
			
				lastChangedTier = currentTierID;
			}
			
			
			function doCleanUp(cT) 
			{
			
				var startTier;
				startTier = parseInt(cT) + 1;
				
			
				for (var p=startTier; p <= totalTierCount; p++) 
				{
					
					selectBox = eval("document.forms.advancedSearchForm.tier" + p)
					selectBox.length = 0;
					selectBox.length = 1;
					selectBox.options[0].text = "- - - - - - - - - - - - - - - - - - - -";
					selectBox.options[0].value = "0";
			
				}
			
			}
			
			
			function categoryAlreadyExists(currentArrayList,name,id) 
			{
			
				var doesExist;
				doesExist = false;
			
			
				
				for (var j=0;j < currentArrayList.length;j++) 
				{
					
					if ((currentArrayList[j].name==name) && (currentArrayList[j].id==id)) 
					{
						doesExist = true;	
					}
			
				}
			
			
				return doesExist
			
			
			}
			
			
			function getCurrentTierID(f) 
			{
			
				var formNumber;
			
				formNumber = f.charAt(f.length-1);
			
				return formNumber
			
			}
			
			
			function populateOptionList(cL,t) 
			{
			
				var selectBox;
				var childTier;
				var endTierChar;
			
				childTier = parseInt(t) + 1;
			
			
				selectBox = eval("document.forms.advancedSearchForm.tier" + childTier);
			
				selectBox.length = cL.length + 1;
			
				for (var k=0; k < cL.length; k++) {
			
			
					if (cL[k].endtier=="n") {
						endTierChar = "->";
					} else {
						endTierChar = "";
					}
				
			
					selectBox.options[k].text = cL[k].name + endTierChar;
					selectBox.options[k].value = cL[k].id;
				}
				
				selectBox.options[cL.length].text = "- - - - - - - - - - - - - - - - - - - -"
				selectBox.options[cL.length].value = "0"
			}
			
			function lastTier(n) {
				
				var lastChar;
			
				lastChar = n.charAt(n.length - 1);
			
				if (lastChar=='>') {
					return false 
				} else {
					return true	
				}
			
			}
			
			
			function submitForm() {
			
				var catID;
				catID = "";
			
				selectBox = eval("document.forms.advancedSearchForm.tier" + lastChangedTier);
			
				for (var i = 0; i < selectBox.length; i++) {
				
			
					if (selectBox.options[i].selected==true) {
						catID = selectBox.options[i].value;
					}
			
				}
				
				if (catID=="" || catID=="0") {
					alert("Please choose a category");
					return false;
				} else {
					return true;
				}
			
				
			}
			
			
			function loadFirstTier() {
				var currentArrayListIndex;
				currentArrayList = new Array;
			
				currentArrayListIndex=0;
			
				for (var i=0; i < c.length; i++) {
				
					if (!categoryAlreadyExists(currentArrayList,c[i][0].name,c[i][0].id)) {
						currentArrayList[currentArrayListIndex] = new categoryInformation(c[i][0].name,c[i][0].id,"");
						currentArrayListIndex = currentArrayListIndex + 1;			
			
					}
				}
			
				selectBox = eval("document.forms.advancedSearchForm.tier1");
			
				selectBox.length=currentArrayList.length+1;
			
				for (var i=0; i < currentArrayList.length; i++) {
			
					
			
					selectBox.options[i].value = currentArrayList[i].id;	
					selectBox.options[i].text = currentArrayList[i].name + "->";
			
				}
			
				
				selectBox.options[currentArrayList.length].value = "0";
				selectBox.options[currentArrayList.length].text = "- - - - - - - - - - - - - - - - - - - -";
				
			}
			
			