var xmlHttp2
function getcoupon(str1)
{ 
xmlHttp2=GetXmlHttpObject2()
if (xmlHttp2==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }

var url="getcouponmember.php"
var mon=document.getElementById("noofmonths").value;
var ema=document.getElementById("email").value;

url=url+"?q="+str1+"&mon="+mon+"&ema="+ema;
url=url+"&sid="+Math.random()
xmlHttp2.onreadystatechange=stateChanged2 
xmlHttp2.open("get",url,true)
xmlHttp2.send(null);
document.getElementById("txtCoupon").innerHTML="<img src='images/loader.gif' border=0>";
}
function stateChanged2() 
{ 
if (xmlHttp2.readyState==4 || xmlHttp2.readyState=="complete")
 { 
document.getElementById("txtCoupon").innerHTML="";
 document.getElementById("txtCoupon").innerHTML=xmlHttp2.responseText 
 } 
}
function GetXmlHttpObject2()
{
var xmlHttp2=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp2=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
try
  {
  xmlHttp2=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp2=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp2;
}