var rob;
var delayKey = 800;
function onFocus() { 
	document.domain_form.domain.focus()
}
function checkDomain() {
	d = new Date(); now = d.getTime();
	var url = 'whois.php?domain=' + document.getElementById('domain').value;
	ajax ( url, handleInfo );
}
function triggerHappy () {
	var rob;
	window.clearTimeout(rob);
	rob = window.setTimeout("checkDomain()", delayKey);
}
function handleInfo() {
	if(http.readyState == 1) {
		document.getElementById('dsubmit').disabled = true;
	}
	if(http.readyState == 4) {
		var response = http.responseText;
		document.getElementById('dsubmit').disabled = false;
		document.getElementById('result').innerHTML = response;
	}
}



