OK thanks guys I am learning 
so far I have
Code:
function createCookie( sName, sValue, iDays ){
sValue = escape( sValue );
if( iDays ){
var oDate = new Date();
oDate.setTime( oDate.getTime() + ( iDays*24*60*60*1000 ) );
var sExpires = "; expires="+oDate.toGMTString();
}
else
var sExpires = "";
document.cookie = sName+"="+sValue+sExpires+"; path=/";
}
function readCookie(sName) {
var sNameEQ = sName + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(sNameEQ) == 0) return c.substring(sNameEQ.length,c.length);
}
return null;
}
function eraseCookie(sName) {
createCookie(sName,"",-1);
}
and in my html file to createCookie
Code:
<a href="myfile.html" rel="nofollow" onclick="createCookie('storedURL',window.location.href + '::' + document.title,2);return true;">Whatever</a>
and in the HTML file to readCookie
Code:
<script type="text/javascript">
;(function(){
if(readCookie('storedURL')){
var stored = readCookie('storedURL').split('::');
document.write('<a href="' + stored[0] + '">Back to ' + stored[1] + '<\/a>');
}})();
</script>
And it appears to be working but when I select the Back to... link I get something like
http://mydomain.com/http://mydomain.com/....
Note the two http's and domains - how do I fix that?
Cheers
Bookmarks