var expDays = 7; // number of days the cookie should last

function setCookie(value, expire) {
  document.cookie = "userid=" + escape(value)
  + ((expire == null) ? "" : ("; expires="
  + expire.toGMTString()))
}

function getCookie() {
  var search = "userid="
  if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    if (offset != -1) {
      offset += search.length
end = document.cookie.indexOf(";", offset)
if (end == -1) end = document.cookie.length
      return unescape(document.cookie.substring(offset, end))
    }
  }
}

function register(userid) {
var expires = new Date();
var today   = expires.getTime();
expires.setTime(today +  (24 * 60 * 60 * 1000 * expDays));
setCookie(userid,  expires);
}

// --- site specific ---
var bookmarkurl="http://www.great-web-info.com/index.html"
var bookmarktitle="Build your Website"

function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

function mOvr(src){src.bgColor='#6699ff'}
function mOut(src){src.bgColor='#336699'}
