function leibielist()
{
	this.length=9;
	this[0] = new Option("餐厅","0");
	this[1] = new Option("酒吧","1");
	this[2] = new Option("咖啡店","2");
	this[3] = new Option("冷饮店","3");
	this[4] = new Option("茶馆","4");
	this[5] = new Option("宾馆","5");
	this[6] = new Option("火锅","6");
	this[7] = new Option("烧烤/自助餐","7");
	this[8] = new Option("快餐","8");
	return this;
}
function teshelist()
{
	this.length=9;
	this[0] = new Array(39);
		this[0][0] = new Option("特色","0");
		this[0][1] = new Option("海鲜","1");
		this[0][2] = new Option("粤菜","2");
		this[0][3] = new Option("野味","3");
		this[0][4] = new Option("傣味","4");
		this[0][5] = new Option("客家菜","5");
		this[0][6] = new Option("孔府菜","6");
		this[0][7] = new Option("满汉全席","7");
		this[0][8] = new Option("湘菜","8");
		this[0][9] = new Option("清真","9");
		this[0][10] = new Option("川菜","10");
		this[0][11] = new Option("粤菜","11");
		this[0][12] = new Option("鲁菜","12");
		this[0][13] = new Option("苏菜","13");
		this[0][14] = new Option("浙菜","14");		
		this[0][15] = new Option("闽菜","15");
		this[0][16] = new Option("徽菜","16");
		this[0][17] = new Option("赣菜","17");
		this[0][18] = new Option("京菜","18");
		this[0][19] = new Option("沪菜","19");
		this[0][20] = new Option("天津菜","20");
		this[0][21] = new Option("重庆菜","21");
		this[0][22] = new Option("东北菜","22");
		this[0][23] = new Option("台湾菜","23");
		this[0][24] = new Option("香港菜","24");
		this[0][25] = new Option("云南菜","25");
		this[0][26] = new Option("贵州菜","26");
		this[0][27] = new Option("山西菜","27");
		this[0][28] = new Option("蒙古菜","28");
		this[0][29] = new Option("陕西菜","29");
		this[0][30] = new Option("朝鲜菜","30");
		this[0][31] = new Option("法国菜","31");
		this[0][32] = new Option("俄国菜","32");
		this[0][33] = new Option("意大利菜","33");
		this[0][34] = new Option("墨西哥菜","34");
		this[0][35] = new Option("日本菜","35");
		this[0][36] = new Option("泰国菜","36");
		this[0][37] = new Option("越南菜","37");
		this[0][38] = new Option("非洲菜","38");
	this[1] = new Array(4);
		this[1][0] = new Option("自酿酒","100");
		this[1][1] = new Option("异国风情","101");
		this[1][2] = new Option("现场演出","102");
		this[1][3] = new Option("其它酒吧","103");
	this[2] = new Array(3);
		this[2][0] = new Option("客人自磨咖啡","200");
		this[2][1] = new Option("怀旧咖啡馆","201");
		this[2][2] = new Option("其它咖啡馆","202");
	this[3] = new Array(3);
		this[3][0] = new Option("冰激凌店","300");
		this[3][1] = new Option("果汁店","301");
		this[3][2] = new Option("其它冷饮店","302");		
	this[4] = new Array(4);
		this[4][0] = new Option("台湾茶馆","400");
		this[4][1] = new Option("茶艺馆","401");
		this[4][2] = new Option("老茶馆","402");
		this[4][3] = new Option("其它茶馆","403");		
	this[5] = new Array(6);
		this[5][0] = new Option("一星级","500");
		this[5][1] = new Option("二星级","501");
		this[5][2] = new Option("三星级","502");
		this[5][3] = new Option("四星级","503");
		this[5][4] = new Option("五星级","504");
		this[5][5] = new Option("其他","505");		
	this[6] = new Array(5);
		this[6][0] = new Option("药膳火锅","600");
		this[6][1] = new Option("四川火锅","601");
		this[6][2] = new Option("海鲜火锅","602");
		this[6][3] = new Option("自助火锅","603");
		this[6][4] = new Option("其它火锅","604");		
	this[7] = new Array(1);
		this[7][0] = new Option("烧烤/自助餐","700");		
	this[8] = new Array(3);
		this[8][0] = new Option("中式快餐","800");
		this[8][1] = new Option("西式快餐","801");
		this[8][2] = new Option("其它快餐","802");
		return this;
}
leibieOp = new leibielist();
tesheOp = new teshelist();
function initialize(leibie,teshe,leibieID,tesheID)
{
 for(i=0;i<leibieOp.length;i++)
	{
	leibie.add(leibieOp[i]);
	}
	leibie.options[leibieID].selected = true;
	addteshe(leibie,teshe);
	teshe.options[tesheID].selected = true;
}
function addteshe(leibie,teshe)
{
	var i = leibie.selectedIndex;
	for(j=0;j<tesheOp[i].length;j++)
	{
    teshe.add(tesheOp[i][j]);
	}
}
function delteshe(teshe)
{
	var len = teshe.length;
	for(i=0;i<len;i++)
	{
		teshe.remove(0);
	}
}
function leibie_onchange(leibie,teshe)
{
	delteshe(teshe);
	addteshe(leibie,teshe);
}

