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;
}
/*******************************Change Category status**********************************/
function change_cat_status(id)
{
	//alert(id);
	
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
  	}
	img="cat_"+id;
	var url="cat_status_change.php";
	url=url+"?sid="+Math.random();
	url=url+"&str="+id;
	xmlHttp.onreadystatechange=cat_status;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function cat_status()
{
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById(img).innerHTML=xmlHttp.responseText;
	}
	else
	{ 
	document.getElementById(img).innerHTML="<img src=\"../images/progress.gif\" width=\"30\" hight=\"30\">";
	}
}
/*******************************Check Category Name**********************************/
function check_cat_name()
{
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
  	}
	
	var str=document.getElementById('new_cat').value;
	var url="cat_check_name.php";
	url=url+"?sid="+Math.random();
	url=url+"&name="+str;
	xmlHttp.onreadystatechange=cat_name;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
	
}
function cat_name()
{
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById("msg").innerHTML=xmlHttp.responseText;
	}
	else
	{ 
	document.getElementById("msg").innerHTML="<img src=\"../images/progress.gif\" width=\"30\" hight=\"30\">";
	}
}
/*******************************Change Product status**********************************/
function change_prdct_status(id)
{
	//alert(id);
	
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
  	}
	img="prdct_"+id;
	var url="prdct_status_change.php";
	url=url+"?sid="+Math.random();
	url=url+"&str="+id;
	xmlHttp.onreadystatechange=prdct_status;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function prdct_status()
{
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById(img).innerHTML=xmlHttp.responseText;
	}
	else
	{ 
	document.getElementById(img).innerHTML="<img src=\"../images/progress.gif\" width=\"30\" hight=\"30\">";
	}
}


/*******************************Edit Offer HeadLine**********************************/
function edit_offer_head()
{
 xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
  	}
	img="offr";
	var url="offer_head.php";
	url=url+"?sid="+Math.random();
	xmlHttp.onreadystatechange=offr_head;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);	
}
function offr_head()
{
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById(img).innerHTML=xmlHttp.responseText;
	}
	else
	{ 
	document.getElementById(img).innerHTML="<img src=\"../images/progress.gif\" width=\"30\" hight=\"30\">";
	}
}

/*******************************Change Offer status**********************************/
function change_offer_status(id)
{
	//alert(id);
	
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
  	}
	img="offr_"+id;
	var url="offr_status_change.php";
	url=url+"?sid="+Math.random();
	url=url+"&str="+id;
	xmlHttp.onreadystatechange=offr_status;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function offr_status()
{
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById(img).innerHTML=xmlHttp.responseText;
	}
	else
	{ 
	document.getElementById(img).innerHTML="<img src=\"../images/progress.gif\" width=\"30\" hight=\"30\">";
	}
}

/*******************************Add Banner**********************************/
function add_ad()
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
  	}
	var pos=document.getElementById("ad_pos").value;
	//alert("dfggfh");
	var url="add_banner.php";
	url=url+"?pos="+pos;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=test;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function test()
{//alert("test");
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById("ban_pos").innerHTML=xmlHttp.responseText;
	}
	else
	{ 
	document.getElementById("ban_pos").innerHTML="<img src=\"../images/progress.gif\" width=\"30\" hight=\"30\" >";
	}
}
/*******************************Change ad status**********************************/
function change_ad_status(id)
{
	xmlHttp=GetXmlHttpObject()
	if(xmlHttp==null)
	{
	 alert ("Your browser does not support AJAX!");
	  return;	
	}
	img="ad_"+id;
	var url="ad_status_change.php";
	url=url+"?sid="+Math.random();
	url=url+"&aid="+id;
	xmlHttp.onreadystatechange=edit_ad_status;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function edit_ad_status()
{
 if(xmlHttp.readyState==4)	
 {
	document.getElementById(img).innerHTML=xmlHttp.responseText;
 }
 else
	{ 
	document.getElementById(img).innerHTML="<img src=\"../images/progress.gif\" width=\"30\" hight=\"30\">";
	}
}
/*******************************Change ad status**********************************/
function delivery_status(no)
{
	
	xmlHttp=GetXmlHttpObject()
	if(xmlHttp==null)
	{
	 alert ("Your browser does not support AJAX!");
	  return;	
	}
	img="user_"+no;
	var url="usr_status_change.php?id="+no;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=usr_status;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function usr_status()
{
 if(xmlHttp.readyState==4)	
 {
	document.getElementById(img).innerHTML=xmlHttp.responseText;
 }
 else
	{ 
	document.getElementById(img).innerHTML="<img src=\"../images/progress.gif\" width=\"30\" hight=\"30\">";
	}
}


/******************************* Alphebetic listing for product in particular category **********************************/
function list(qrystring,count,page)
{
	
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
  	{
		alert ("Your browser does not support AJAX!");
  		return;
  	} 
	
	var url="listbyalpha.php";
	//url=url+"?p="+count;
	url=url+"?str="+qrystring+"&cat="+count+"&page="+page;
	
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=listed;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);	
}

function listed() 
{ 
	if (xmlHttp.readyState==4)
	{
		document.getElementById("list_by_alpha").innerHTML=xmlHttp.responseText;
	}
	else
	{ 
	document.getElementById("list_by_alpha").innerHTML="<img src=\"../images/progress.gif\" width=\"30\" hight=\"30\">";
	}
}
/******************************* Alphebetic listing for all product    **********************************/
function list_all(qrystring)
{
	/*alert(qrystring);
	alert(count);*/
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
  	{
		alert ("Your browser does not support AJAX!");
  		return;
  	} 
	
	var url="listall_byalpha.php";
	//url=url+"?p="+count;
	url=url+"?str="+qrystring;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=list_all_prdct;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);	
}

