var xmlhttp=false;
var xmlhttp2=false;
var xmlhttp3=false;
var t;
var tcontrol;

try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
xmlhttp2 = new ActiveXObject("Msxml2.XMLHTTP");
xmlhttp3 = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {

try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp2 = new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp3 = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {

xmlhttp = false;
xmlhttp2 = false;
xmlhttp3 = false;
}
}

if (!xmlhttp && !xmlhttp2 && !xmlhttp3 && typeof XMLHttpRequest!='undefined') {

  xmlhttp = new XMLHttpRequest();
  xmlhttp2 = new XMLHttpRequest();
  xmlhttp3 = new XMLHttpRequest();

}

function Varmi() {
	fragment_url='/ajaxvarmi.php';
	xmlhttp3.open("GET", fragment_url);
	xmlhttp3.onreadystatechange = function() {
		if (xmlhttp3.readyState == 4 && xmlhttp3.status == 200) {
			sonuctext = xmlhttp3.responseText;
			document.getElementById('varmi').innerHTML=sonuctext;
			tcontrol=setTimeout("Varmi() ",30000);
		}
	}
	xmlhttp3.send(null);
}

function loadFragmentInToElement(fragment_url, element_id) {

    xmlhttp.open("GET", fragment_url);

    xmlhttp.onreadystatechange = function() {

      if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
		
		if (element_id){
			document.getElementById(element_id).innerHTML = xmlhttp.responseText;
		}
		
      }

    }

    xmlhttp.send(null);

}

function DisplayProfile(page) {
   window.open(page,'profile','height=600, width=900, left=0, top=0, scrollbars=1');
}

function ReklamVer(page) {
   window.open('/reklamver.php?banner='+page,'reklamver','height=500, width=400, left=0, top=0, scrollbars=1');
}

