var xmlhttp
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
  try {
  xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp=false;
  }
 }
@else
 xmlhttp=false
 @end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}

function getCookie(NameOfCookie)
{ 
	if (document.cookie.length > 0)
	{ 
		begin = document.cookie.indexOf(NameOfCookie+"=");
		if (begin != -1)
		{ 
			begin += NameOfCookie.length+1;
			end = document.cookie.indexOf(";", begin);
			if (end == -1) 
				end = document.cookie.length;
			return unescape(document.cookie.substring(begin, end)); 
		}
	}
	return null;
}

function setCookie(NameOfCookie, value, expired)
{ 
	var ExpireDate = new Date ();
	ExpireDate.setTime(ExpireDate.getTime() + expired);
	document.cookie = NameOfCookie + "=" + escape(value) + ((expired == null) ? "" : "; expires=" + ExpireDate.toGMTString());
}


function readFile(url)
{
	xmlhttp.open("GET", url,false);
	//xmlhttp.onreadystatechange = writeLicznik;
 	xmlhttp.send(null);
	return xmlhttp.responseText;
}


var ll = 0;
function licznik()
{
	var li = 0;
	if(getCookie("Visited") == null)
	{
		setCookie("Visited","aa", 60000);
		li = readFile("licznik.php?u=1");
	}
	else
	{
		setCookie("Visited","aa", 60000);
		li = readFile("licznik.php");
	}
	ll = li;
	return li;
}
document.write(licznik());