bool getblock(string blockname, out	EmbeddedData gotblock)
        {
            EmbeddedData block;

            if(blocks.TryGetValue(blockname,out block))
            {
                gotblock=block;
                return true;
            }
            gotblock=null;
            return false;
        }
        string decodenote(string note)
        {
            nd=new EmbeddedData();
            int stm=nd.parsedata(note);
            int index=0;

            //NOTE opensim brokenness here
            if(nd.blocks.ContainsKey("Linden text version"))
            {
            foreach(EmbeddedData data in nd.blocks["Linden text version"].blocks["LLEmbeddedItems version"].unamed_blocks)
            {
                    UUID id=new UUID(data.blocks["inv_item"].keys["item_id"]);
                    UUID asset_id=new UUID(data.blocks["inv_item"].keys["asset_id"]);
                    char [] trim={'|'};
                    string name=" "+data.blocks["inv_item"].keys["name"].TrimEnd(trim);
                    string assettype=data.blocks["inv_item"].keys["type"];
                    AssetType type=AssetType.Unknown;
                    if(assettype=="notecard")
                        type=AssetType.Notecard;
                    if(assettype=="landmark")
                        type=AssetType.Landmark;

                    EmbeddedInventory item=new EmbeddedInventory(asset_id,id,UUID.Zero,index,name,type);
                    embedded_inv.Add(index,item);
                    index++;
            }

            return(note.Substring(stm,(note.Length-stm)-2)); //loose 2 bytes to remove the closing }
            }
            else
            {
                return note;
            }
        }
        EmbeddedData addblock(string blockname)
        {
            EmbeddedData new_block=new EmbeddedData();
            if(blockname=="count")
            {
                unamed_blocks.Add(new_block);
            }
            else
            {
                if(blocks.ContainsKey(blockname))
                {
                    Logger.Log("Failed to create a block of name "+blockname,Helpers.LogLevel.Debug);
                }
                else
                {
                    blocks.Add(blockname,new_block);
                }
            }

            return new_block;
        }