//var xmlHttp
var container;
var container2;
function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}

function display(id,panel)
{
  container = panel;
  xmlHttp4=GetXmlHttpObject();
  if (xmlHttp4==null)
  {
   alert ("Browserynyz ajax'y desteklemiyor...!");
   return;
  } 
  var url="processRequest.php?id="+id;
  
  url=url+"&sid="+Math.random();
  xmlHttp4.onreadystatechange=displaysatate;
  xmlHttp4.open("GET",url,true);
  xmlHttp4.send(null);
}

function displayNewsTitle(id,panel)
{
  container2 = panel;
  xmlHttp3=GetXmlHttpObject();
  if (xmlHttp3==null)
  {
   alert ("Browserynyz ajax'y desteklemiyor...!");
   return;
  } 
  var url="processRequest2.php?id="+id;
  
  url=url+"&sid="+Math.random();
  xmlHttp3.onreadystatechange=displaysatateTitle;
  xmlHttp3.open("GET",url,true);
  xmlHttp3.send(null);
}

function displaysatateTitle() 
{
	if (xmlHttp3.readyState==4)
	{ 
	 document.getElementById(container2).innerHTML=xmlHttp3.responseText;
     new Effect.Fade(container2,
     { duration:2.0, from:0.0, to:0.9 });
	}
}

function closeAll(){
	document.getElementById('haberDiv').style.display = 'none';
	document.getElementById('haberContentDiv').style.display = 'none';
	document.getElementById('haberTitleDiv').style.display = 'none';
	document.getElementById('haberKapatDiv').style.display = 'none';
}

function displaysatate() 
{
	if (xmlHttp4.readyState==4)
	{ 

	 document.getElementById('haberDiv').style.display = 'block';
	 document.getElementById('haberContentDiv').style.display = 'block';
	 document.getElementById('haberTitleDiv').style.display = 'block';
	 document.getElementById('haberKapatDiv').style.display = 'block';


     document.getElementById(container).innerHTML=xmlHttp4.responseText;
     new Effect.Fade(container,
     { duration:2.0, from:0.0, to:0.9 });
}

}