function list_all_prdct() 
{ 
	if (xmlHttp.readyState==4)
	{
		
		document.getElementById("list_all_alpha").innerHTML=xmlHttp.responseText;
	}
	else
	{ 
	document.getElementById("list_all_alpha").innerHTML="<img src=\"../images/progress.gif\" width=\"30\" hight=\"30\">";
	}
}
/******************************************** Subtotal ****************************************************/
function subtotal(id)
{
	xmlHttp=GetXmlHttpObject();	
if (xmlHttp==null)
  	{
		alert ("Your browser does not support AJAX!");
  		return;
  	} 
	loc="sub_total"+id;
	var quantity=document.getElementById("quantity"+id).value;
	var url="findsubtotal.php";
	url=url+"?id="+id+"&quantity="+quantity;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=print_subtotal;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);	
}
function print_subtotal()
{
if(xmlHttp.readyState==4)	
 {
	document.getElementById(loc).innerHTML=xmlHttp.responseText;
 }
 else
	{ 
	document.getElementById(loc).innerHTML="<img src=\"images/progress.gif\" width=\"30\" hight=\"30\">";
	}
}
/******************************************** unique login id ****************************************************/
function uniqueloginid()
{
	xmlHttp=GetXmlHttpObject();	
	if(xmlHttp==null)
  	{
		alert ("Your browser does not support AJAX!");
  		return;
  	} 
	
	var logid=document.getElementById("usrid").value;
	var url="check_uniqueid.php?logid="+logid;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=uniqueidmesg;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);	

}
function uniqueidmesg()
{
if(xmlHttp.readyState==4)	
 {
	document.getElementById("loginid").innerHTML=xmlHttp.responseText;
 }
 else
	{ 
	document.getElementById("loginid").innerHTML="<img src=\"../images/progress.gif\" width=\"30\" hight=\"30\">";
	}
}
/******************************************** valid delivery date ****************************************************/
/*function validdate()
{alert("validdate");
	xmlHttp=GetXmlHttpObject();	
	if(xmlHttp==null)
  	{
		alert ("Your browser does not support AJAX!");
  		return;
  	} 
	
	var ddate=document.getElementById("dlivrydate").value;
	var url="check_deliverydate.php?ddate="+ddate;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=check_ddate;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);	

}
function check_ddate()
{
if(xmlHttp.readyState==4)	
 {
	document.getElementById("deliver_date").innerHTML=xmlHttp.responseText;
 }
}*/
/******************************************** offer subtotal ****************************************************/
function offrsubtotal(id) {
	xmlHttp=GetXmlHttpObject();	
if (xmlHttp==null) {
		alert ("Your browser does not support AJAX!");
  		return;
  	} 
	loc="offrsub_total"+id;
	var quantity=document.getElementById("quantity"+id).value;
	var url="add_to_cart.php";
	url=url+"?id="+id+"&quantity="+quantity;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=offr_subtotal;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);	
}

