var cCookie = document.cookie;

  var today = new Date();
  var expiry = new Date(today.getTime() + 14 * 24 * 60 * 60 * 1000); // plus 14 days

  function setCookie(name, value) { // use: setCookie("name", value);
    if (value != null && value != "")
      document.cookie=name + "=" + escape(value) + "; expires=" + expiry.toGMTString();
    cCookie = document.cookie; // update cCookie
  }

  function setCookieRoot(name, value) { // use: setCookie("name", value);
    if (value != null && value != "")
      document.cookie=name + "=" + escape(value) + "; expires=" + expiry.toGMTString() + "; path=";
    cCookie = document.cookie; // update cCookie
  }

  function getCookie(name) { // use: getCookie("name");
    var index = cCookie.indexOf(name + "=");
    if (index == -1) return null;
    index = cCookie.indexOf("=", index) + 1; // first character
    var endstr = cCookie.indexOf(";", index);
    if (endstr == -1) endstr = cCookie.length; // last character
    return unescape(cCookie.substring(index, endstr));
  }
  
var nexturl = "";
function CkURL()
	{
	setCookie("cookiesallowed","true"); // checks if they allow cookies
	if ( nexturl != "" )
	  nexturl="" ;
	else
  	  if (!getCookie("alreadyasked") && getCookie("cookiesallowed") ) 
	  {
	    setCookie("alreadyasked","true");
	    if ((navigator.platform=="Win32") && (navigator.appName=="Microsoft Internet Explorer") && (parseInt(navigator.appVersion)>=4) &&
	       confirm(bookmarkmessage))
		    AddFav();
	    else
	      return false ;	
      }
    else
      return false ;	
	}

  // on index page to show promo price if promo cookie set	
  function CkCookie() {
  if (getCookie("promo")) {
    // if there is a promo cookie, go to home.  
	// Home will set the promo literal based on the cookie value
    self.location.href = "";
  }
  }	
  
  //  Type this into the address of the web browser to see what cookies are set
  //   JavaScript:alert(document.cookie);
