var tt = 0;
function counter() {
	tt++;
};
$(function() {
	setInterval(counter,1000);
	bload();
	}
);
function getXmlHttp() {
	var xmlhttp = false;
	if (window.XMLHttpRequest) {
		xmlhttp = new XMLHttpRequest()
  } else if (window.ActiveXObject) {
		try {
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP")
		} catch (e) {
			try {
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP")
			} catch (E) {
				xmlhttp=false
			}
		}
	}
	return xmlhttp;
};
var xmlhttp = getXmlHttp();
window.onbeforeunload = function() {
	xmlhttp.open('GET','/timer.php?t=' + tt,false);
	xmlhttp.send(null);
};

