var xmlhttp;
 function get_vote_hot(str)
	{
		alert("Thanks For Hot Vote");
	xmlhttp=getObject();
	if(xmlhttp==null)
	{														    //	
	alert('object not created')
	}

 	var url="ajax/vote-hot.php?str="+str
	
  xmlhttp.onreadystatechange=stateChanged_vote_hot;
  xmlhttp.open('get',url,true)
  xmlhttp.send(null)
 }


function stateChanged_vote_hot() 
{ 
if (xmlhttp.readyState==4 || xmlhttp.readyState=="complete")
 { 
 document.getElementById("votid").innerHTML = xmlhttp.responseText
 } 
}

function get_vote_cold(str)
	{
		alert("Thanks For Cold Vote");
	xmlhttp=getObject();
	if(xmlhttp==null)										    //
	{														    //	
	alert('object not created')
	}

 	var url="ajax/vote-cold.php?str="+str
	
  xmlhttp.onreadystatechange=stateChanged_vote_cold;
  xmlhttp.open('get',url,true)
  xmlhttp.send(null)
 }


function stateChanged_vote_cold() 
{ 
if (xmlhttp.readyState==4 || xmlhttp.readyState=="complete")
 { 
 document.getElementById("votid").innerHTML = xmlhttp.responseText
 } 
}

////////////////////////////////////////////////////////////////////

function add_merch(str)                                  //
	{															    //	
	xmlhttp=getObject();								        //		
	if(xmlhttp==null)										    //
	{														    //	
	alert('object not created')
	}

 	var url="ajax/add_merchent.php?str="+str
	
  xmlhttp.onreadystatechange=stateChanged_add_merch;
  xmlhttp.open('get',url,true)
  xmlhttp.send(null)
 }


function stateChanged_add_merch() 
{ 
if (xmlhttp.readyState==4 || xmlhttp.readyState=="complete")
 { 
 document.getElementById("merchant").innerHTML = xmlhttp.responseText
 } 
}

/////////////////////////////////////////////////////////////////////
function get_cat(str)
	{
	xmlhttp=getObject();
	if(xmlhttp==null)
	{														    //	
	alert('object not created')
	}

 	var url="ajax/discount_category.php?str="+str
	
  xmlhttp.onreadystatechange=stateChanged_get_cat;
  xmlhttp.open('get',url,true)
  xmlhttp.send(null)
 }


function stateChanged_get_cat() 
{ 
if (xmlhttp.readyState==4 || xmlhttp.readyState=="complete")
 { 
 document.getElementById("dcid").innerHTML = xmlhttp.responseText
 } 
}
///////////////////////////////////////////////////////////////////////////
function get_town(str)
	{
	xmlhttp=getObject();
	if(xmlhttp==null)
	{														    //	
	alert('object not created')
	}

 	var url="ajax/discount_town.php?str="+str
	
  xmlhttp.onreadystatechange=stateChanged_get_town;
  xmlhttp.open('get',url,true)
  xmlhttp.send(null)
 }


function stateChanged_get_town() 
{ 
if (xmlhttp.readyState==4 || xmlhttp.readyState=="complete")
 { 
 document.getElementById("dcid1").innerHTML = xmlhttp.responseText
 } 
}

function getObject(handler)
{
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;
}
