function nesneyarat()
{
 var nesne;
 var tarayici = navigator.appName;
 if(tarayici == "Microsoft Internet Explorer")
 {
  nesne = new ActiveXObject("Microsoft.XMLHTTP");
 }
 else
 {
  nesne = new XMLHttpRequest();
 }
 return nesne;
}

var http = nesneyarat();

function linkliste(yer,tablo,id)
{
 var params = 'tablo='+tablo+'&id='+id+'&yer='+yer;
 http.open('post', './ajax/referans.php',true);
 http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
 http.setRequestHeader("Content-length", params.length);
 http.setRequestHeader("Connection", "close");

 http.onreadystatechange = function()
 {
  if(http.readyState == 4 && http.status == 200)
  {
   document.getElementById(yer).innerHTML = http.responseText;
  }
 }
 http.send(params);
}

function linklistekapat(yer)
{
 document.getElementById(yer).innerHTML = '';
}

function puanla(id,puan)
{
 http.open('get', './ajax/puanla.php?id='+id+'&puan='+puan,true);
 http.onreadystatechange = function()
 {
  if(http.readyState == 4 && http.status == 200)
  {
   document.getElementById('g_puanlama').innerHTML = http.responseText;
  }
 }
 http.send(null);
}

function puanla2(id,puan)
{
 http.open('get', './ajax/puanla2.php?id='+id+'&puan='+puan,true);
 http.onreadystatechange = function()
 {
  if(http.readyState == 4 && http.status == 200)
  {
   document.getElementById('puanlama').innerHTML = http.responseText;
  }
 }
 http.send(null);
}

function resimsec(id,sn,toplam)
{
 http.open('get', './ajax/resimsec.php?id='+id+'&sn='+sn+'&toplam='+toplam,true);
 http.onreadystatechange = function()
 {
  if(http.readyState == 4 && http.status == 200)
  {
   document.getElementById('fotoyeri').innerHTML = http.responseText;
  }
 }
 http.send(null);
}

function kombiekleform(s)
{
 http.open('get', './ajax/kombiekleform.php?s='+s,true);
 http.onreadystatechange = function()
 {
  if(http.readyState == 4 && http.status == 200)
  {
   document.getElementById('divkombiekle').innerHTML = http.responseText;
  }
 }
 http.send(null);
}

function servisoku(yer,id)
{
 http.open('get', './ajax/servisoku.php?yer='+yer+'&id='+id,true);
 http.onreadystatechange = function()
 {
  if(http.readyState == 4 && http.status == 200)
  {
   document.getElementById(yer).innerHTML = http.responseText;
  }
 }
 http.send(null);
}

function serviskapat(yer)
{ 
 document.getElementById(yer).innerHTML ='';
}

