if (top.location != self.location) top.location = self.location;


function openPopUp_519x393(href, target)
{
	window.open(href, target, 'width=537, height=423, top=0, toolbar=0, location=0, directories=0, status=1, menuBar=0, scrollBars=1, resizable=0');
	return false;
}



function openPopUp_650x550(href, target)
{
	window.open(href, target, 'width=660, height=550, top=0, toolbar=0, location=0, directories=0, status=1, menuBar=0, scrollBars=1, resizable=0');
	return false;
}


function openPopUp_550x550(href, target)
{
	window.open(href, target, 'width=550, height=550, top=0, toolbar=0, location=0, directories=0, status=1, menuBar=0, scrollBars=0, resizable=0');
	return false;
}



function openPopUp_520x390(href, target)
{
	window.open(href, target, 'width=525, height=390, top=0, toolbar=0, location=0, directories=0, status=1, menuBar=0, scrollBars=0, resizable=0');
	return false;
}

function openPopUp_530x390(href, target)
{
	window.open(href, target, 'width=535, height=390, top=0, toolbar=0, location=0, directories=0, status=1, menuBar=0, scrollBars=0, resizable=0');
	return false;
}


self.setTimeout('window.location.reload()', 600000);



function changeSize(elm, _size, class_name)
{
	document.getElementById(elm).className = class_name + ' ' + class_name + '_' + _size;
	Set_Cookie('text_size', _size, 30, '', '', '');
}




var http = getHTTPObject(); // HTTP Nesnesi Oluşturuluyor
//Sonuçları Alan Fonksiyon
function handleHttpResponse()
{
  if (http.readyState == 1)
        {
          document.getElementById('mesaj').innerHTML = 'Sorgu Tamamlanıyor ...';
        } else if (http.readyState == 4) {
    if (http.status == 200)
    {
      //XML Verileri Alınıyor
      var xmlDocument = http.responseXML;
      var etiketadi          = xmlDocument.getElementsByTagName('ilce');
      //XML İlçeler Sayısını Alıyoruz
      var ilce_sayi   = etiketadi.length;
      if (ilce_sayi>0)
      {
        var ilce_secim_kutusu = document.getElementById("ilceler");

        var ilce_no;
        var ilce_adi;
        var i;
        ilce_kutu_temizle(ilce_secim_kutusu);
        ilce_kutu_olustur(ilce_secim_kutusu,'İlçe Seçiniz','');

        for (i=0; i< ilce_sayi; i++)
        {
          ilce_adi  = etiketadi.item(i).getAttribute('ilceadi');
          ilce_no   = etiketadi.item(i).getAttribute('ilceno');
          ilce_kutu_olustur(ilce_secim_kutusu,ilce_adi,ilce_no);
        }
      }
                        document.getElementById('mesaj').innerHTML = '';
    } else {
      document.getElementById('mesaj').innerHTML = 'Hata Oluştu';
    }
  }
}
//XML Sayfasından Gelen İlçeleri Seçim Kutusuna Gönderen Fonksiyon
function ilce_kutu_olustur(ilce_secim_kutusu,isim,deger)
{
  var new_option   = document.createElement('option');
  new_option.text  = isim;
  new_option.value = deger;

  try {
    ilce_secim_kutusu.add(new_option, null);
  }
  catch(ex) {
    ilce_secim_kutusu.add(new_option);
  }
}

function ilce_kutu_temizle(xmlkok_etiket)
{
  while (xmlkok_etiket.length > 0)
  {
    xmlkok_etiket.remove(0);
  }
}

//İstekte Bulunan Fonksiyon
//İl Numarası XML Sayfasına Gönderiliyor
function ilceleri_getir()
{
  var iller = document.getElementById("iller");
        var ilno  = iller.options[iller.selectedIndex].value;
  http.open("POST", 'ililce/ilce_xml.php', true);
  http.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=iso-8859-9');
  http.onreadystatechange = handleHttpResponse;
  http.send("ilno="+ilno);
}

