anchor.diff:      </td></tr>
   <script type="text/javascript">
       BS.Clouds.VMWareVSphere.init();
  -
  -    BS.Clouds.VMWareVSphere.refreshOptions();
  -    BS.Clouds.VMWareVSphere.restoreFromHidden();
   </script>
  
positive.code:                 },
  
                  onSuccess: function (response) {
                    $j(".images-list-wrapper").show(200);
                      var $root = $j(BS.Util.documentRoot(response)),
                          $vms = $root.find('VirtualMachines:eq(0) VirtualMachine'),
                          $pools = $root.find('ResourcePools:eq(0) ResourcePool'),
                          $folders = $root.find('Folders:eq(0) Folder'),
                          appendOption = function(target, value) {
                              target.append($j("<option>").attr("value", value).text(value));
                          };
  
                      if (! $vms.length) {
                          return;
                      }
  
                      $j('#image')
                          .find("option, optgroup").remove().end()
                          .append($j("<option>").val("").text("--Please select a VM--"))
                          .append($j("<optgroup>").attr("label", "Virtual machines"));
  
                      $vms.each(function () {
                          if ($j(this).attr('template') == 'false') {
                              appendOption($j("#image optgroup[label='Virtual machines']"), $j(this).attr('name'));
                          }
                      });
  
                      $j('#image').append($j("<optgroup>").attr("label", "Templates"));
  
                      $vms.each(function () {
                          if ($j(this).attr('template') == 'true') {
                              appendOption($j("#image optgroup[label='Templates']"), $j(this).attr('name'));
                          }
                      });
  
                      $j("#resourcePool").find("option").remove();
                      $pools.each(function () {
                          appendOption($j('#resourcePool'), $j(this).attr('name'));
                      });
  
                      $j("#cloneFolder").find("option").remove();
                      $folders.each(function () {
                          appendOption($j("#cloneFolder"), $j(this).attr('name'));
                      });
  
                      self.showOptions();
  
negative.code: 
              return false; // to prevent link with href='#' to scroll to the top of the page
          },
          validateOptions: function () {
              var cloneFolder = $j("#cloneFolder").val(),
                      resourcePool = $j("#resourcePool").val(),
                      cloneBehaviour = $j("#cloneBehaviour").val(),
                      maxInstances = $j("#maxInstances").val(),
                      isValid = true;
  
              // checking properties
              $j("#error_image").empty();
              $j("#error_cloneBehaviour").empty();
  
              if (!this.$image.val()) {
                  $j("#error_image").append($j("<div>").text("Please select a VM"));
                  isValid = false;
              }
              if (this.$image.find(":selected").parent().attr("label") == 'Templates' && cloneBehaviour == 'START') {
                  $j("#error_cloneBehaviour").append($j("<div>").text("Start/Stop mode is not available for readonly(template) VMs"));
                  isValid = false;
              }
              if ( !this.$snapshot.val()  && cloneBehaviour == "LINKED_CLONE") {
                  $j("#error_cloneBehaviour").append($j("<div>").text("Linked clone mode requires an existing snapshot"));
                  isValid = false;
              }
  
              return isValid;
          },
          addImage: function () {
              var vmName = $j("#image option:selected").text(),
                      snapshotName = $j("#snapshot option:selected").text(),
                      cloneFolder = $j("#cloneFolder").val(),
                      resourcePool = $j("#resourcePool").val(),
                      cloneBehaviour = $j("#cloneBehaviour").val(),
                      maxInstances = $j("#maxInstances").val();
  
              if (this.validateOptions()) {
                  this._addImage(vmName, snapshotName, cloneFolder, resourcePool, cloneBehaviour, maxInstances);
                  this.updateImagesData();
              }
  
              return false; // to prevent link with href='#' to scroll to the top of the page
          },
          _addImage: function (vmName, snapshotName, cloneFolder, resourcePool, cloneBehaviour, maxInstances) {
              this.$imagesList.append($j("<tr>")
                  .append($j("<td>").text(vmName))
                  .append($j("<td>").text(snapshotName))
                  .append($j("<td>").text(cloneFolder))
  