function arama()
{

	if(document.getElementById('s').value.length<4 || document.getElementById('s').value=="Arama yap...") 
	{
		alert("Arayacağınız kelime en az 4 harfli olmalı.");
		return false; 
	}
	else 
	{
		return true;
	}
}


function do_ajax(postdata,wait,waittext,response,url,method)
{
var ajaxHTTP;
function ajax_do()
{

ajaxHTTP=GetXmlHttpObject();

if (ajaxHTTP==null)
  {
  alert ("Browser does not support HTTP Request");
  return;
  }
else {
			if(method=="GET")
			{
			ajaxHTTP.onreadystatechange=ajaxHTTPSC;
			url=url+postdata;
			ajaxHTTP.open("GET",url,true);
			//ajaxHTTP.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
			ajaxHTTP.send(null);
			}
			
  			else
			{
			ajaxHTTP.onreadystatechange=ajaxHTTPSC;
			ajaxHTTP.open("POST",url,true);
			ajaxHTTP.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
			ajaxHTTP.send(postdata);
			}

	}

}

function ajaxHTTPSC()
{

	if (ajaxHTTP.readyState==4)
	{
	document.getElementById(wait).innerHTML="";
	document.getElementById(response).innerHTML=ajaxHTTP.responseText;
	}
	if (ajaxHTTP.readyState!=4)
	{
	
		document.getElementById(wait).innerHTML="<span> "+ waittext+" </span>";

	}

}
	ajax_do();
}
function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}

function gostergizle(item) { 
obj=document.getElementById(item); 
if (obj.style.display=="none") 
{ obj.style.display=""; 
} 
else 
{ obj.style.display="none";
} 

}


function golink(str)
{
	parent.location.href=str;
	
}

function gostergizle(item) { 
obj=document.getElementById(item); 
if (obj.style.display=="none") 
{ obj.style.display=""; 
} 
else 
{ obj.style.display="none";
} 

}

function aboneol(){ 
var eposta=document.getElementById('aboneeposta').value;

if(eposta=='E-posta adresinizi girin' || eposta=='' )  
{
	alert("Lütfen e-posta adresinizi giriniz.");
	return false;
}
if(eposta!='E-posta adresinizi girin') 
{
do_ajax('?eposta='+eposta,'abone_durum','','abone_durum','ajax_abonekontrol.php','GET');
return false;
}


}