function getHTTPObject()
{
  var retval=null;
  try
  {
    retval=new ActiveXObject("Msxml2.XMLHTTP");
  }
  catch(e)
  {
    try
    {
      retval=new ActiveXObject("Microsoft.XMLHTTP");
    }
    catch(oc)
    {
      retval=null;
    }
  }

  if(!retval && typeof XMLHttpRequest != "undefined")
  {
    retval=new XMLHttpRequest();
  }
  return retval;
}






var http = getHTTPObject1(); // HTTP Nesnesi Oluşturuluyor...   mahalle ve köyler için
//Sonuçları Alan Fonksiyon
function handleHttpResponse1()
{
  if (http.readyState == 1)
        {
          document.getElementById('mesaj1').innerHTML = 'Sorgu Tamamlanıyor ...';
        } else if (http.readyState == 4) {
    if (http.status == 200)
    {
      //XML Verileri Alınıyor
      var xmlDocument = http.responseXML;
      var etiketadi          = xmlDocument.getElementsByTagName('koy');
      //XML İlçeler Sayısını Alıyoruz
      var koy_sayi   = etiketadi.length;
      if (koy_sayi>0)
      {
        var koy_secim_kutusu = document.getElementById("koyler");

        var koy_no;
        var koy_adi;
        var k;
        koy_kutu_temizle(koy_secim_kutusu);
        koy_kutu_olustur(koy_secim_kutusu,'Köy Seçiniz','');

        for (k=0; k< koy_sayi; k++)
        {
          koy_adi  = etiketadi.item(k).getAttribute('koyadi');
          koy_no   = etiketadi.item(k).getAttribute('koyno');
          koy_kutu_olustur(koy_secim_kutusu,koy_adi,koy_no);
        }
      }
                        document.getElementById('mesaj1').innerHTML = '';
    } else {
      document.getElementById('mesaj1').innerHTML = 'Hata Oluştu';
    }
  }
}
//XML Sayfasından Gelen Köyleri Seçim Kutusuna Gönderen Fonksiyon
function koy_kutu_olustur(koy_secim_kutusu,isim,deger)
{
  var new_option   = document.createElement('option');
  new_option.text  = isim;
  new_option.value = deger;

  try {
    koy_secim_kutusu.add(new_option, null);
  }
  catch(ex) {
    koy_secim_kutusu.add(new_option);
  }
}

function koy_kutu_temizle(xmlkok_etiket)
{
  while (xmlkok_etiket.length > 0)
  {
    xmlkok_etiket.remove(0);
  }
}

//İstekte Bulunan Fonksiyon
//İlçe Numarası XML Sayfasına Gönderiliyor
function koyleri_getir()
{
  var ilceler = document.getElementById("ilceler");
        var ilceno  = ilceler.options[ilceler.selectedIndex].value;
  http.open("POST", 'ililce/koy_xml.php', true);
  http.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=iso-8859-9');
  http.onreadystatechange = handleHttpResponse1;
  http.send("ilceno="+ilceno);
}

function getHTTPObject1()
{
  var retval=null;
  try
  {
    retval=new ActiveXObject("Msxml2.XMLHTTP");
  }
  catch(e)
  {
    try
    {
      retval=new ActiveXObject("Microsoft.XMLHTTP");
    }
    catch(oc)
    {
      retval=null;
    }
  }

  if(!retval && typeof XMLHttpRequest != "undefined")
  {
    retval=new XMLHttpRequest();
  }
  return retval;
}

$().ready(function() {  
$('#add').click(function() {  
return !$('#select1 option:selected').remove().appendTo('#select2');  
});  
$('#remove').click(function() {  
return !$('#select2 option:selected').remove().appendTo('#select1');  
});  
});  

function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};

jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
        auto: 2,
        wrap: 'last',
        initCallback: mycarousel_initCallback
    });
});


function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}