// Destroy complete collection
function destroyCollectionWarning(collection, collection_id, delete_collection_location, destroy_warning, yes_btn, no_btn)
{ 
  Dialog.confirm(destroy_warning, 
  { 
    windowParameters: {className: 'mockatoo', width: 420, title:"Confirm"}, okLabel: yes_btn, cancelLabel: no_btn, ok:function(win) 
                                                                                     {
                                                                                       deleteCollection(collection, collection_id, delete_collection_location); 
                                                                                       return true;
                                                                                     }
  });
}

function deleteCollection(collection, collection_id, delete_collection_location)
{
  collection = escape(collection);
  collection = collection.replace("+","%2B");
  window.location.href=delete_collection_location+"&collection="+collection+"&collection_id="+collection_id;
}