 				<input type="hidden" name="partID">
 			</table>
 		</form>
+		---->
 		<a name="newPart"></a>
 		<table class="newRec">
 			<tr>

				loan_item.collection_object_id=specimen_part.collection_object_id AND
				specimen_part.derived_from_cat_item=#collection_object_id#
		</cfquery>
	 	<b>Edit #getParts.recordcount# Specimen Parts</b>&nbsp;<span class="helpLink" data-helplink="parts">help</span>
		<br><a href="/findContainer.cfm?collection_object_id=#collection_object_id#">Part Locations</a>
		<cfset i = 1>
		<cfset listedParts = "">
		<form name="parts" method="post" action="editParts.cfm">
			<input type="hidden" name="action" value="saveEdits">
			<input type="hidden" name="collection_object_id" value="#collection_object_id#">

			<cfdump var=#getParts#>


			<table border>
				<cfloop query="getParts">
					<cfif len(getParts.partID) gt 0>
						<input type="hidden" name="partID#i#" id="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 there are 2 parts in different containers -
						voodoo solution, but it works.....
						---->
						<cfif not listcontains(listedParts, getParts.partID)>
							<cfset listedParts = "#listedParts#,#getParts.partID#">
							<cfif i mod 2 eq 0>
								<cfset bgc = "##C0C0C0">
							<cfelse>
								<cfset bgc="##F5F5F5">
							</cfif>
							<cfset lblClr = "red">
							<cfif len(sampled_from_obj_id) gt 0>
								<cfset bgc="##669999">
							</cfif>
							<tr bgcolor="#bgc#">
								<td>
									<label for="part_name#i#">
										Part
										<cfif len(sampled_from_obj_id) gt 0>
											Subsample
										</cfif>
										&nbsp;<span class="likeLink" style="font-weight:100" onClick="getCtDoc('ctspecimen_part_name')">[ Define values ]</span>
									</label>
									<input type="text" name="part_name#i#" id="part_name#i#" class="reqdClr"
										value="#getParts.part_name#" size="25"
										onchange="findPart(this.id,this.value,'#thisCollectionCde.collection_cde#');"
										onkeypress="return noenter(event);">
								</td>
								<td>
									<label for="coll_obj_disposition#i#">Disposition</label>
									<select name="coll_obj_disposition#i#" id="coll_obj_disposition#i#" size="1" class="reqdClr" style="width:150px";>

							</tr>
							<cfset i = i+1>
						</cfif><!---- end of the list ---->
						---->
				</cfloop>

				<!----


		<tr>
			<td>
				<div style="padding-left:#pdg#em;">
					#p.part_name#
				</div>
			</td>
			<td>#p.part_condition#</td>
			<td>#p.part_disposition#</td>
			<td>#p.lot_count#</td>
			<cfif oneOfUs is 1>
				<td>#p.label#</td>
				<td>#p.barcode#</td>
				<td>#replace(p.FCTree,':','←<wbr>','all')#</td>
				<cfquery dbtype="query" name="tlp">
					select * from l_q where transaction_id is not null and collection_object_id=#pid#
				</cfquery>
				<td>
					<cfloop query="tlp">
						<div>
							<a href="/Loan.cfm?action=editLoan&transaction_id=#transaction_id#">#loan_number# (#LOAN_STATUS#)</a>
						</div>
					</cfloop>
				</td>
			</cfif>
			<td>#p.part_remarks#</td>
		</tr>
		<cfquery name="patt" dbtype="query">
			select
				attribute_type,
				attribute_value,
				attribute_units,
				determined_date,
				attribute_remark,
				agent_name
			from
				p_q
			where
				attribute_type is not null and
				part_id=#pid#
			group by
				attribute_type,
				attribute_value,
				attribute_units,
				determined_date,
				attribute_remark,
				agent_name
			order by
				attribute_type,
				determined_date
		</cfquery>
		<cfif patt.recordcount gt 0>
			<tr>
				<td colspan="6">
					<div style="padding-left:#level#em;">

					<table border id="patbl#pid#" class="detailCellSmall sortable">
						<tr>
							<th>
								Attribute
							</th>
							<th>
								Value
							</th>
							<th>
								Date
							</th>
							<th>
								Dtr.
							</th>
							<th>
								Rmk.
							</th>
						</tr>
						<cfloop query="patt">
							<tr>
								<td>
									#attribute_type#
								</td>
								<cfif not(oneOfUs) and attribute_type is "location" and one.encumbranceDetail contains "mask part attribute location">
									<td>masked</td>
									<td>-</td>
									<td>-</td>
									<td>-</td>
								<cfelse>
									<td>#attribute_value# <cfif len(attribute_units) gt 0>#attribute_units#</cfif></td>
									<td>#dateformat(determined_date,'yyyy-mm-dd')#</td>
									<td>#agent_name#</td>
									<td>#attribute_remark#</td>
								</cfif>
							</tr>
						</cfloop>
					</table>
					</div>
				</td>
			</tr>
		</cfif>
		---->
	</cfsavecontent>
