function checkIndexType(){$select_index_type=$("#select_index_type");$size_header=$("#index_columns thead tr th:nth-child(2)");$column_inputs=$('select[name="index[columns][names][]"]');$size_inputs=$('input[name="index[columns][sub_parts][]"]');$add_more=$("#addMoreColumns");if($select_index_type.val()=="SPATIAL"){$size_header.hide();$size_inputs.each(function(){$(this).attr("disabled",true).parent("td").hide()});var a=true;$column_inputs.each(function(){$column_input=$(this);if(a)a=false;else $column_input.attr("disabled",
true).parent("td").hide()});$add_more.hide()}else{$size_header.show();$size_inputs.each(function(){$(this).attr("disabled",false).parent("td").show()});$column_inputs.each(function(){$(this).attr("disabled",false).parent("td").show()});$add_more.show()}}$(document).ready(function(){checkIndexType();checkIndexName("index_frm");$("#select_index_type").live("change",function(a){a.preventDefault();checkIndexType();checkIndexName("index_frm")})});
