Create a new hidden field based on another one

Hi there,

I have this hiddent field:


<input type="hidden" id="newsletter_agentCode" name="agent_code" value="stay" />

I want to create an additional hidden field which looks like this:


<input type="hidden" value="stay" name="tmp">

I want to create that field based on the first hidden field by using the

id="newsletter_agentCode" name="agent_code" value="stay"

part.

How would I do this?

Thanks