// JavaScript Document
function kickoff_info(id,txt)
{   
     if(txt == "a") var p=confirm("Are You Sure to Publish this hotel infomation ??");
	 if(txt == "b") var p=confirm("Are You Sure to set this hotel infomation for draft status ??");
	 
	if (p == true)
	{   
	    if(txt == "a")  document.frm_kickoff.txt_kick_off.value = "yes";
		if(txt == "b")  document.frm_kickoff.txt_kick_off.value = "no";
		document.frm_kickoff.submit();
		
	}
}

function inquriy(hotelCode,proCode,descCode){
	document.frminquiry.txt_hotel_code.value  = hotelCode;
	document.frminquiry.txt_promotionCode.value = proCode;
	document.frminquiry.txt_descProCode.value   = descCode;
	document.frminquiry.submit();
	
}

function service_apartment(area, zone)
	{  // Exp. service_apartment(area = '', zone ='') <-- No need mension area or zone 
	   document.getElementById('search_area').value = area;
	   document.getElementById('search_zone').value = zone;
	   document.getElementById('category').value    = 1;
	   
	   document.getElementById('rank').value        = "any";
	   document.getElementById('low_price').value   = "any";
	   document.getElementById('top_price').value   = "any";
	   document.getElementById('promotionHid').value  = "";
	   document.getElementById('thairesidenceStatus').value ="";
	   document.frm_search.submit();
	}
	
	function promotion(area, thairesidence_std)
	{  // Exp. promotion(area = '1', thairesidence_std = 'yes')
	   // area = '' <-- No need mension area 
	   // thairesidence_std values should be 'yes' or 'no'
	   document.getElementById('search_area').value         = area;
	   document.getElementById('thairesidenceStatus').value = thairesidence_std;
	   document.getElementById('promotionHid').value        = "yes";
	   
	   document.getElementById('search_zone').value = "";
	   document.getElementById('rank').value        = "any";
	   document.getElementById('low_price').value   = "any";
	   document.getElementById('top_price').value   = "any";
	   document.getElementById('category').value    = "any";
	   
	   document.frm_search.submit();
	}
	
	function cheapest_price(area, zone)
	{  
	   // Exp. cheapest_price(area = '1', zone = '1')
	   // Not mension plese write  = ''
	   document.getElementById('search_area').value = area;
	   document.getElementById('search_zone').value = zone;
	   document.getElementById('category').value    = 2;
	   
	   document.getElementById('thairesidenceStatus').value = "";
	   document.getElementById('promotionHid').value        = "";
	   document.getElementById('rank').value        = "any";
	   document.getElementById('low_price').value   = "any";
	   document.getElementById('top_price').value   = "any";
	   
	   document.frm_search.submit();
	}
	
	function star_ranking(area, zone, rank)
	{  
	   // The values of Rank can be 2 - 5 
	   document.getElementById('search_area').value = area;
	   document.getElementById('search_zone').value = zone;
	   document.getElementById('rank').value        = rank;
	   
	   document.getElementById('category').value    = "any";
       document.getElementById('low_price').value   = "any";
	   document.getElementById('top_price').value   = "any";
	   document.getElementById('thairesidenceStatus').value = "";
	   document.getElementById('promotionHid').value        = "";

	   document.frm_search.submit();
	}
	
	function hotel_searh(area, zone, category)
	{  
	   document.getElementById('search_area').value = area;
	   document.getElementById('search_zone').value = zone;
	   document.getElementById('category').value    = category;
	   
	   document.getElementById('rank').value        = "any";
       document.getElementById('low_price').value   = "any";
	   document.getElementById('top_price').value   = "any";
	   document.getElementById('thairesidenceStatus').value = "";
	   document.getElementById('promotionHid').value        = "";

	   document.frm_search.submit();
	}
	
	function hotel_searh_promo(area, zone, category)
	{  
	   document.getElementById('search_area').value = area;
	   document.getElementById('search_zone').value = zone;
	   document.getElementById('category').value    = category;
	   
	   document.getElementById('rank').value        = "any";
       document.getElementById('low_price').value   = "any";
	   document.getElementById('top_price').value   = "any";
	   document.getElementById('thairesidenceStatus').value = "";
	   document.getElementById('promotionHid').value        = "yes";

	   document.frm_search.submit();
	}
