The Page Bookmark script is a fairly simple script that asks the user to bookmark the webmaster's page. Netscape users will get a pop-up window telling them to press CTRL-C while the MSIE users will get to actually bookmark the page with the push of a button. In addition, the pop-up windows will not appear for another 14 days after the user initially sees it. This is a great script to put on your page and will attract many more repeat visitors to your page. The only downside is that the script is a little large.
The source..


<script language="JavaScript1.2">
<!--
// please keep these lines on when you copy the source
// made by: Nicolas - http://www.javascript-page.com

  function getCookieVal (offset) {
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
  endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
  }

  function GetCookie (name) {
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) {
  var j = i + alen;
  if (document.cookie.substring(i, j) == arg)
  return getCookieVal (j);
  i = document.cookie.indexOf(" ", i) + 1;
  if (i == 0) break; 
  }
  return null;
  }
  function SetCookie (name, value) {
  var argv = SetCookie.arguments;
  var argc = SetCookie.arguments.length;
  var expires = (argc > 2) ? argv[2] : null;
  var path = (argc > 3) ? argv[3] : null;
  var domain = (argc > 4) ? argv[4] : null;
  var secure = (argc > 5) ? argv[5] : false;
  document.cookie = name + "=" + escape (value) +
  ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
  ((path == null) ? "" : ("; path=" + path)) +
  ((domain == null) ? "" : ("; domain=" + domain)) +
  ((secure == true) ? "; secure" : "");
  }

var url = "http://www.javascript-page.com";
var title = "Nic's JavaScript Page";

if (GetCookie("bmark") == null)  {

  if (document.all) {
    window.external.AddFavorite (url,title);
  }

  if (document.layers) {
  bktext = open("", "displayWindow", "width=200,height=100,status=no,toolbar=no,menubar=no");

  bktext.document.open();
  bktext.document.write("<html><body bgcolor='white' text='black'>"
  +"Please Bookmark this Page.  "
  +"Press CTRL+C after closing.<br><br>"
  +"<a href='javascript:self.close();'>Close this window</a>");
  bktext.document.write("</font></body></html>");
  bktext.document.close() ;
  }

var exdate = new Date ();
exdate.setTime(exdate.getTime() + (14*24*60*60*1000));
SetCookie('bmark','book',exdate);
}

//-->
</script>

Color coding..


This is the URL of the page you wish the visitor to bookmark.
This is the name that the visitor will see in his favorites for your URL when he bookmarks your page.
The text in the pop-up box for Netscape users can be edited on these lines.
Nic's JavaScript Page