     var onay;

     var donus = "0";
// JavaScript Document
   function makePOSTRequest(url, parameters){

      http_request = false;

      if (window.XMLHttpRequest) { //Mozilla, Safari,...

         http_request = new XMLHttpRequest();

         if (http_request.overrideMimeType) {

            http_request.overrideMimeType('text/xml');

         }

      } else if (window.ActiveXObject) { //IE

         try {

            http_request = new ActiveXObject("Msxml2.XMLHTTP");

         } catch (e) {

            try {

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

            } catch (e) {}

         }

      }

      if (!http_request) {

         alert('Cannot create XMLHTTP instance');

         return false;

      }



      http_request.onreadystatechange = alertContents;

      http_request.open('POST', url, true);

      http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded; charset=iso-8859-9");

      http_request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");

      http_request.setRequestHeader("Content-length", parameters.length);

      http_request.setRequestHeader("Connection", "close");

      http_request.send(parameters);  

   }
   


     /*alertContents*/

     function alertContents() {

       if (http_request.readyState == 4) {

         if (http_request.status == 200) {

        	 document.getElementById("loading_box").style.visibility = 'hidden';

        	 

           result = http_request.responseText;
           document.getElementById(onay).innerHTML = result;

        	 

         		if (donus != "0"){

           		location.href=donus;

           		donus = "";

         		}  

         }

         else {

           alert('There was a problem with the request.');

         }

       }

     } // alertContents Function Sonu



     

     

     function turkceKarakter(){

			 input_G = document.forms["adminForm"].G.value;

			 input_S = document.forms["adminForm"].S.value;

			 input_T = document.forms["adminForm"].T.value;

			 getstr += 'input_G='+input_G+'&';

			 getstr += 'input_S='+input_S+'&';

			 getstr += 'input_T='+input_T+'&';

			 return getstr;

     }

     
function altkat()
{
	onay = "alt_kat";
	
	var secilen_kat=0;
	
 	secilen_kat = document.forms["aramafrm"].emlak_tur.options[document.forms["aramafrm"].emlak_tur.selectedIndex].value;
	
	getstr = "function=alt_kategori&turu="+secilen_kat+"&";
		
    makePOSTRequest('arama_xmlreq.php', getstr);
  	 document.getElementById("loading_box").style.visibility = 'visible';
}


function ilgetir()
{
	onay = "iller";
	
	secilen_ulke = document.forms["aramafrm"].ulke_secim.value;
	
	
	getstr = "function=iller&ulke_id="+secilen_ulke+"&";
		
    makePOSTRequest('arama_xmlreq.php', getstr);
  	 document.getElementById("loading_box").style.visibility = 'visible';
}

function ilcegetir()
{
	onay = "ilceler";
	
	secilen_il = document.forms["aramafrm"].il_secim.value;
	
	
	getstr = "function=ilceler&il_id="+secilen_il+"&";
		
    makePOSTRequest('arama_xmlreq.php', getstr);
  	 document.getElementById("loading_box").style.visibility = 'visible';
}

function mahallegetir()
{
	onay = "mahalle";
	
	secilen_ilce = document.forms["aramafrm"].ilce_secim.value;
	
	
	getstr = "function=mahalleler&ilce_id="+secilen_ilce+"&";
		
    makePOSTRequest('arama_xmlreq.php', getstr);
  	 document.getElementById("loading_box").style.visibility = 'visible';
}    






function altkat_detail()
{
	onay = "alt_kat_detail";
	
	secilen_kat = document.forms["aramafrm_detail"].emlak_tur_detail.value;
	
	
	getstr = "function=alt_kategori_detail&turu="+secilen_kat+"&";
		
    makePOSTRequest('arama_xmlreq.php', getstr);
  	 document.getElementById("loading_box").style.visibility = 'visible';
}

function ilgetir_detail()
{
	onay = "iller_detail";
	
	secilen_ulke = document.forms["aramafrm_detail"].ulke_secim_detail.value;
	
	
	getstr = "function=iller_detail&ulke_id="+secilen_ulke+"&";
		
    makePOSTRequest('arama_xmlreq.php', getstr);
  	 document.getElementById("loading_box").style.visibility = 'visible';
}

