You're attempting to mix Javascript code with C# code.
From within an Entity form event, your javascript code has no inherent knowledge of the identity of the currently logged in User. To obtain the current User GUID, you must perform a WhoAmI operation. The code in the following URL provides an
example of how:
http://www.dotnetspider.com/resources/20331-Javascript-get-Logged-USER-info-for.aspx
Scroll down to the CRM 4.0 section. You need the SystemUserId and FullName variables that are declared.
If your 'ee_userfieldid' field represents a Lookup attribute, you need code similar to the following to populate it:
var lookup = new Array();
var lookupItem = new Object();
lookupItem.id = SystemUserId;
lookupItem.typename = 'systemuser';
lookupItem.name = FullName;
lookup[0] = lookupItem;
crmForm.all.ee_userfieldid.DataValue = lookup;
--pogo (pat)