//出发地
var hotCityStart =
[
    {CityName:"北京",Id:"13"},
    {CityName:"三亚",Id:"240"},
    {CityName:"丽江",Id:"1037"},
    {CityName:"上海",Id:"101"},
    {CityName:"青岛",Id:"67"},
    {CityName:"深圳",Id:"195"},
    {CityName:"东莞",Id:"201"},
    {CityName:"惠州",Id:"192"},
    {CityName:"桂林",Id:"210"}
];
	 
//美食
var Options_Cate =
{
"cx"://菜系
[
{oText:"北京（京）菜",oValue:""},
{oText:"四川（川）菜",oValue:""},
{oText:"山东（鲁）菜",oValue:""},
{oText:"江苏（淮）菜",oValue:""},
{oText:"广东（粤）菜",oValue:""},
{oText:"湖南（湘）菜",oValue:""},
{oText:"浙江（浙）菜",oValue:""},
{oText:"安徽（徽）菜",oValue:""},
{oText:"福建（闽）菜",oValue:""},
{oText:"东北菜",oValue:""},
{oText:"西北菜",oValue:""},
{oText:"新疆清真",oValue:""},
{oText:"东南亚菜",oValue:""},
{oText:"日韩料理",oValue:""},
{oText:"西餐",oValue:""},
{oText:"家常菜",oValue:""},
{oText:"其它",oValue:""},
{oText:"不限",oValue:"0"}
],
"hjqf"://环境气氛
[
{oText:"商务宴请",oValue:""},
{oText:"情侣约会",oValue:""},
{oText:"家庭聚会",oValue:""},
{oText:"大型宴会",oValue:""},
{oText:"宵夜场所",oValue:""},
{oText:"不限",oValue:"0"}
],
"rjxf"://人均消费
[
{oText:"20元以下",oValue:"20"},
{oText:"21-50元",oValue:"21"},
{oText:"50-80元",oValue:"50"},
{oText:"80-120元",oValue:"80"},
{oText:"121-200元",oValue:"121"},
{oText:"200元以上",oValue:"200"},
{oText:"不限",oValue:"0"}
],
"jcfs"://就餐方式
[
{oText:"点菜",oValue:""},
{oText:"火锅",oValue:""},
{oText:"烧烤",oValue:""},
{oText:"自助",oValue:""},
{oText:"快餐",oValue:""},
{oText:"小吃",oValue:""},
{oText:"不限",oValue:"0"}
]
};
 document.write('<iframe name=hotFoodIframe id=hotFoodIframe frameborder=0 src=/share/html/hotfood.html style=display:none;position:absolute;z-index:110;></iframe>');

var ZhaoPaiCaiObj;
 function showZhaoPaiCai(objId)
 { 
    ZhaoPaiCaiObj=document.getElementById(objId);
    if(!ZhaoPaiCaiObj){alert("输入控件不存在 ！");return;}
    hideOptions();
    displayObjOpsition(objId,"hotFoodIframe");
//    xmlHttp.open("GET","../../html/hotfood.html",true);
//    xmlHttp.onreadystatechange=initBottom;
//    xmlHttp.setRequestHeader("Content-Type", "text/xml");
//    xmlHttp.setRequestHeader("charset", "gb2312");	
//    xmlHttp.send(null); 
 }

function fillHotfood(text)
{
	ZhaoPaiCaiObj.value=text;
    $HotFood = document.getElementById("hotFoodIframe");
	if($HotFood) $HotFood.style.display="none";    
}
function showCate_jcfs(objId)
{   
    showCate(objId,Options_Cate.jcfs);
}
function showCate_rjxf(objId)
{   
    showCate(objId,Options_Cate.rjxf);
}
function showCate_hjqf(objId)
{   
    showCate(objId,Options_Cate.hjqf);
}
function showCate_cx(objId)
{   
    showCate(objId,Options_Cate.cx);
}
function showCate(objId,arr)
{
    hideOptions();    
	iniOptionsObj(objId,"h_"+objId);
	iniOptionsContainer(arr);
	displayObjOpsition(objId);
}

