var antalauktioner	= 50;

function opdatephptime() {
	phptime();
	
	//tilpasphptime();
}

function phptime() {
	document.getElementById('phptime').firstChild.nodeValue = parseInt(document.getElementById('phptime').firstChild.nodeValue) + 1;
	
	setTimeout('phptime()',998);
}

function tilpasphptime() {
	var xmlhttp;
	
	if (window.XMLHttpRequest) {
		xmlhttp = new XMLHttpRequest();
	}
	else if (window.ActiveXObject) {
		xmlhttp = new ActiveXObject('Microsoft.XMLHTTP');
	}
	
	xmlhttp.open('GET','/_feed/phptime.php',true);
	
	xmlhttp.onreadystatechange = function() {
		if (xmlhttp.readyState == 4) {
			var result = xmlhttp.responseText;
			
			var json = eval('(' + result + ')');
			
			document.getElementById('phptime').firstChild.nodeValue = json;
	
			setTimeout('tilpasphptime()',60000);
		}
	}
	
	xmlhttp.send(null);
}