 	.edited{background:#eaa8b4;}
 </style>
 <script>
-	function doneSaving(){
-		$('#frame_ctspid').remove();
-		$('#annotateDiv').remove();
-		$('#bgDiv').remove();
-	}
-	function deletePart(ctspnid){
-		var answer = confirm("Delete Part?")
-		if (answer){
-			$.getJSON("/component/functions.cfc",
-				{
-					method : "deleteCtPartName",
-					ctspnid : ctspnid,
-					returnformat : "json",
-					queryformat : 'column'
-				},
-				function(r) {
-					if (r == ctspnid) {
-						$('tr#r' + ctspnid).remove();
-					} else {
-						alert('An error occured! \n ' + r);
-					}
-				}
-			);
-		}
-	}
-
-
-
-
-
 	function updatePart(pn) {
-
 		var rid='prow_' + pn.replace(/\W/g, '_');
-		console.log(rid);
-
-
-
 		$("#" + rid).addClass('edited');
-
-
 		var guts = "/includes/forms/f2_ctspecimen_part_name.cfm?part_name=" + encodeURI(pn);
 		$("<iframe src='" + guts + "' id='dialog' class='popupDialog' style='width:600px;height:600px;'></iframe>").dialog({
 			autoOpen: true,

</cfif>
<cfif action is "insert">
	<cfquery name="d" datasource="user_login" username="#session.dbuser#" password="#decrypt(session.epw,session.sessionKey)#">
		select count(*) from ctspecimen_part_name where part_name='#part_name#' and
		(
			nvl(description,'NULL') != nvl('#description#','NULL') or
			is_tissue != #is_tissue#
		)
	</cfquery>
	<cfif d.recordcount gt 0>
		Definition and tissue status must match across collections.<cfabort>
	</cfif>
	<cfquery name="sav" datasource="user_login" username="#session.dbuser#" password="#decrypt(session.epw,session.sessionKey)#">
		insert into ctspecimen_part_name (

		});
	}

</script>