function ilcegetir_detail()
{
	onay = "ilceler_detail";
	
	secilen_il = document.forms["aramafrm_detail"].il_secim_detail.value;
	
	
	getstr = "function=ilceler_detail&il_id="+secilen_il+"&";
		
    makePOSTRequest('arama_xmlreq.php', getstr);
  	 document.getElementById("loading_box").style.visibility = 'visible';
}


function mahallegetir_detail()
{
	onay = "mahalle_detail";
	
	secilen_ilce = document.forms["aramafrm_detail"].ilce_secim_detail.value;
	
	
	getstr = "function=mahalleler_detail&ilce_id="+secilen_ilce+"&";
		
    makePOSTRequest('arama_xmlreq.php', getstr);
  	 document.getElementById("loading_box").style.visibility = 'visible';
}     





function altkat_isyeri()
{
	onay = "alt_kat_isyeri";
	
	secilen_kat = document.forms["aramafrm_isyeri"].emlak_tur_isyeri.value;
	
	
	getstr = "function=alt_kategori_isyeri&turu="+secilen_kat+"&";
		
    makePOSTRequest('arama_xmlreq.php', getstr);
  	 document.getElementById("loading_box").style.visibility = 'visible';
}

function ilgetir_isyeri()
{
	onay = "iller_isyeri";
	
//	alert('sdsd');
	secilen_ulke = document.forms["aramafrm_isyeri"].ulke_secim_isyeri.value;
	
	
	getstr = "function=iller_isyeri&ulke_id="+secilen_ulke+"&";
		
    makePOSTRequest('arama_xmlreq.php', getstr);
  	 document.getElementById("loading_box").style.visibility = 'visible';
}


function ilcegetir_isyeri()
{
	onay = "ilceler_isyeri";
	
	secilen_il = document.forms["aramafrm_isyeri"].il_secim_isyeri.value;
	
	
	getstr = "function=ilceler_isyeri&il_id="+secilen_il+"&";
		
    makePOSTRequest('arama_xmlreq.php', getstr);
  	 document.getElementById("loading_box").style.visibility = 'visible';
}


function mahallegetir_isyeri()
{
	onay = "mahalle_isyeri";
	
	secilen_ilce = document.forms["aramafrm_isyeri"].ilce_secim_isyeri.value;
	
	
	getstr = "function=mahalleler_isyeri&ilce_id="+secilen_ilce+"&";
		
    makePOSTRequest('arama_xmlreq.php', getstr);
  	 document.getElementById("loading_box").style.visibility = 'visible';
} 


function altkat_arsa()
{
	onay = "alt_kat_isyeri";
	
	secilen_kat = document.forms["aramafrm_arsa"].emlak_tur_arsa.value;
	
	
	getstr = "function=alt_kategori_arsa&turu="+secilen_kat+"&";
		
    makePOSTRequest('arama_xmlreq.php', getstr);
  	 document.getElementById("loading_box").style.visibility = 'visible';
}

function ilgetir_arsa()
{
	onay = "iller_arsa";
	
	secilen_ulke = document.forms["aramafrm_arsa"].ulke_secim_arsa.value;
	
	
	getstr = "function=iller_isyeri&ulke_id="+secilen_ulke+"&";
		
    makePOSTRequest('arama_xmlreq.php', getstr);
  	 document.getElementById("loading_box").style.visibility = 'visible';
}


function ilcegetir_arsa()
{
	onay = "ilceler_arsa";
	
	secilen_il = document.forms["aramafrm_arsa"].il_secim_arsa.value;
	
	
	getstr = "function=ilceler_arsa&il_id="+secilen_il+"&";
		
    makePOSTRequest('arama_xmlreq.php', getstr);
  	 document.getElementById("loading_box").style.visibility = 'visible';
}


function mahallegetir_arsa()
{
	onay = "mahalle_arsa";
	
	secilen_ilce = document.forms["aramafrm_arsa"].ilce_secim_arsa.value;
	
	
	getstr = "function=mahalleler_arsa&ilce_id="+secilen_ilce+"&";
		
    makePOSTRequest('arama_xmlreq.php', getstr);
  	 document.getElementById("loading_box").style.visibility = 'visible';
} 