var xmlHttp; function u_reg(field) { var name=field.value; if(""!=name) { xmlHttp=createXmlHttpRequest(); var url="loginAction!reg?username="+name; xmlHttp.open("GET",url,true); xmlHttp.onreadystatechange=userName; xmlHttp.send(null); } else { return; } } function changeDrop(field