turn;
      }

      var img = domFC(this);
      while (img && img.tagName != 'IMG') {
        img = domNS(img);
      }
      if (img) {
        list[listId][3] = img.getAttribute('src');
        delete byHref[href];
      }
    });
    cur.wallMentions = list;
  },

  initUpdates: function (key) {
    if (!key || !window.Notifier) {
      return;
    }
    var wasKey = cur.wallAddQueue,
        checkCb = function () {if (cur.wallAddQueue) Notifier.addKey(cur.wallAddQueue, Wall.updated.pbind(false));};

    cur.wallAddQueue = key;
    checkCb();
    if (!wasKey) {
      checkInt = setInterval(checkCb, 10000);
      cur.destroy.push(function () {clearInterval(checkInt)});
    }
  },

  initWallOptions: function (opts) {
    extend(cur, {
      wallType: opts.wall_type,
      wallTpl: opts.wall_tpl,
      wallMyDeleted: {},
      tsDiff: opts.wall_tpl && opts.wall_tpl.abs_timestamp ? Math.round((vkNow() / 1000 - opts.wall_tpl.abs_timestamp) / 900.0) * 900 : 0,
      wallMyOpened: {},
      wallMyReplied: {},
      wallMentions: [],
      wallMyRepliesCnt: 0
    });
    if (opts.wall_tpl && opts.wall_tpl.lang) {
      cur.lang = extend(cur.lang || {}, opts.wall_tpl.lang);
    }

    window.Notifier && Notifier.addRecvClbk('wall_reply_multiline', 'wall', function(data) {
      Wall.onReplySubmitChanged(data.value, 1);
    }, true);
  },

  init: function(opts) {
    Wall.initWallOptions(opts);

    extend(cur, {
      wallInited: true,
      postField: ge('post_field'),
      wallPage: ge('profile') || ge('group') || ge('public'),
      wallPageNarrow: ge('profile_narrow') || ge('group_narrow'),
      wallPageWide: false,
      wallUploadOpts: opts.upload || false,
      deletedCnts: {own: 0, all: 0}
    });

    cur.destroy.push(function(c) {
      cleanElems(c.postField);
    });
    var rem = removeEvent.pbind(document, 'click', Wall.hideEditPostReply);

    if (cur._back) {
      cur._back.hide.push(rem);
      cur._back.show.push(rem);
      cur._back.show.push(addEvent.pbind(document, 'click', Wall.hideEditPostReply));
    } else {
      cur.destroy.push(rem);
    }
    var ownCnt = ge('page_wall_count_own');
    if (cur.wallType == 'own' && !intval(ownCnt && ownCnt.value)) {
      cur.wallType = ge('page_wall_posts').className = 'all';
    }
    Wall.update();
    Wall.initUpdates(opts.add_queue_key);

    // Times update interval. For relative time correction
    if (opts.wall_tpl) {
      cur.timeUpdateInt = setInterval(function () {Wall.updateTimes(opts.wallCont);}, 10000);
      cur.destroy.push(function () {clearInterval(cur.timeUpdateInt);});
    }

    if (opts.draft) {
      Wall.setDraft(opts.draft);
    }

    var scrollNode = browser.msie6 ? pageNode : window;
    addEvent(scrollNode, 'scroll', Wall.scrollCheck);
    addEvent(window, 'resize', Wall.scrollCheck);
    cur.destroy.push(function () {
      removeEvent(scrollNode, 'scroll', Wall.scrollCheck);
      removeEvent(window, 'resize', Wall.scrollCheck);
    });
    cur.wallAutoMore = opts.automore;

    placeholderSetup(cur.postField, { pad: { pa<meta charset="UTF-8"/>
//----------------------------------------------
// Resource file for CATGuiMidSurfacePanel class
// En_US
//----------------------------------------------

Title="Mid Surface Definition";

Frame1.InputSolid.Title="Support: ";
Frame1.ComboList.Title="Creation Mode: ";

FraFace1.SelFacePairsList.FraList.LongHelp=
"List of selected face pairs.
 Multi-selection is allowed with CTRL or SHIFT key.
 Edition capabilities are available in contextual menu.";


Col0="N";
Col1="Main Side";
Col2="Other Side";

FraFace1.SelFacePairsList.FacePairsContextMenu.RemoveFacePairsItem.Title="Remove selected pairs";
FraFace1.SelFacePairsList.FacePairsContextMenu.SwapFacePairsItem.Title="Swap selected pairs";
FraFace1.SelFacePairsList.FacePairsContextMenu.ReplaceSecondFacePairItem.Title="Replace other side face";
FraFace1.SelFacePairsList.FacePairsContextMenu.PropagateFacePairItem.Title="Propagate selected pair";
FraFace1.SelFacePairsList.FacePairsContextMenu.FindInvalidFacePairsItem.Title="Find invalid pairs";


Frame2.FraLittOffsetRatio.EnglobingFrame.IntermediateFrame.Label.Title="Offset ratio: ";
Frame2.FraLittOffsetRatio.Label.Title="Offset ratio: "; //for record mode

Frame2.SeparatorRibs.TitleLabel.Title="Ribs management";

Frame2.SelLimitingMidSurface.FraEdt.Lab.Title="Limiting mid surface: ";

Frame2.CheckLaunchAfterOK.Title="Create a new rib mid surface after OK";

FraFace2.SelectorAndCombo.LabFacesToOffset.Title="Faces To Offset: ";
FraFace2.SelectorAndCombo.LabCompMode.Title="Computation Mode: ";

FraFace2.FraMode1.FraLittOffsetValue.EnglobingFrame.IntermediateFrame.Label.Title="Offset: ";
FraFace2.FraMode1.FraLittOffsetValue.Label.Title="Offset: "; //for record mode
FraFace2.FraMode1.UpdateIcon.Title="Update";

MidSurfaceTypeFacePairs="Face Pairs";
MidSurfaceTypeFacesToOffset="Faces To Offset";
MidSurfaceTypeAutomatic="Automatic";

FraFace3.FraThreshold.EnglobingFrame.IntermediateFrame.Label.Title="Thickness Threshold:  ";
FraFace3.FraThreshold.Label.Title="Thickness Threshold:  "; //for record mode

AutomaticMin="Minimum";
AutomaticMax="Maximum";
AutomaticAvg="Average";

FacesToOffsetManual="Manual";
FacesToOffsetAutomatic="Automatic";

FraFace2.FraMode2.LabCompMeth.Title="Computation Method: ";
FraFace2.FraMode2.FraThreshold.EnglobingFrame.IntermediateFrame.Label.Title="Thickness Threshold: ";
FraFace2.FraMode2.FraThreshold.Label.Title="Thickness Threshold: "; //for record mode



