function GetXmlHttpObject()

  {

  xHRObject = false;

  if (window.XMLHttpRequest)

    {

    xHRObject = new XMLHttpRequest();

    }

  else if (window.ActiveXObject)

    {

    xHRObject = new ActiveXObject("Microsoft.XMLHTTP");

    }

  return xHRObject;

  }

  

function sepeteEkle(urunID){

  d='dd';

  var url="ajax.php?tab=eklesepet&urun="+urunID;

  xmlHttp=GetXmlHttpObject();

   if (xmlHttp)

   	{

    xmlHttp.open("GET",url,true);

    xmlHttp.onreadystatechange=sepetGoster;

    xmlHttp.send(null);

   	}

  }

function sepetGoster(){

  if (xmlHttp.readyState==4)

   	{

   	degerler=xmlHttp.responseText;

    alert(degerler+'Ürün Sepete Eklenmiştir.Menüden Sepetinizi Kotrol Edebilirsiniz');

    }

  }  

function satinAl(urunID){

  d='';

  }



function sepetSilSecond(sepetID)

  {

  var url="ajax.php?tab=silsepetsecond&sepetid="+sepetID;

  if (document.getElementById('sepetSecond'))

    {

    document.getElementById('sepetSecond').innerHTML='<img src="images/loading.gif" align="center" style="margin-left:15px;">';

    }

  xmlHttp=GetXmlHttpObject();

   if (xmlHttp)

   	{

    xmlHttp.open("GET",url,true);

    xmlHttp.onreadystatechange=sepetGosterSecond;

    xmlHttp.send(null);

   	}  

  }

function sepetGosterSecond()

	{

	if (xmlHttp.readyState==4)

   	{

    degerler=xmlHttp.responseText;

		//alert(degerler);

		if (document.getElementById('sepetSecond'))

      {

      document.getElementById('sepetSecond').innerHTML=degerler;

      }

		}

	}
function sepetBosaltSecond()
  {
  var url="ajax.php?tab=bosaltsepet";
  if (document.getElementById('mySepet'))
    {
    document.getElementById('mySepet').innerHTML='<img src="images/loading.gif" align="center" style="margin-left:15px;">';
    }
  xmlHttp=GetXmlHttpObject();
   if (xmlHttp)
   	{
    xmlHttp.open("GET",url,true);
    xmlHttp.onreadystatechange=sepetGosterSecond;
    xmlHttp.send(null);
   	}
  }
 
 // İl İlçe 
function ilceGoster(ilID)
	{
	var url="ajax.php?tab=ilcele&il="+ilID;
	xmlHttp=GetXmlHttpObject();
   if (xmlHttp)
   	{
      xmlHttp.open("GET",url,true);
      xmlHttp.onreadystatechange=ilcele;
      xmlHttp.send(null);
   	}
	}
function ilcele()
	{
	if (xmlHttp.readyState==4)
   	{
    degerler=xmlHttp.responseText;
		//alert(degerler);
		document.getElementById('sip_ilceDiv').innerHTML=degerler;
		}
	}
function satinAl(urunID){

  d='dd';

  var url="ajax.php?tab=eklesepet&urun="+urunID;

  xmlHttp=GetXmlHttpObject();

   if (xmlHttp)

   	{

    xmlHttp.open("GET",url,true);

    xmlHttp.onreadystatechange=sepetGosterBu;

    xmlHttp.send(null);

   	}

  }
function sepetGosterBu(){

  if (xmlHttp.readyState==4)

   	{

   	degerler=xmlHttp.responseText;

    window.location.href='sepet.php';

    }

  }               
