function makeSublist(parent,child,isSubselectOptional,childVal)
{
	$("body").append("<select style='display:none' id='"+parent+child+"'></select>");
	$('#'+parent+child).html($("#"+child+" option"));

    var parentID = $('#'+parent + ' :selected').attr('id');
	$('#'+child).html($("#"+parent+child+" .sub_"+parentID).clone());

    if(isSubselectOptional) $('#'+child).prepend("<option value=''> -- Select -- </option>");

	childVal = (typeof childVal == "undefined")? "" : childVal ;
	$("#"+child).val(childVal).attr('selected','selected');

	$('#'+parent).change(function(){

		var parentID = $('#'+parent + ' :selected').attr('id');
        $('#'+child).html($("#"+parent+child+" .sub_"+parentID).clone());
        if(isSubselectOptional) $('#'+child).prepend("<option value='' selected='selected'> -- Select -- </option>");
		$('#'+child).trigger("change");
		$('#'+child).focus();
	});
}