function show(){
	document.getElementById("bigbk").className="part2";
	document.getElementById("ssk1").style.display="block";
	document.getElementById("ssk2").style.display="block";
	document.getElementById("gd").style.display="none";
	document.getElementById("jy").style.display="block";
}
function hid(num){
	document.getElementById("bigbk").className="part1";
	document.getElementById("ssk1").style.display="none";
	document.getElementById("ssk2").style.display="none";
	document.getElementById("jy").style.display="none";
	document.getElementById("gd").style.display="block";
}
//出发地
function show_HotCityStart(obj)
{   
    var objId = typeof obj == "string" ? obj : obj.id;
    var hotcitydiv = $("show_hotcityDiv");
    hideOptions();iniOptionsObj(objId,"h_"+objId);
	hotcitydiv.className="xlsskbk1 xlsskwzms";	
	var str='<div class="xlsskt"><a href="javascript:void(null)" onclick="hideOptions();">X</a>可输入中文/拼音</div><div class="xlsskwz">';
        for(var i=0;i<hotCityStart.length;i++)
        {
            str+='<a href="javascript:void(null);" onclick="filloption(\''+ hotCityStart[i].CityName +'\',\''+ hotCityStart[i].Id +'\');">'+ hotCityStart[i].CityName +'</a>';
        }
	hotcitydiv.innerHTML=str+'</div>';
	displayObjOpsition(objId,"show_hotcityDiv");$(objId).select();
}

function show_HotCityHint(obj,event_)
{
   var key = window.event ? event_.keyCode : event_.which;
   if((key==8 || key==32 || key==46) || (key>=65 && key<=90) || (key>=97 && key<=122)) 
   {
    if(!obj.value){ show_HotCityStart(obj);return;}
    
    var objId = obj.id,arr=internalCityJson;
    var keyCode = obj.value.toString().replace(" ","");obj.value=keyCode;keyCode=keyCode.toUpperCase();        
    hideOptions();	iniOptionsObj(objId,"h_"+objId);
    var ohtmlcode='<div class="xlxlkt">'+obj.value+',按拼音排序</div><div class="xlxlkc xlxlkcms">';

    if(arr.length<=0 ) return;    
    var filterCount =0,len = arr.length;
    for (var i=0; i<len;i++)
    {
        if (arr[i].Py.toUpperCase().indexOf(keyCode) ==0 || arr[i].Jp.toUpperCase().indexOf(keyCode) ==0 || arr[i].Name.indexOf(keyCode) ==0)
        {        
           if(filterCount==0){ ohtmlcode+='<a href="javascript:void(null);" value="'+arr[i].Name+'~'+arr[i].Id+'" onclick="filloption(\''+arr[i].Name+'\',\''+arr[i].Id+'\')" class="first"><span>' + arr[i].Name +'</span>' + arr[i].Py +'</a>';}
           else{
                ohtmlcode+='<a href="javascript:void(null);" value="'+arr[i].Name+'~'+arr[i].Id+'" onclick="filloption(\''+arr[i].Name+'\',\''+arr[i].Id+'\')"><span>' + arr[i].Name +'</span>' + arr[i].Py +'</a>';
           }
           filterCount++;
        }
    }
    if (filterCount ==0) ohtmlcode += errorHint;
    ohtmlcode+='</div>';    
    containerObj = document.getElementById("hotcityhintDiv");
    containerObj.innerHTML=ohtmlcode + zhedangselectcode;
    displayObjOpsition($oTextObjId,"hotcityhintDiv");
}

}

function check_cate()
{
    if(document.cate.dibiao_cate.value=="不限") document.cate.dibiao_cate.value="";
    if(document.cate.h_cityname_cate.value == '' || document.cate.cityname_cate.value=='')  
    {	    alert('目的地没有选择！');	    return false;}
	else{ if(!verifyCityName('cityname_cate','h_cityname_cate')){alert('目的地有误！');return false;}}

}
