var car_type_list = ["轿车","跑车","SUV越野车","MPV","货车","客车","面包车","其它"];
function create_car_type(formitem,temp_value)
	{
    	var e = document.getElementById(formitem);
		e.options.add(new Option("选择车类型", ""));
		for (var i=0; i<car_type_list.length; i++)
				{	
					e.options.add(new Option(car_type_list[i], car_type_list[i]));
					if (temp_value==car_type_list[i-1])
						{e.options[i].selected=true;}
				}
	}

var car_color_list = ["银色","银灰色","银白色","香槟色","深蓝色","沙黄色","青色","浅绿色","浅蓝色","墨绿色","米色","绿色","蓝色","咖啡色","金色","金黄色","灰色","灰白色","黄色","红色","黑色","褐色","橙色","白色","紫色","棕色"];
function create_car_color(formitem,temp_value)
	{
    	var e = document.getElementById(formitem);
		e.options.add(new Option("选择颜色", ""));
		for (var i=0; i<car_color_list.length; i++)
				{	
					e.options.add(new Option(car_color_list[i], car_color_list[i]));
					if (temp_value==car_color_list[i-1])
						{e.options[i].selected=true;}
				}
	}

function create_year(formitem,temp_value)
	{
    	var e = document.getElementById(formitem);
		int_Year=2010;
		if (temp_value=="")
		{
			temp_value=0
		}
		e.options.add(new Option("选择年", ""));
		el=1
		for (var i=int_Year; i>int_Year-20; i--)
			{			
				e.options.add(new Option(i, i));
				if (temp_value == i)
					{			
						el=e.options.length;
					}
			}
		e.options[el-1].selected=true;
	}
function create_year1(formitem,temp_value)
	{
    	var e = document.getElementById(formitem);
		int_Year=2013;
		if (temp_value=="")
		{
			temp_value=0
		}
		e.options.add(new Option("选择年", ""));
		el=1
		for (var i=int_Year; i>int_Year-20; i--)
			{			
				e.options.add(new Option(i, i));
				if (temp_value == i)
					{			
						el=e.options.length;
					}
			}
		e.options[el-1].selected=true;
	}
function create_month(formitem,temp_value)
	{
		var e = document.getElementById(formitem);
		if (temp_value=="")
		{
			temp_value=0
		}
		e.options.add(new Option("选择月", ""));
		el=1
		for (var i=1; i<13; i++)
			{			
				e.options.add(new Option(i, i));
				if (temp_value == i)
					{			
						el=e.options.length;
					}
			}
		e.options[el-1].selected=true;
	}

//鼠标移动变色 2008-7-3
function toggleBG(){
		var a = document.getElementById('carList');
		var b= a.getElementsByClassName('listMain')
		for(i=0;i<b.length;i++){
			b[i].onmouseover=function(){
				this.style.backgroundColor = '#FFFBF0';
			}
			b[i].onmouseout=function(){
				this.style.backgroundColor = '#ffffff';
			}
		}
}
//鼠标移动变色 主要是针对table 2008-7-10
function toggle(id,tag){
	var a = document.getElementById(id);
	var b= a.getElementsByTagName(tag);
	for(i=0;i<b.length;i++){
		b[i].onmouseover=function(){
			this.style.backgroundColor = '#FFF6D4';
		}
		b[i].onmouseout=function(){
			this.style.backgroundColor = '#ffffff';
		}
	}
}