// JavaScript Document
	var xmlHttp;
	
	function createXMLHttpRequest()
	{
		if(window.ActiveXObject)
		{
			xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
		}
		else if(window.XMLHttpRequest)
		{
			xmlHttp = new XMLHttpRequest();
		}
		else
		{
			alert("Browser error");
			return false;
		}
	}
function select_value1(page,show,input,input2,txt)
	{
		
		createXMLHttpRequest();
		var sText=document.getElementById(input).value;
		var sText1=document.getElementById(input2).value;
		//alert(sText1);
		xmlHttp.open("get",page+"?id="+sText+"&id2="+sText1+"&txt="+txt,true);
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4)
			{
				if(xmlHttp.status==200)
				{
					displayInfo(xmlHttp.responseText,show);
				}
				else
				{
					displayInfo("เกิดข้อผิดพลาดในการเรียก : "+xmlHttp.statusText,show);
				}
			}
		};
		xmlHttp.send(null);
	}
	function select_value(page,show,input)
	{
		createXMLHttpRequest();
		var sText=document.getElementById(input).value;
		xmlHttp.open("get",page+sText,true);
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4)
			{
				if(xmlHttp.status==200)
				{
					displayInfo(xmlHttp.responseText,show);
				}
				else
				{
					displayInfo("เกิดข้อผิดพลาดในการเรียก : "+xmlHttp.statusText,show);
				}
			}
		};
		xmlHttp.send(null);
	}
	function select_valuem(page,show,input1,input2)
	{
		createXMLHttpRequest();
		var id1=document.getElementById(input1).value;
		var id2=document.getElementById(input2).value;
		//alert(id1);
		var query;
		query="?";
		query+="id1="+id1;
		query+="&id2="+id2;
		xmlHttp.open("get",page+query,true);
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4)
			{
				if(xmlHttp.status==200)
				{
					displayInfo(xmlHttp.responseText,show);
				}
				else
				{
					displayInfo("เกิดข้อผิดพลาดในการเรียก : "+xmlHttp.statusText,show);
				}
			}
		};
		xmlHttp.send(null);
	}
function select_data(page,show,id,act,txt)
	{
		//alert("Browser error");
		createXMLHttpRequest();
		var query;
		query="?";
		query+="id="+id;
		query+="&act="+act;
		query+="&txt="+txt;
		xmlHttp.open("get",page+query,true);
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4)
			{
				if(xmlHttp.status==200)
				{
					displayInfo(xmlHttp.responseText,show);
				}
				else
				{
					displayInfo("เกิดข้อผิดพลาดในการเรียก : "+xmlHttp.statusText,show);
				}
			}
		};
		xmlHttp.send(null);
	}
	function displayInfo(text,show)
	{
		document.getElementById(""+show+"").innerHTML=xmlHttp.responseText;
	}
