<!-- LL Thu Apr  1 14:42:37 1999  $Revision: 2.29 $  -->


    var cycloneCookieName = "u_cyc_1_0";
    var pageCookieName = "cycP";
    var linksCookieName = "cycL";

    function cookieGetPreferredPlayer() {
      var cook = getCookie();

      return cook.substring(0, 2);
    }

    function cookieSetPreferredPlayer(playerId) {
      var cook = getCookie();
      var playerString = "0" + playerId;

      setCookie(playerString.substring(playerString.length - 2, playerString.length) +
	cook.substring(2,cook.length));
    }

    function cookieGetBrowser() {
      var cook = getCookie();
      return cook.substring(2,3);
    }

    function cookieExplorer() {
      var cook = getCookie();
      return (cook.substring(2,3) == 'E');
    }

    function cookieNetscape() {
      var cook = getCookie();
      return (cook.substring(2,3) == 'N');
    }

    function cookieWindows() {
      return (navigator.platform == 'Win32');
    }

    function cookieGetVersion() {
      var cook = getCookie();
      return (cook.substring(3, cook.length));
    }

    function cookiePutCookie(cook) {
      document.cookie = cycloneCookieName + "=" + cook + "; path=/; domain=.ssnp.com; expires=Mon, 01-Jan-2002 00:00:00 GMT";
    }

    function cookiePutSessionCookie(cook) {
      document.cookie = cycloneCookieName + "=" + cook + "; path=/; domain=.ssnp.com";
    }

    function cookieFirstTime() {
      getCookie();
      return firstTime;
    }

    function setCookie(cook) {
      cookiePutCookie(cook);
    }

function getNamedCookie(name) {
      var allCookies = document.cookie;

      // do we even have a cookie?
      if (allCookies != "") {
        var start = allCookies.indexOf(name + "=");

	if (start > -1) {
	  // skip name and '='
	  start += name.length + 1;

	  // find end of cookie value
	  var end = allCookies.indexOf(';', start);
	  if (end == -1)
	    end = allCookies.length;

	  // whip out the actual cookie value
	  return allCookies.substring(start, end);
	} else {
	  return "";
	}
      } else {
        return "";
      }
}


    var firstTime = true;
    function getCookie() {
      var theCookie = getNamedCookie(cycloneCookieName);

      if (theCookie != "") {
	// user's been here before
	firstTime = false;
	return theCookie;
      }

      // don't have a cookie, so build a new one and return it
      // default cookie values
      var preferred = -1;
      var type = 'O';
      var version = 0;

      if (navigator.userAgent.indexOf("MSIE") > 0) {
        // internet explorer
        type = 'E';
	version = parseInt(navigator.appVersion);

      } else if (navigator.userAgent.indexOf("Mozilla") >= 0) {
        // netscape
        type = 'N';
	version = parseInt(navigator.appVersion);

      }

      // global flag to note that the user hasn't saved a cookie yet
      firstTime = true;

      return preferred + type + version;
    }

function cookieStoreLinks(links) {
      var textLinks = links[0];
      var index = 0;
      for (index = 1; index < links.length; index++) {
        textLinks = textLinks + "," + links[index];
      }
      document.cookie = linksCookieName + "=" + textLinks + "; path=/; domain=.ssnp.com";
}

function cookieGetLinks() {
      return eval("new Array(" + getNamedCookie(linksCookieName) + ")");
}

function cookieStorePage() {
      document.cookie = pageCookieName + "=" + location.href + "; path=/; domain=.ssnp.com";
}

function cookieGetPage() {
      return getNamedCookie(pageCookieName);
}
