function updateSpam() {
	var prot = 'http';
	var dprot = document.location.protocol;
	if(dprot == 'https' || dprot == 'https:') {
		prot = 'https';
	}
	var url = prot+'://'+document.location.hostname+'/js/spamcount.hln';
	if (spamUpdate < 1000) {
		var myAjax = new ajax(url, { method: 'get', onComplete: updateSpamResponse });
		spamUpdate++;
	}
}

function updateSpamTimeout() {
	setTimeout('updateSpam()',3200);
}

function updateSpamResponse(req) {
	var ts = req.responseXML.getElementsByTagName("totalspam")[0].firstChild.nodeValue;
	$('spamcount').innerHTML = ts;
	setTimeout("updateSpam()",3200);
}

function loginClearEmail(fObj) {
	if(fObj.value=='E-mail') fObj.value='';
	fObj.style.color='#000000';
}

function loginClearPassword(fObj) {
	if(fObj.value=='Password') {
		fObj.value='';
		fObj.type='password';
		fObj.focus();
	}
	fObj.focus();
	fObj.style.color='#000000';
}

var spamUpdate = 0;

var busyImg = new Image(); busyImg.src = "/images/icons/busy.gif";

window.onload = updateSpamTimeout;
