	function readCookie(cookieName) {
		if (document.cookie) {
			var whichChip = new RegExp("\\b" + cookieName + "=", "i");
			var index = document.cookie.search(whichChip);
			if (index != -1) {
				// Find the start 
				cookieStart = index + cookieName.length + 1;
				// Find the end 
				cookieStop = document.cookie.indexOf(";", index);
				if (cookieStop == -1) { cookieStop = document.cookie.length }
				// with the start and the end... now you've got the whole thing 
				return document.cookie.substring(cookieStart, cookieStop)
			}
			else return false;
		}
		return false;
	}//readCookieCore
	var moment1 = new Date();
	var moment2 = new Date(moment1.getUTCFullYear() + 1, moment1.getUTCMonth(), moment1.getUTCDate() );
	var moment0 = new Date(moment1.getUTCFullYear() - 1, moment1.getUTCMonth(), moment1.getUTCDate() );
	function setCookie (name,value,expires,path,domain,secure) {
	   document.cookie = name + "=" + value +
	   ((expires)	? ";expires=" + expires.toUTCString() : "") +
	   ((path)		? ";path=" + path : "") +
	   ((domain)	? ";domain=" + domain : "") +
	   ((secure)	? ";secure" : "");
	}
/*******************************************************************/
/***                                                             ***/
/***   Tokenizer.js - JavaScript String Tokenizer Function       ***/
/***                                                             ***/
/***   Version   : 0.2                                           ***/
/***   Date      : 01.05.2005                                    ***/
/***   Copyright : 2005 Adrian Zentner                           ***/
/***   Website   : http://www.adrian.zentner.name/               ***/
/***                                                             ***/
/***   This library is free software. It can be freely used as   ***/
/***   long as this this copyright notice is not removed.        ***/
/***                                                             ***/
/*******************************************************************/
String.prototype.tokenize = tokenize;
function tokenize()
  {
     var input             = "";
     var separator         = " ";
     var trim              = "";
     var ignoreEmptyTokens = true;
     try {
       String(this.toLowerCase());
     }
     catch(e) {
       //window.alert("Tokenizer Usage: string myTokens[] = myString.tokenize(string separator, string trim, boolean ignoreEmptyTokens);");
       return;
     }
     if(typeof(this) != "undefined")
       {
          input = String(this);
       }
     if(typeof(tokenize.arguments[0]) != "undefined")
       {
          separator = String(tokenize.arguments[0]);
       }
     if(typeof(tokenize.arguments[1]) != "undefined")
       {
          trim = String(tokenize.arguments[1]);
       }
     if(typeof(tokenize.arguments[2]) != "undefined")
       {
          if(!tokenize.arguments[2])
            ignoreEmptyTokens = false;
       }
     var array = input.split(separator);
     if(trim)
       for(var i=0; i<array.length; i++)
         {
           while(array[i].slice(0, trim.length) == trim)
             array[i] = array[i].slice(trim.length);
           while(array[i].slice(array[i].length-trim.length) == trim)
             array[i] = array[i].slice(0, array[i].length-trim.length);
         }
     var token = new Array();
     if(ignoreEmptyTokens)
       {
          for(var i=0; i<array.length; i++)
            if(array[i] != "")
              token.push(array[i]);
       }
     else
       {
          token = array;
       }
     return token;
  }//tokenize
   var pantry="oolpantry";
   var delimiter="|";
   var domain=".optimum.net";
   function addPantryCookie(aCookieName,aCookieValue){
//       alert("add: "+aCookieName+" "+aCookieValue);
       var aCookie=readCookie(pantry);
       if (aCookie==false) aCookie="";
	   var aggregateCookieValue="";
       var tokens = aCookie.tokenize(delimiter, " ", true);
       aCookie=false;
       for(var i=0; i<tokens.length; i++){
          if (tokens[i].indexOf(aCookieName+"=")!=0) aggregateCookieValue+=tokens[i]+delimiter;   
       }  //for
	   aggregateCookieValue+=aCookieName+"="+aCookieValue;
	   setCookie(pantry,aggregateCookieValue,moment2,"/",domain);
   }//addPantryCokkie
   function removePantryCookie(cookieName){
       var aCookie=readCookie(pantry);
       if (aCookie==false) return false;//there is no aggregated cookie
       //else we have to tokenize aggregated cookie and check inside
       var tokens = aCookie.tokenize(delimiter, " ", true);
       aCookie=false;
	   var cookies="";
       for(var i=0; i<tokens.length; i++){
          if (tokens[i].indexOf(cookieName+"=")!=0) {
		     cookies+=tokens[i]+delimiter;
          }   //if
       }//for
	   setCookie(pantry,cookies,moment2,"/",domain);
   }//remove
   function getPantryCookie(cookieName){
       var aCookie=readCookie(pantry);
       if (aCookie==false) return false;//there is no aggregated cookie
       var tokens = aCookie.tokenize(delimiter, " ", true);
       aCookie=false;
       for(var i=0; i<tokens.length; i++){
          if (tokens[i].indexOf(cookieName+"=")==0) {
             aCookie=tokens[i].substring((cookieName+"=").length);
          }   
       }   
       return aCookie;   
    }//getPantryCookie
