var ajax = new Array();
var http = false;
if(navigator.appName == "Microsoft Internet Explorer") {http = new ActiveXObject("Microsoft.XMLHTTP");} else {http = new XMLHttpRequest();}
function anket(nr)
	{
	http.abort();
	http.open("POST", "/includes/anket.php?islem=ajax&id=" + nr, true);
	http.onreadystatechange=function()
		{
		if(http.readyState == 4)
			{
			document.getElementById('anket').innerHTML = http.responseText;
			}
		}
	http.send(null);
	}

var xmlHttp
function oykullan(id,int,guv)
	{
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
		{
		alert ("Browser does not support HTTP Request")
		return
		}
	var url="/includes/anket.php?islem=ajax"
	url=url+"&id="+id+"&sec="+int+"&guv="+guv
	url=url+"&guvenlik="+Math.random()*10
	xmlHttp.onreadystatechange=guncellestir
	xmlHttp.open("post",url,true)
	xmlHttp.send(null)
	}
function guncellestir() 
	{
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
		{
		document.getElementById("anket").
		innerHTML=xmlHttp.responseText;
		}
	}
function GetXmlHttpObject()
	{
	var objXMLHttp=null
	if (window.XMLHttpRequest) {objXMLHttp=new XMLHttpRequest()}
	else if (window.ActiveXObject) {objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")}
	return objXMLHttp
	}
function takvimolustur(nr)
	{
	http.abort();
	http.open("GET", "/includes/root_takvim.php?islem=ajax&yil=2008&ay=" + nr, true);
	http.onreadystatechange=function()
		{
		if(http.readyState == 4)
			{
			document.getElementById('takvim').innerHTML = http.responseText;
			}
		}
	http.send(null);
	}
function mahalleler(index)
	{
	var obj = document.getElementById('sokaklar');
	eval(ajax[index].response);
	}
function sokakbilgileri(sel)
	{
	var mahalleismi = sel.options[sel.selectedIndex].value;
	document.getElementById('sokaklar').options.length = 0;
	if(mahalleismi.length>0)
		{
		var index = ajax.length;
		ajax[index] = new sack();
		ajax[index].requestFile = '\/includes\/adresbilgileri.php?mahalle='+mahalleismi;
		ajax[index].onCompletion = function(){mahalleler(index) };
		ajax[index].runAJAX();
		}
	}

function hareketbilgileri(hat)
	{
	http.abort();
	var hatadi = hat.options[hat.selectedIndex].value;
	http.open("GET", '/includes/ajax_otobus_izmir.php?hat='+hatadi, true);
	http.onreadystatechange=function()
		{
		if(http.readyState == 4)
			{
			document.getElementById('hareketsaati').innerHTML = http.responseText;
			}
		}
	http.send(null);
	}
