function makeSublist(parent, child, options) {
    $("body").append("<select style='display:none' id='"+parent+child+"'></select>");
    $('#'+parent+child).html($("#"+child+" option"));
    $('#'+child).html("<option> --- </option>");
    $('#'+child).parents('tr').css('display', 'none');
    $('#'+parent).change(
        function()
        {
            var parentValue = $('#'+parent).attr('value');
            if( jQuery.inArray( parentValue, options) == -1 ){
                $('#'+child).parents('tr').css('display', 'none');
                $('#'+child).removeAttr('validate');
                $('#'+child).removeAttr('title');
            } else {
                $('#'+child).html('<option>Select a category</option>');
                $('#'+child).append($("#"+parent+child+" .sub_"+parentValue).clone());
                $('#'+child).attr('validate','required:true');
                $('#'+child).attr('title', 'Please select something!');
                $('#'+child).parents('tr').removeAttr('style');
            }
        }
    );
}