function offr_subtotal() {
	if(xmlHttp.readyState == 4) {
		document.getElementById(loc).innerHTML=xmlHttp.responseText;
	} else { 
		document.getElementById(loc).innerHTML="<img src=\"images/progress.gif\" width=\"30\" hight=\"30\">";
	}
}

/******************************************** new_product() ****************************************************/
function new_product(cid,usertype)
{
	xmlHttp=GetXmlHttpObject();	
if (xmlHttp==null)
  	{
		alert ("Your browser does not support AJAX!");
  		return;
  	} 
	var cid;
	var usertype;
	//alert(cid);
	//alert(usertype);
	var url="product_list.php";
	url=url+"?cid="+cid;
	url=url+"&usertype="+usertype;
	//alert(url);
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=new_product_list;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);	
}
function new_product_list()
{
if(xmlHttp.readyState==4)	
 {
	document.getElementById("prod_name").innerHTML=xmlHttp.responseText;
 }
 else
	{ 
	document.getElementById("prod_name").innerHTML="<img src=\"images/progress.gif\" width=\"30\" hight=\"30\">";
	}
}
/********************************************deliver() ****************************************************/
/*function deliver(ordno)
{
	
	xmlHttp=GetXmlHttpObject();	
if (xmlHttp==null)
  	{
		alert ("Your browser does not support AJAX!");
  		return;
  	} 
	
	var url="product_delivery.php";
	url=url+"?ordno="+ordno;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=deliver_prod;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);	
}
function deliver_prod()
{
if(xmlHttp.readyState==4)	
 {
	document.getElementById("delivery").innerHTML=xmlHttp.responseText;
 }
 else
	{ 
	document.getElementById("delivery").innerHTML="<img src=\"../images/progress.gif\" width=\"30\" hight=\"30\">";
	}
}*/
/*******************************Edit Advertisement HeadLine**********************************/
function edit_ad_head()
{
 xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
  	}
	img="advertisement";
	var url="adv_head.php";
	url=url+"?sid="+Math.random();
	xmlHttp.onreadystatechange=advt_head;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);	
}
function advt_head()
{
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById(img).innerHTML=xmlHttp.responseText;
	}
	else
	{ 
	document.getElementById(img).innerHTML="<img src=\"../images/progress.gif\" width=\"30\" hight=\"30\">";
	}
}
/*******************************validate Credit Card**********************************/
function valid_creditcard()
{
 xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
  	}
	img="crieditcard";
	var ccno=document.getElementById("ccardno").value;
	var ctype=document.getElementById("cctype").value;
	var url="validccard.php?ccno="+ccno+"&ctype="+ctype;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=validcc;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);	
}
function validcc()
{
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById(img).innerHTML=xmlHttp.responseText;
	}
	else
	{ 
	document.getElementById(img).innerHTML="<img src=\"../images/progress.gif\" width=\"30\" hight=\"30\">";
	}
}
/*******************************validate Credit Card**********************************/
function changestate()
{
 xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
  	}
	img="nonusstate";
	var cntry=document.getElementById("country").value;
	var url="fixstate.php?cntry="+cntry;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=change_state;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);	
}
function change_state()
{
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById(img).innerHTML=xmlHttp.responseText;
	}
	else
	{ 
	document.getElementById(img).innerHTML="<img src=\"../images/progress.gif\" width=\"30\" hight=\"30\">";
	}
}
/*******************************validate Credit Card**********************************/
function admnchangestate(custid)
{
 xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
  	}
	img="nonusstate";
	var cntry=document.getElementById("country").value;
	var url="selectstate.php?cntry="+cntry+"&custid="+custid;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=change_state;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);	
}
function change_state()
{
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById(img).innerHTML=xmlHttp.responseText;
	}
	else
	{ 
	document.getElementById(img).innerHTML="<img src=\"images/progress.gif\" width=\"30\" hight=\"30\">";
	}
}

