code: function (name /*:String*/, value /*:Variant*/, encodeValue /*:Boolean*/, options /*:Object*/) /*:String*/ {
          
          //shortcut
          var lang = YAHOO.lang,
              text = encodeURIComponent(name) + "=" + (encodeValue ? encodeURIComponent(value) : value);
          
          
          if (lang.isObject(options)){
              //expiration date
              if (options.expires instanceof Date){
                  text += "; expires=" + options.expires.toUTCString();
              }
              
              //path
              if (lang.isString(options.path) && options.path !== ""){
                  text += "; path=" + options.path;
              }
              
              //domain
              if (lang.isString(options.domain) && options.domain !== ""){
                  text += "; domain=" + options.domain;
              }
              
              //secure
              if (options.secure === true){
                  text += "; secure";
              }
          }
          
          return text;
      }
docs: ------------------------------------------------------------------------- Private Methods ------------------------------------------------------------------------- 
  Creates a cookie string that can be assigned into document.cookie.
  @param {String} name The name of the cookie.
  @param {String} value The value of the cookie.
  @param {Boolean} encodeValue True to encode the value, false to leave as-is.
  @param {Object} options (Optional) Options for the cookie.
  @return {String} The formatted cookie string.
  @method _createCookieString
  @private
  @static