var xmlHttp
var xmlHttp1
//***************************************************************
function showCustomer(str)
{ 
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	  {
		  alert ("Your browser does not support AJAX!");
		  return;
	 } 
	var url="includes/showcustomer.asp";
	url=url+"?merchID="+str;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=stateChangedinfomerch;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
//********************************************************************
function stateChangedinfomerch() 
{ 
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById("infomerch").innerHTML=xmlHttp.responseText;
	}
}

function showCustomer1(str)
{ 
	xmlHttp1=GetXmlHttpObject();
	if (xmlHttp1==null)
	  {
		  alert ("Your browser does not support AJAX!");
		  return;
	 } 
	var url="includes/checkamt.asp";
	url=url+"?merchID="+str;
	url=url+"&sid="+Math.random();
	xmlHttp1.onreadystatechange=stateChangedprodmerch;
	xmlHttp1.open("GET",url,true);
	xmlHttp1.send(null);
}
function stateChangedprodmerch() 
{ 
	if (xmlHttp1.readyState==4)
	{ 
		document.getElementById("prodmerch").innerHTML=xmlHttp1.responseText;
	}
}

//**********************************************************************
function showForm(str)
{ 
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	 {
		  alert ("Your browser does not support AJAX!");
		  return;
	 } 
	var url="includes/informtrans.asp";
	url=url+"?merchID="+str;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=stateChanged;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function showsubcate(str)
{
	id = str.options[str.selectedIndex].value;
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	  {
		  alert ("Your browser does not support AJAX!");
		  return;
	 } 
	var url="includes/showsubcate.asp";
	url=url+"?subcate="+id;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=stateChangesubcate;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}


function stateChangesubcate() 
{ 
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById("showsubcate").innerHTML=xmlHttp.responseText;
	}
}


//********************************************************************
function stateChanged() 
{ 
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById("txtHint").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;
}