		var xmlHttp
		var destination_id;

		/***********************************************
		*		FUNCTION TO SHOW SELECTED RESTAURANT
		***********************************************/
				
		function ajax_function(val,url_name,arg_name,source_id,response_id){

			destination_id = response_id;
		if(document.getElementById(source_id).value==""){
			return;
		}


	    document.getElementById(destination_id).innerHTML = "<img src='http://khaaopiyo.com/template/images/loding.gif' border='0' style='text-indent:inherit;margin:2px;'/>";
					


	 					
		xmlHttp = GetXmlHttpObject();
		
		if (xmlHttp==null){
		  alert ("Browser does not support HTTP Request")
		  return;
		 } 

			
			var url = url_name;
			var argument = arg_name + "=" + val;
			//url = url+"?" + arg_name + "=" + val;
			xmlHttp.onreadystatechange=stateChanged2; 
			xmlHttp.open("POST",url,true);
			xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded")
			xmlHttp.send(argument);
			

		} 

		function stateChanged2(){ 

		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 
			 document.getElementById(destination_id).innerHTML = xmlHttp.responseText; 
		 } 

		}
			


		function GetXmlHttpObject(){
		var xmlHttp=null;
		try{
		 // Firefox, Opera 8.0+, Safari
		 xmlHttp=new XMLHttpRequest();
		 }catch (e){
		 // Internet Explorer
		 try{
		  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		  }catch (e){
		  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		  }
		 }
		return xmlHttp;
		}