Command button and Action Function
It won't work like this and here is why: Your action in the actionFunction returns a pagereference. But you also specify a rerender (Which you need to pass the parameter). This rerender prevents the page from redirecting because it rerenders a non-existing part of the page.
What you can do is not use an actionfunction but change the commandButton to:
<apex:commandButton action="" value="NEXT">
<apex:param name="p1" assignTo="{!linkclicked}" value="ContactDetailsPage" />
</apex:commandButton>
Just another thought that just popped in my head about your original code you put in your question: You might try to put somewhere in your page:
<apex:outputPanel id="hiddenPannel" style="display:none;" />
And change the rerender="none"
to rerender="hiddenPannel"