+#### JAVA SCRIPT ####
+print<<END;
+<script>
+ \$(document).ready(function() {
+ // Automatically select radio buttons when corresponding
+ // dropdown menu changes.
+ \$("select").change(function() {
+ var id = \$(this).attr("name");
+ //When using SNAT or DNAT, check "USE NAT" Checkbox
+ if ( id === 'snat' || id === 'dnat') {
+ \$('#USE_NAT').prop('checked', true);
+ }
+ \$('#' + id).prop("checked", true);
+ });
+ });
+</script>
+END
+