anchor.diff:  	}else{
   		document.getElementById("resubmitButton").value = "Submit";
   	}
  -}		
  +}
  +function getJsonFromGrid(){
  +//"Label,Barcode,Quantity,Storage Container,Position 1,Position 2,Container Map,"
  +	
  +	var aliquotArray = new Array();
  +	for(var cnt=1;cnt<aliquotGrid.getRowsNum();cnt++){
  +		var aliquotObj = {
  +			quantity:aliquotGrid.cellByIndex(cnt,2).getValue(),
  +			aliqoutLabel:aliquotGrid.cellByIndex(cnt,0).getValue(),
  +			storagecontainer:aliquotGrid.cellByIndex(cnt,3).getValue(),
  +			pos1:aliquotGrid.cellByIndex(cnt,4).getValue(),
  +			pos2:aliquotGrid.cellByIndex(cnt,5).getValue(),
  +			barCode:aliquotGrid.cellByIndex(cnt,1).getValue()/*,
  +			aliquotId:aliquotGrid.cellByIndex(cnt,7).getValue()*/
  +		};
  +		aliquotArray[cnt-1] = aliquotObj;
  +	}
  +	return aliquotArray;
  +}
   function onResubmit(validated,label){
   	var aliquotCount = document.getElementById("noOfAliquots").value;
   	var quantityPerAliquot = document.getElementById("quantityPerAliquot").value;
  
positive.code: 	}else{
  		 specimenLabel = label
  	}
  	
  	var loader=dhtmlxAjax.postSync("GetAliquotInfoAjax.do",'validated='+validated+'&searchBasedOn='+searchBasedOn+'&parentSpecimentLabel='+specimenLabel+"&aliquotCount="+aliquotCount+"&quantityPerAliquot="+quantityPerAliquot);
  		
  			if(loader.xmlDoc.responseText != null)
  			{
  				var response = eval('('+loader.xmlDoc.responseText+')')
  				if(response.success=="true"){
  					document.getElementById("aliquotDetailsDiv").style.display="block";
  					document.getElementById('error').style.display='none';
  					document.getElementById('errorMsg').innerHTML="";
  					document.getElementById('success').style.display='none';
  					var aliquotDetailsDTO = eval('('+response.aliquotDetailsDTO+')')
  					document.getElementById("ali_currentAvailableQuantity").innerHTML = aliquotDetailsDTO.currentAvailableQuantity+" "+ response.unit;;
  					if(aliquotDetailsDTO.concentration!=undefined)
  					document.getElementById("ali_concentration").innerHTML = aliquotDetailsDTO.concentration + ' <bean:message key="specimen.concentrationUnit"/>';
  					else
  					document.getElementById("ali_concentration").innerHTML = "N/A"
  					
  					document.getElementById("ali_tissueSide").innerHTML = aliquotDetailsDTO.tissueSide;
  					document.getElementById("ali_type").innerHTML = aliquotDetailsDTO.type;
  					
  					document.getElementById("ali_specimenClass").innerHTML = aliquotDetailsDTO.specimenClass;
  					document.getElementById("ali_tissueSite").innerHTML = aliquotDetailsDTO.tissueSite;
  					document.getElementById("ali_pathologicalStatus").innerHTML = aliquotDetailsDTO.pathologicalStatus;
  					document.getElementById("ali_initialAvailableQuantity").innerHTML = aliquotDetailsDTO.initialAvailableQuantity+" "+ response.unit;
  					if(aliquotDetailsDTO.creationDate!=undefined && aliquotDetailsDTO.creationDate!=""){
  			//			document.getElementById("creationDate").value = aliquotDetailsDTO.creationDate;
  					}
  					 aliquotGrid.clearAll();
  					aliquotGrid.loadXMLString(response.aliquotGridXml);
  					onGridLoad(aliquotGrid);
  					onGridLoadSetAutoGenerated(aliquotGrid);
  					setComboValues(aliquotGrid,response.availabelContainerName);
  					aliquotPopUpParam.cpID = response.cpID;
  					aliquotPopUpParam.specimenClass = aliquotDetailsDTO.specimenClass
  					aliquotPopUpParam.type = aliquotDetailsDTO.type
  					document.getElementById('submitButtonId').style.display='block'
  					document.getElementById('successButtonDiv').style.display='none';
  					
  				}else if(response.conflictingSpecimens!=null && response.conflictingSpecimens!= undefined){
  					showConflictSpecimenWindow(response.conflictingSpecimens);
  				}
  				else{
  					document.getElementById("aliquotDetailsDiv").style.display="none";
  					document.getElementById('success').style.display='none';
  					document.getElementById('error').style.display='block';
  					document.getElementById('errorMsg').innerHTML=response.message;
  					document.getElementById("aliquotDetailsDiv").style.display="none";
  					aliquotGrid.clearAll();
  				}
  			}
  				
  }
  function applyFirstToALL(){
  	var contName = aliquotGrid.cellById(1,3).getValue();
  	for(var cnt=2;cnt<=aliquotGrid.getRowsNum();cnt++){
  		aliquotGrid.cellById(cnt,3).setValue(contName);
  		aliquotGrid.cellById(cnt,4).setValue("");
  		aliquotGrid.cellById(cnt,5).setValue("");
  	}
  }
  function getCommaseparatedList(){
  	label = "";
  	for(var cnt=1;cnt<=aliquotGrid.getRowsNum();cnt++){
  		if(cnt!=1){
  			label = label+","
  		}
  		label = label+aliquotGrid.cellById(cnt,0).getValue();
  	}
  	return label;
  }
  
negative.code: 			aliquotGrid.attachEvent("onEditCell", function(stage,rId,cInd,nValue,oValue){
  				if(stage==2 ){
  					if(cInd == 3 && nValue != oValue){
  					aliquotGrid.cellByIndex(rId,4).setValue("");
  					aliquotGrid.cellByIndex(rId,5).setValue("");
  					}
  				}
  				return true;
  