function makeSublist(parent,child,isSubselectOptional,childVal)
{
	$("body").append("<select style='display:none' id='"+parent+child+"'></select>");
	$('#'+parent+child).html($("#"+child+" option"));
	
	var parentValue = $('#'+parent).attr('value');
	$('#'+child).html($("#"+parent+child+" .sub_"+parentValue).clone());
	
	childVal = (typeof childVal == "undefined")? "" : childVal ;
	$("#"+child+' option[@value="'+ childVal +'"]').attr('selected','selected');
		
	$("#"+child).hide();
	$('#'+parent).change( 
		function()
		{
			var parentValue = $('#'+parent).attr('value');
			$('#'+child).html($("#"+parent+child+" .sub_"+parentValue).clone());
			if(isSubselectOptional) $('#'+child).prepend("<option value='0'> -- alege -- </option>");
			$('#'+child).trigger("change");
			$("#"+child).show();
                        $('#'+child).focus();
		}
	);
}
jQuery.fn.equalizeCols = function() {

       jQuery(this).filter(function() {return jQuery(this).find(".auto_fill").length == 0;}).each(function() {
       jQuery(this).append(jQuery("<div class='auto_fill'>&nbsp;</div>").height(0));
     }).css("height", "auto");

     var max_height= 0;

    jQuery(this).each(function() {
    var self= jQuery(this);
    var height= self.height() - self.find(".auto_fill").height();
    max_height=height > max_height ? height : max_height;
    });
    jQuery(this).each(function() {
         var self= jQuery(this);
         var height= self.height() - self.find(".auto_fill").height();
         self.find(".auto_fill").height(max_height - height);
     });
 }
