$(document).ready(function(){$("#rename_db_form.ajax").live("submit",function(a){a.preventDefault();a=$(this);var b=escapeHtml("CREATE DATABASE "+$("#new_db_name").val()+" / DROP DATABASE "+window.parent.db);PMA_prepareForAjaxRequest(a);var d={};d[PMA_messages.strYes]=function(){$(this).dialog("close").remove();window.parent.refreshMain();window.parent.refreshNavigation()};d[PMA_messages.strNo]=function(){$(this).dialog("close").remove()};a.PMA_confirm(b,a.attr("action"),function(e){PMA_ajaxShowMessage(PMA_messages.strRenamingDatabases,
false);$.get(e,$("#rename_db_form").serialize()+"&is_js_confirmed=1",function(c){if(c.success==true){PMA_ajaxShowMessage(c.message);window.parent.db=c.newname;$("#floating_menubar").next("div").remove().end().after(c.sql_query);c=$("#floating_menubar").next("div").find(".notice");c.text()==""&&c.remove();$("<span>"+PMA_messages.strReloadDatabase+"?</span>").dialog({buttons:d})}else PMA_ajaxShowMessage(c.error,false)})})});$("#copy_db_form.ajax").live("submit",function(a){a.preventDefault();PMA_ajaxShowMessage(PMA_messages.strCopyingDatabase,
false);a=$(this);PMA_prepareForAjaxRequest(a);$.get(a.attr("action"),a.serialize(),function(b){$(".success").fadeOut();$(".error").fadeOut();if(b.success==true){PMA_ajaxShowMessage(b.message);if($("#checkbox_switch").is(":checked")){window.parent.db=b.newname;window.parent.refreshMain();window.parent.refreshNavigation()}else window.parent.refreshNavigation(true)}else PMA_ajaxShowMessage(b.error,false)})});$("#change_db_charset_form.ajax").live("submit",function(a){a.preventDefault();a=$(this);PMA_prepareForAjaxRequest(a);
PMA_ajaxShowMessage(PMA_messages.strChangingCharset);$.get(a.attr("action"),a.serialize()+"&submitcollation="+a.find("input[name=submitcollation]").attr("value"),function(b){b.success==true?PMA_ajaxShowMessage(b.message):PMA_ajaxShowMessage(b.error,false)})})},"top.frame_content");
