Javascript is executed in the context of HTML not HTTP. I believe it would require some browser specific extension to supply it. I am not aware of any browser that does.
Here's a way, although you do need to have Server Parsed HTML activated on your webserver:
<script type="text/javascript">
var user="<!--#echo var="HTTP_SM_USER"-->";
document.write("<H3> Welcome! You are logged in as " + user);
document.write("</H3><BR>"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.