function commonsave(){
	var location = document.getElementById("cLocation").value;
	//var hotelName = document.getElementById("hotelName").value;
	
	$.ajax({
    	url: encodeURI(CONTEXT_PATH + "/tourist/hotel/hotel-query!ajaxActionSave.action?location="+location),
    	async : false 
 	});
}


function prosave(){
	var hlocation = document.getElementById("hLocation").value;
	var hhotelName = document.getElementById("hHotelName").value;
	var hotelType = window.document.getElementById("hotelType").value;
	
	var preference = document.getElementsByName("queryVO.preference");
	var preferen = "";
	for(var i=0; i<preference.length; i++){
		if(preference[i].checked){
			preferen += preference[i].value + "@";
			//alert(preference[i].value);
		}
	}
	
	$.ajax({
    	url: encodeURI(CONTEXT_PATH + "/tourist/hotel/hotel-query!ajaxActionSave.action?location="+hlocation+"&hotelName="+hhotelName+"&hotelType="+hotelType+"&preference="+preferen),
    	async : false    
 	});
}


function sortsave(str){
	var pref = "";
	if(str == "traffic"){
		pref = "交通";
	}else if(str == "facility"){
		pref = "设施";
	}else if(str == "service"){
		pref = "服务";
	}else if(str == "sanitation"){
		pref = "卫生";
	}
	//alert(pref);
	
	$.ajax({
    	url: encodeURI(CONTEXT_PATH + "/tourist/hotel/hotel-query!ajaxActionSaveSort.action?preference="+pref),
    	async : false     
 	});
}

function ordersave(){
	var hotelname = document.getElementById("hotelname").value;
	
	if(hotelname == ""){
		return;
	}
	$.ajax({
    	url: encodeURI(CONTEXT_PATH + "/tourist/hotel/hotel-query!ajaxAcStringSaveOrder.action?hotelName="+hotelname),
    	async : false     
 	});
}

