Grats and welcome. :) I'm not total sure what you mean by "unafraid i cant call the ajax from any ather way then that way".
But just in case it is useful, you could also get the form with
alert(document.forms['aform'].type.value);
alert(document.getElementById("aform").type.value);
which would let you do send the name in as a parameter to a function.
Code:
function showUser(str, frm)
{
.
.
.
url=url+"&type=" + document.forms[frm].type.value;
.
.
.
}
david_kw