/*******************************validate Credit Card**********************************/
function valid_card()
{
 xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
  	}
	img="criedit";
	var ccno=document.getElementById("ccardno").value;
	var ctype=document.getElementById("cctype").value;
	var url="validcredit.php?ccno="+ccno+"&ctype="+ctype;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=validcc;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);	
}
function validcc()
{
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById(img).innerHTML=xmlHttp.responseText;
	}
	else
	{ 
	document.getElementById(img).innerHTML="<img src=\"images/progress.gif\" width=\"30\" hight=\"30\">";
	}
}

/*******************************Change Category status**********************************/
function change_event_status(id)
{
	//alert(id);
	
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
  	}
	img="event_"+id;
	var url="event_status_change.php";
	url=url+"?sid="+Math.random();
	url=url+"&str="+id;
	xmlHttp.onreadystatechange=eve_status;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function eve_status()
{
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById(img).innerHTML=xmlHttp.responseText;
	}
	else
	{ 
	document.getElementById(img).innerHTML="<img src=\"../images/progress.gif\" width=\"30\" hight=\"30\">";
	}
}
/*******************************Change Category status**********************************/
function change_spcl_status(id)
{
	//alert(id);
	
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
  	}
	img="spcl_"+id;
	var url="spcls_status_change.php";
	url=url+"?sid="+Math.random();
	url=url+"&str="+id;
	xmlHttp.onreadystatechange=sp_status;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function sp_status()
{
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById(img).innerHTML=xmlHttp.responseText;
	}
	else
	{ 
	document.getElementById(img).innerHTML="<img src=\"../images/progress.gif\" width=\"30\" hight=\"30\" >";
	}
}
/*...............................................................................................................................*/

function searchnew(id,name)
{
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
  	}
	//alert(code);
	//var url="searchlist.php";
	var url="searchlist.php";
	url=url+"?id="+id;
	url=url+"&name="+name;
	url=url+"&sid="+Math.random();
	//alert(url);
	xmlHttp.onreadystatechange=tesrt;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function tesrt()
{
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById('search_id').innerHTML=xmlHttp.responseText;
	}
	else
	{ 
	document.getElementById('search_id').innerHTML="<img src=\"../images/progress.gif\" width=\"30\" hight=\"30\" >";
	}
}
/*******************************..............storehours.........................**********************************/
function storehours()
{
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
  	}
	img="store";
	var market=document.getElementById("market").value;
	var url="store_hours.php";
	url=url+"?sid="+Math.random();
	url=url+"&mrkt="+market;
	xmlHttp.onreadystatechange=strhrs;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function strhrs()
{
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById(img).innerHTML=xmlHttp.responseText;
	}
	else
	{ 
	document.getElementById(img).innerHTML="<img src=\"../images/progress.gif\" width=\"25\" hight=\"25\">";
	}
}
/*******************************validate Credit Card**********************************/
function bill_changestate()
{
 xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
  	}
	img="nonusstate";
	var cntry=document.getElementById("country").value;
	var url="fixstate.php?cntry="+cntry;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=change_state;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);	
}
function change_state()
{
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById(img).innerHTML=xmlHttp.responseText;
	}
	else
	{ 
	document.getElementById(img).innerHTML="<img src=\"images/progress.gif\" width=\"30\" hight=\"30\">";
	}
}
/*******************************validate Credit Card**********************************/
function bill_valid_creditcard()
{
 xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
  	}
	img="crieditcard";
	var ccno=document.getElementById("ccardno").value;
	var ctype=document.getElementById("cctype").value;
	var url="validccard.php?ccno="+ccno+"&ctype="+ctype;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=validcc;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);	
}
function validcc()
{
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById(img).innerHTML=xmlHttp.responseText;
	}
	else
	{ 
	document.getElementById(img).innerHTML="<img src=\"images/progress.gif\" width=\"30\" hight=\"30\">";
	}
}
/*...............................................................................................................................*/