<cfreturn r>
</cffunction>











	<b>Edit #orderedparts.recordcount# Specimen Parts</b>&nbsp;<span class="helpLink" data-helplink="parts">help</span>
		<br><a href="/findContainer.cfm?collection_object_id=#collection_object_id#">Part Locations</a>

<form name="parts" method="post" action="editParts.cfm">
			<input type="hidden" name="action" value="saveEdits">
			<input type="hidden" name="collection_object_id" value="#collection_object_id#">



			<table border>
				<cfloop query="orderedparts">

					<cfset zxc=getChildParts(part_id,level,raw,ploan)>
								#zxc#


				</cfloop>
			</table>
		</form>

<!----



		<!--- just parts ---->
		<cfquery name="partsOnly" dbtype="query">
			select
				partID,
				part_name,
				coll_obj_disposition,
				condition,
				sampled_from_obj_id,
				lot_count,
				barcode,
				label,
				parentContainerId,
				partContainerId,
				coll_object_remarks
			from
				raw
			where
				partID is not null and
				sampled_from_obj_id is null
			group by
				partID,
				part_name,
				coll_obj_disposition,
				condition,
				sampled_from_obj_id,
				lot_count,
				barcode,
				label,
				parentContainerId,
				partContainerId,
				coll_object_remarks
			order by
				part_name
		</cfquery>
		<!--- just the object, no data ---->
		<cfquery name="getParts" dbtype="query">
			select
				'' as ordr,
				partID,
				part_name,
				coll_obj_disposition,
				condition,
				sampled_from_obj_id,
				lot_count,
				barcode,
				label,
				parentContainerId,
				partContainerId,
				coll_object_remarks
			from raw
			where
			1=2
		</cfquery>
		<cfset rnum=1>
		<cfloop query="partsOnly">
			<cfset queryAddRow(getParts)>
			<cfset querySetCell(getParts,"ordr",rnum,rnum)>
			<cfset querySetCell(getParts,"partID",partID,rnum)>
			<cfset querySetCell(getParts,"part_name",part_name,rnum)>
			<cfset querySetCell(getParts,"coll_obj_disposition",coll_obj_disposition,rnum)>
			<cfset querySetCell(getParts,"condition",condition,rnum)>
			<cfset querySetCell(getParts,"sampled_from_obj_id",sampled_from_obj_id,rnum)>
			<cfset querySetCell(getParts,"lot_count",lot_count,rnum)>
			<cfset querySetCell(getParts,"barcode",barcode,rnum)>
			<cfset querySetCell(getParts,"label",label,rnum)>
			<cfset querySetCell(getParts,"parentContainerId",parentContainerId,rnum)>
			<cfset querySetCell(getParts,"partContainerId",partContainerId,rnum)>
			<cfset querySetCell(getParts,"coll_object_remarks",coll_object_remarks,rnum)>
			<cfset rnum=rnum+1>
			<cfquery name="thisSS" dbtype="query">
				select
					partID,
					part_name,
					coll_obj_disposition,
					condition,
					sampled_from_obj_id,
					lot_count,
					barcode,
					label,
					parentContainerId,
					partContainerId,
					coll_object_remarks
				from
					raw
				where
					sampled_from_obj_id=#partID#
				order by
					part_name
			</cfquery>
			<cfloop query="thisSS">
				<cfset queryAddRow(getParts)>
				<cfset querySetCell(getParts,"ordr",rnum,rnum)>
				<cfset querySetCell(getParts,"partID",partID,rnum)>
				<cfset querySetCell(getParts,"part_name",part_name,rnum)>
				<cfset querySetCell(getParts,"coll_obj_disposition",coll_obj_disposition,rnum)>
				<cfset querySetCell(getParts,"condition",condition,rnum)>
				<cfset querySetCell(getParts,"sampled_from_obj_id",sampled_from_obj_id,rnum)>
				<cfset querySetCell(getParts,"lot_count",lot_count,rnum)>
				<cfset querySetCell(getParts,"barcode",barcode,rnum)>
				<cfset querySetCell(getParts,"label",label,rnum)>
				<cfset querySetCell(getParts,"parentContainerId",parentContainerId,rnum)>
				<cfset querySetCell(getParts,"partContainerId",partContainerId,rnum)>
				<cfset querySetCell(getParts,"coll_object_remarks",coll_object_remarks,rnum)>
				<cfset rnum=rnum+1>
			</cfloop>
		</cfloop>

	 	<b>Edit #getParts.recordcount# Specimen Parts</b>&nbsp;<span class="helpLink" data-helplink="parts">help</span>
		<br><a href="/findContainer.cfm?collection_object_id=#collection_object_id#">Part Locations</a>
		<cfset i = 1>
		<cfset listedParts = "">
		<form name="parts" method="post" action="editParts.cfm">
			<input type="hidden" name="action" value="saveEdits">
			<input type="hidden" name="collection_object_id" value="#collection_object_id#">

			<cfdump var=#getParts#>


			<table border>

				<tr bgcolor="##00CC00">
					<td colspan="10" align="center">
						<input type="button" value="Save All Changes" class="savBtn"
