// JavaScript Document
var xmlHttp
function bindaltech_showUser(str1, str2)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="http://www.reosys.com/bindaltech/getuser.php"
url=url+"?user="+str1 + "&pass=" + str2
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
//function for entering the record in Registration form
function bindaltech_InputRegistration()
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
 //cano, trans_date, name, occupation, ocuupation_other, address, phoneo, 
 //phoner, phonem, fax, email, tank_capacity, price, advance, balance

var url="http://www.reosys.com/bindaltech/inputregistration.php"
url=url+"?name=" + document.getElementById("txtname").value 
url=url+ "&cano=" + document.getElementById("txtcano").value
url=url+ "&dd1=" + document.getElementById("txtdd1").value
url=url+ "&mm1=" + document.getElementById("txtmm1").value
url=url+ "&yy1=" + document.getElementById("txtyy1").value
url=url+ "&occupation=" + document.getElementById("txtoccupation").value
url=url+ "&occupation_other=" + document.getElementById("txtoccupation_other").value
url=url+ "&address=" + document.getElementById("txtaddress").value
url=url+ "&phoner=" + document.getElementById("txtphoner").value
url=url+ "&phonem=" + document.getElementById("txtphonem").value
url=url+ "&fax=" + document.getElementById("txtfax").value
url=url+ "&email=" + document.getElementById("txtemail").value
url=url+ "&tank_type=" + document.getElementById("txttank_type").value
url=url+ "&tank_capacity=" + document.getElementById("txttank_capacity").value
url=url+ "&price=" + document.getElementById("txtprice").value
url=url+ "&advance=" + document.getElementById("txtadvance").value
url=url+ "&balance=" + document.getElementById("txtbalance").value
url=url+ "&paymentmode=" + document.getElementById("sel_payment_mode").value
url=url+ "&chequeno=" + document.getElementById("txtchequeno").value
url=url+ "&chequedate=" + document.getElementById("txtchequedate").value
url=url+ "&chequebank=" + document.getElementById("txtchequebank").value
url=url+ "&dd4=" + document.getElementById("txtdd4").value
url=url+ "&mm4=" + document.getElementById("txtmm4").value
url=url+ "&yy4=" + document.getElementById("txtyy4").value
url=url+"&id="+Math.random()
xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)

}

//function for showing order form
function bindaltech_ShowOrders(str1)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="http://www.reosys.com/bindaltech/show_orders.php"
url=url+"?orderno=" + str1
url=url+"&id="+Math.random()
xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)

}

function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("div_show_result").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;
}