// Bilgileri Al
function Bilgileri_Al(yer, dosya, sc) {
	/* (c)2007 by SouL */
	ajax = new AJAX();
	
	if ( ajax ) {
		ajax.onreadystatechange = function () {}
		ajax.abort()
	}
	
	ajax.open('POST', dosya, true)
	ajax.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT")
	ajax.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8')
    ajax.setRequestHeader("Content-length", sc.length)
    ajax.setRequestHeader("Connection", "close")
	ajax.send(sc)
	
    ajax.onreadystatechange = function () {
		if(yer != 'no_id') {
			if( ajax.readyState == 1 || ajax.readyState == 2 || ajax.readyState == 3 ) {
				var loading = '&nbsp;&nbsp;&nbsp;<img src="/ServerProcess/loading.gif" width="16" height="16" alt="Yukleniyor..." />&nbsp;&nbsp;<font color="#000000"><b>Yukleniyor...</b></font>'
				document.getElementById(yer).innerHTML = loading;
			}
		}
		
		if( ajax.readyState == 4 && yer != 'no_id' ) {
			document.getElementById(yer).innerHTML = ajax.responseText
			function AJAX() {}
        }
	}
		
}

function AJAX() {
   var ajax = false;
   
   // Internet Explorer (5.0+)
   try {
     ajax = new ActiveXObject("Msxml2.XMLHTTP"); 
   } catch (e) {
      try {
        ajax = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e) {
        ajax = false;
      }
   }

   // Mozilla veya Safari
   if ( !ajax && typeof XMLHttpRequest != 'undefined' ) {
     try{
        ajax = new XMLHttpRequest();
     }catch(e) {    
        ajax = false;
     }
   }

   // Diger
   if ( !ajax && window.createRequest ) {
	 try{
        ajax = window.createRequest();
     }catch(e) {  
        ajax = false;
     }
   }
	return ajax;
}

// Gonderilenleri Al
	function GetServerInfo (style, serverip, port) {
    if(style == "won" || style == "steam"){
		var sc = 'server='+ serverip +'&port='+port + '&style='+style;
		Bilgileri_Al('goster', '../ServerProcess/serverbilgisial2.php', sc)
    }
    if (style == "q2a" || style == "q3a"){
		var sc = 'ip='+ serverip +'&port='+port + '&game='+style;
		Bilgileri_Al('goster', '../ServerProcess/QuakeProcess/index2.php', sc)
		}
	}
