You should encode the email and id before attaching them to the url:
Code:
var nemail = document.getElementById('hiddenemail');
nemail = encodeURIComponent(nemail);
var neid = document.getElementById('hiddenuserid');
neid = encodeURIComponent(neid);
var url="email_availability.php";
url=url+"?nemail="+nemail+"&neid="+neid;
I assume that you have a function named GetXmlHttpObject() although it doesn't seem that it is necessary - it's likely to be repeating some of the code that you already use.