 											newPart.coll_obj_disposition.value='#coll_obj_disposition#';
 											newPart.condition.value='#condition#';
 											newPart.coll_object_remarks.value='#coll_object_remarks#';">
+									<input type="button"
+										value="Subsample"
+										class="insBtn"
+										onClick="createSubsample(#i#)">
 
 								</td>
 							</tr>

			<table border>
				<cfloop query="getParts">
					<cfif len(getParts.partID) gt 0>
						<input type="hidden" name="partID#i#" value="#getParts.partID#">
						<!--- next couple lines and the if statement stop us from putting the same part in the
						grid twice, which seems to happen when tehre are 2 parts in different containers -
						voodoo solution, but it works.....

			$(".reqdClr:visible").each(function(e){
			    $(this).prop('required',true);
			});
			function createSubsample(i){
				 var r = confirm("Create a new part as a subsample of this part?");
				 if (r == true) {
				 	newPart.parent_part_id.value=$("#partID" + i).val();
				 	newPart.part_name.value=$('#part_name#' + i).val();
					newPart.lot_count.value=$('#lot_count#' + i).val();
					newPart.coll_obj_disposition.value=$('#coll_obj_disposition#' + i).val();
					newPart.condition.value=$('#condition#' + i).val();
					newPart.coll_object_remarks.value=$('#coll_object_remarks#' + i).val();
				}
			}
		});
	</script>
	<cfoutput>
