function is_nick() {
var xmlHttpReq = false;
var self = this;
	
if (window.XMLHttpRequest) {
self.xmlHttpReq = new XMLHttpRequest();
}
   	
else if (window.ActiveXObject) {
self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
self.xmlHttpReq.open('POST', 'messenger.php?mode=nickcheck', true);
self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
self.xmlHttpReq.onreadystatechange = function() {

document.getElementById("nickdiv").innerHTML = 'Checking nickname availability...';

if (self.xmlHttpReq.readyState == 4) {
document.getElementById("nickdiv").innerHTML = self.xmlHttpReq.responseText;
}

}

var form = document.forms['signup'];
var nick = form.nickname.value;
qstr = 'nickname=' + escape(nick)

self.xmlHttpReq.send(qstr);

}


