Appending variable to a URL pending the value of a cookie

Appending variable to a URL pending the value of a cookie

Hi guys,

I am wondering if this is possible.



If document.cookie; = value "U" Append This to all href's
If document.cookie; = value "P" Append This to all href's

So basically:

U value adds ?appendu to the URL on all Hyperlinks on the page
domain.com?appendu

P value adds ?appendp to the URL on all Hyperlinks on the page
domain.com?appendp


Looking for some direction