function floodprotection_change() {
var protection = document.getElementById('floodprotection_checkbox');
var rate = document.getElementById('floodrate');
var burst = document.getElementById('floodburst');
if (protection.checked) {
rate.removeAttribute('disabled');
burst.removeAttribute('disabled');
} else {
rate.disabled = 'disabled';
burst.disabled = 'disabled';
}
}
function serverlist_init($) {
function serialize() {
var text = "";
$("#servers_tbody > tr").each(function() {
var host = $(".servers_row_host", $(this)).val();
var port = $(".servers_row_port", $(this)).val();
var ssl = $(".servers_row_ssl", $(this)).is(":checked");
var pass = $(".servers_row_pass", $(this)).val();
if (host == undefined) return;
text += host;
text += " ";
if (ssl) text += "+";
text += port;
text += " ";
text += pass;
text += "\n";
});
$("#servers_text").val(text);
}
function add_row(host, port, ssl, pass) {
var row = $("
");
function delete_row() {
row.remove();
serialize();
}
row.append(
$("