that's how lookups work by default. you do not need implement any extra logic so that you show (text) value but query by ID.
value of lookup control is always in a form: ID;#textvalue
to get one or the other part out of it use parseLookup() function
ok, I see.
but if you have lookup field configured in list it will anyway make a link/search with internal ItemID and not with your custom EmpID.
imho, you do not need to bother with EmpID at all.