This is duplicated from above. Instead of using a boolean to decide twice to output the same param, you could just store the param. 
redlinkParam = '';
and then set it in redLinkClick():
redlinkParam = '&redlink=1';