		function linkGen(carName)
		{
			var buffer = "<li class=\"car_list\">";
			if (carName.indexOf("Camry")!=-1)
			{
				buffer += "<a href=\"/contents/buy/cars/camry_2006/index.jsp\" title=\"Camry\"><img class=\"imgs\" src=\"/images/cars/2006_camry/car.jpg\" width=\"100px\" height=\"70px\" align=\"left\"/></a><div class=\"car_font\">Camry</div><div class=\"car_blurb\">From executives to creative professionals, this classy sedan boasts of surprising versatility in an elegant package.</div><br/><a href=\"/contents/buy/cars/camry_2006/index.jsp\">learn more  ></a>";
			}
			else if (carName.indexOf("Altis")!=-1)
			{
				buffer += "<a href=\"/contents/buy/cars/altis/index.jsp\" title=\"Corolla Altis\"><img class=\"imgs\" src=\"/images/cars/altis/car.jpg\" width=\"100px\" height=\"70px\" align=\"left\"/></a><div class=\"car_font\">Corolla Altis</div><div class=\"car_blurb\">The unbeatable combination of a compact, sleek and practical  car in one smooth drive, the Corolla Altis remains to be the favorite stylish, all-around Toyota sedan.</div><br /><a href=\"/contents/buy/cars/altis/index.jsp\">learn more  ></a>";
			}
			else if (carName.indexOf("Fortuner")!=-1)
			{
				buffer += "<a href=\"/contents/buy/cars/fortuner_2006/index.jsp\" title=\"Fortuner\"><img class=\"imgs\" src=\"/images/cars/2006_fortuner/car.jpg\" width=\"100px\" height=\"70px\" align=\"left\"/></a><div class=\"car_font\">Fortuner</div><div class=\"car_blurb\">Muscle. Function. Power. Action. Need we say more about the most in-demand Toyota SUV?</div><br /><a href=\"/contents/buy/cars/fortuner_2006/index.jsp\">learn more  ></a>";
			}
			else if (carName.indexOf("Hiace")!=-1)
			{
				buffer += "<a href=\"/contents/buy/cars/hiace_2006/index.jsp\" title=\"Hiace\"><img class=\"imgs\" src=\"/images/cars/2006_hiace/car.jpg\" width=\"100px\" height=\"70px\" align=\"left\"/></a><div class=\"car_font\">Hiace</div><div class=\"car_blurb\">In this age of fast progress, even our vans double up their speed in becoming BIGGER, BOLDER and BETTER. Discover the new Toyota Hiace.</div><br /><a href=\"/contents/buy/cars/hiace_2006/index.jsp\">learn more  ></a>";
			}
			else if (carName.indexOf("Hilux")!=-1)
			{
				buffer += "<a href=\"/contents/buy/cars/hilux_2006/index.jsp\" title=\"Hilux\"><img class=\"imgs\" src=\"/images/cars/2006_hilux/car.jpg\" width=\"100px\" height=\"70px\" align=\"left\"/></a><div class=\"car_font\">Hilux</div><div class=\"car_blurb\">The perfect partner of the Do-It-Yourself, business-minded, active and free-spirited traveler, the Hilux continues to exceed expectations with its impressive design and function.</div><br /><a href=\"/contents/buy/cars/hilux_2006/index.jsp\">learn more  ></a>";
			}
			else if (carName.indexOf("Innova")!=-1)
			{
				buffer += "<a href=\"/contents/buy/cars/innova_2006/index.jsp\" title=\"Innova\"><img class=\"imgs\" src=\"/images/cars/2006_innova/car.jpg\" width=\"100px\" height=\"70px\" align=\"left\"/></a><div class=\"car_font\">Innova</div><div class=\"car_blurb\">Spatial comfort. Head-turning stylish design. Practical functionality. The Innova surely is not called the beautiful revolution for nothing.</div><br /><a href=\"/contents/buy/cars/innova_2006/index.jsp\">learn more  ></a>";
			}
			else if (carName.indexOf("Previa")!=-1)
			{
				buffer += "<a href=\"/contents/buy/cars/previa_2006/index.jsp\" title=\"Previa\"><img class=\"imgs\" src=\"/images/cars/2006_previa/car.jpg\" width=\"100px\" height=\"70px\" align=\"left\"/></a><div class=\"car_font\">Previa</div><div class=\"car_blurb\">First of its class, the Previa stands out as a luxury AUV that caters to groups of small to large families and friends. With a spacious, efficient and tasteful design, the Previa remains to be the epitome of classy form and function in an AUV.</div><br /><a href=\"/contents/buy/cars/previa_2006/index.jsp\">learn more  ></a>";
			}
			else if (carName.indexOf("RAV4")!=-1)
			{
				buffer += "<a href=\"/contents/buy/cars/rav4_2006/index.jsp\" title=\"RAV4\"><img class=\"imgs\" src=\"/images/cars/2006_rav4/car.jpg\" width=\"100px\" height=\"70px\" align=\"left\"/></a><div class=\"car_font\">RAV4</div><div class=\"car_blurb\">Undeniably a crowd favorite, this Toyota vehicle surely puts the sport in a Sport Utility Vehicle. The choice of the young, new and different, the RAV4 consistently attracts on-lookers, drivers and riders alike with its high-impact overall appeal. </div><br /><a href=\"/contents/buy/cars/rav4_2006/index.jsp\">learn more  ></a>";
			}
			else if (carName.indexOf("Prado")!=-1)
			{
				buffer += "<a href=\"/contents/buy/cars/prado_2006/index.jsp\" title=\"Prado\"><img class=\"imgs\" src=\"/images/cars/2006_prado/car.jpg\" width=\"100px\" height=\"70px\" align=\"left\"/></a><div class=\"car_font\">Prado</div><div class=\"car_blurb\">Marking its territory wherever it goes, the top-of-the-line Toyota SUV Prado ensures its driver and passengers make a bold statement wherever they may be. Considered an automotive status symbol, the Prado oozes with style and substance unmatched.</div><br /><a href=\"/contents/buy/cars/prado_2006/index.jsp\">learn more  ></a>";
			}
			else if (carName.indexOf("Vios")!=-1)
			{
				buffer += "<a href=\"/contents/buy/cars/vios/index.jsp\" title=\"Vios\"><img class=\"imgs\" src=\"/images/cars/vios/car.jpg\" width=\"100px\" height=\"70px\" align=\"left\"/></a><div class=\"car_font\">Vios</div><div class=\"car_blurb\">Small but terribly good. Unbeatable compact design meets unbelievably spacious interiors and practicality. The VIOS embodies the perfect choice for the perfectly practical Toyota aficionado.</div><br /><a href=\"/contents/buy/cars/vios/index.jsp\">learn more  ></a>";
			}
			else if (carName.indexOf("Yaris")!=-1)
			{
				buffer += "<a href=\"/contents/buy/cars/yaris/index.jsp\" title=\"Vios\"><img class=\"imgs\" src=\"/images/cars/yaris/accessory.jpg\" width=\"100px\" height=\"70px\" align=\"left\"/></a><div class=\"car_font\">Yaris</div><div class=\"car_blurb\">It's hip.  It's cool. It's an awesome driving experience in a funsized pack.  The Yaris dares to stand out in a crowd, exuding youth and vibrance.</div><br /><a href=\"/contents/buy/cars/yaris/index.jsp\">learn more  ></a>";
			}
			buffer += "<br /><br /><div class=\"lineBreaker\"></div></li><br/>"
			return buffer;
		}
		function narrowCar(selectField)
		{
			var buffer ="<ul>";
			var tempA = new Array();
			
			if (selectField[selectField.selectedIndex].value == "")
			{
				// display all
				for (var j=0; j < cA.length; j++)
				{
			
					if (tempA[cA[j].model]==null)
					{
						tempA[cA[j].model]= cA[j].model;
					}
				}
			}
			else 
			{
			
				var low = 0;
				var high = 0;
				switch (parseInt(selectField[selectField.selectedIndex].value))
				{
					case 1: low = 500000; high = 600000; break;
					case 2: low = 600001; high = 750000; break;
					case 3: low = 750001; high = 900000; break;
					case 4: low = 900001; high = 1000000; break;
					case 5: low = 1000001; high = 1200000; break;
					case 6: low = 1200001; high = 10000000; break;
					case 7: low = 0; high = 10000000; break;
				}
			
				for (var j=0; j < cA.length; j++)
				{
			
					if (tempA[cA[j].model]==null && cA[j].price >= low  && cA[j].price <= high)
					{
						tempA[cA[j].model]= cA[j].model;
					}
				}
			}
			
			var carCount = 0;
			for (var carName in tempA)
			{
				carCount++;
			}
			
			var leftBuffer="",rightBuffer = "";
			var cCount = 0;
			for (var carName in tempA)
			{
				leftBuffer += linkGen(carName);
				cCount++;
			}
			
			
			if (leftBuffer == "<ul>")
			{
				leftBuffer= "<li>No Cars matched your criteria"
				rightBuffer = "";
			}
			
			document.getElementById("left").innerHTML = leftBuffer;
		}
