	function initAJAXObj(){
		if(window.XMLHttpRequest){ // Mozilla, Safari,...
			return new XMLHttpRequest();
		}else if(window.ActiveXObject){ // IE
			try{
				return new ActiveXObject("Msxml2.XMLHTTP");
			}catch(e){
				try{
					return new ActiveXObject("Microsoft.XMLHTTP");
				}catch(e){
					return;
				}
			}
		}
	}

xml=initAJAXObj();


function whois(){
	var url=document.getElementById('url');
	xml.open('GET','/assets/phpscripts/whois.php?url='+url.value+'&rand='+Math.random(),true);
	xml.onreadystatechange=handleWhois;
	xml.send(null);
}
function handleWhois(){
	if(xml.readyState == 4){
		var data=xml.responseText;
		var div=document.getElementById('whoisResults');
		div.innerHTML=data;
	}
}