function searchporder(order)
{
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
  	}
	//alert(code);
	//var url="searchlist.php";
	var url="purchaselist.php";
	url=url+"?name="+order;
	url=url+"&sid="+Math.random();
	//alert(url);
	xmlHttp.onreadystatechange=pur_order;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function pur_order()
{
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById("search_id").innerHTML=xmlHttp.responseText;
	}
	else
	{ 
	document.getElementById("search_id").innerHTML="<img src=\"../images/progress.gif\" width=\"30\" hight=\"30\" >";
	}
}
/*******************************..............sunclosed.........................**********************************/
function sunclosed()
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
  	}
	img="sun";
	var url="closesunday.php";
	url=url+"?sid="+Math.random();
	url=url+"&mkt="+mkt;
	if(document.getElementById("closed").checked==true)
	{
	var cls=document.getElementById("closed").value;
	var mkt=document.getElementById("mkt").value;
	url=url+"&cls="+cls;
	}
	
	xmlHttp.onreadystatechange=sunclose;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function sunclose()
{
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById(img).innerHTML=xmlHttp.responseText;
	}
	else
	{ 
	document.getElementById(img).innerHTML="<img src=\"../images/progress.gif\" width=\"25\" hight=\"25\">";
	}
}
/*******************************..............selectmode.........................**********************************/
function select_mode()
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
  	}
	img="payment";
	var mode=document.getElementById("mop").value;
	alert(mode);
	var url="paymentmode.php";
	url=url+"?sid="+Math.random();
	url=url+"&mode="+mode;
	xmlHttp.onreadystatechange=paydetails;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function paydetails()
{
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById(img).innerHTML=xmlHttp.responseText;
	}
	else
	{ 
	document.getElementById(img).innerHTML="<img src=\"../images/progress.gif\" width=\"25\" hight=\"25\">";
	}
}

/****************************************Check Email**************************************************/

function checkEmilAvil(id) {
	xmlHttp=GetXmlHttpObject();	
if (xmlHttp==null) {
		alert ("Your browser does not support AJAX!");
  		return;
  	}	
	loc="emilAvl";
	//var quantity=document.getElementById("quantity"+id).value;
	var url="checkEmailAvil.php";
	url=url+"?id="+id;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=offr_subtotal;
	xmlHttp.open("GET", url, true);
	xmlHttp.send(null);	
}

function offr_subtotal() {
	if(xmlHttp.readyState==4) {
		document.getElementById(loc).innerHTML=xmlHttp.responseText;
	} else { 
		document.getElementById(loc).innerHTML="<img src=\"images/progress.gif\" width=\"30\" hight=\"30\">";
	}
}
/************************************************************************************************************/
function reload_prdct_listing(opn)
{
	xmlHttp=GetXmlHttpObject();	
	if (xmlHttp==null) {
		alert ("Your browser does not support AJAX!");
  		return;
  	}	
	if(opn=="category")
	{
		url = "cat_based_listing.php";
	}
	else if(opn=="Price")
	{
		url = "price_based_listing.php";
	}
	else
	{
		url = "normal_listing.php";
	}
	//var url="checkEmailAvil.php";
	//url=url+"?id="+id;
	url=url+"?sid="+Math.random();
	xmlHttp.onreadystatechange=ret_reload_prdct_listing;
	xmlHttp.open("GET", url, true);
	xmlHttp.send(null);	
}
function ret_reload_prdct_listing() {
	if(xmlHttp.readyState==4) {
		document.getElementById('DIV_PRDCT').innerHTML=xmlHttp.responseText;
	} else { 
		document.getElementById('DIV_PRDCT').innerHTML="<img src=\"images/progress.gif\" width=\"30\" hight=\"30\">";
	}
}
/************************************************************************************************************/

function reload_gift_listing(opn)
{
	xmlHttp=GetXmlHttpObject();	
	if (xmlHttp==null) {
		alert ("Your browser does not support AJAX!");
  		return;
  	}	
	if(opn=="Price")
	{
		url = "place_an_orderbyprice_gift.php";
	}
	else if ("giftid")
	{
		url = "place_an_order_gift.php";
	}
	else
	{
		url = "place_an_order_gift.php";
	}
	//alert(url);
	//var url="checkEmailAvil.php";
	//url=url+"?id="+id;
	url=url+"?sid="+Math.random();
	xmlHttp.onreadystatechange=ret_reload_gift_listing;
	xmlHttp.open("GET", url, true);
	xmlHttp.send(null);	
}
function ret_reload_gift_listing() {
	if(xmlHttp.readyState==4) {
		//alert("hfksdfhkdg");
		document.getElementById('DIV_GIFT').innerHTML=xmlHttp.responseText;
	} else { 
		document.getElementById('DIV_GIFT').innerHTML="<img src=\"images/progress.gif\" width=\"30\" hight=\"30\">";
	}
}


