anchor.diff:  	}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{
  +	var paramStr = {validated:validated,
  +label:specimenLabel,
  +count:aliquotCount,
  +quantity:quantityPerAliquot};
  +
  +var request = newXMLHTTPReq();
  +			request.onreadystatechange=function(){
  +					if(request.readyState == 4)
  +					{  
  +						//Response is ready
  +						if(request.status == 201)
  +						{
  +						var responseString = request.responseText;
  +							var response = eval('('+responseString+')');
  +							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);
  +						loadAliquotGridWithNewData(aliquotGrid,aliquotDetailsDTO);
  +						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();
  +					}
  +				}else if(request.status != 201){
  +						document.getElementById("aliquotDetailsDiv").style.display="none";
  +					document.getElementById('success').style.display='none';
  +					document.getElementById('error').style.display='block';
  +					document.getElementById('errorMsg').innerHTML=request.responseText;
  +					document.getElementById("aliquotDetailsDiv").style.display="none";
  +					aliquotGrid.clearAll();
   				}
  -			}
  +				}
  +			};
  +			request.open("GET","rest/specimens/"+specimenLabel+"/aliquots/"+JSON.stringify(paramStr),true);
  +			request.setRequestHeader("Content-Type","application/json");
  +			request.send();
  +
  +	/*var loader=dhtmlxAjax.getSync("rest/specimens/"+specimenLabel+"/aliquots/"+JSON.stringify(paramStr));
  +		
  +			if(loader.xmlDoc.responseText != null)
  +			{
  +				var response = eval('('+loader.xmlDoc.responseText+')');
   				
  +			}
  +		*/		
  +}
  +function loadAliquotGridWithNewData(aliquotGrid,aliquotDetailsDTO){
  +	var gridData = aliquotDetailsDTO.perAliquotDetailsCollection;
  +	var newId = "rownewId";
  +	//"Label,Barcode,Quantity,Storage Container,Position 1,Position 2,Container Map,"
  +	for(var cnt = 0; cnt < gridData.length; cnt++){
  +		aliquotGrid.addRow(newId+cnt,gridData[cnt].aliqoutLabel+","+gridData[cnt].barCode+","+gridData[cnt].quantity+","+gridData[cnt].storagecontainer+","+gridData[cnt].pos1+","+gridData[cnt].pos2+",,"+gridData[cnt].aliquotId,cnt+1);
  +	}
   }
   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("");
  +	var contName = aliquotGrid.cellByIndex(1,3).getValue();
  +	for(var cnt=2;cnt<aliquotGrid.getRowsNum();cnt++){
  +		aliquotGrid.cellByIndex(cnt,3).setValue(contName);
  +		aliquotGrid.cellByIndex(cnt,4).setValue("");
  +		aliquotGrid.cellByIndex(cnt,5).setValue("");
   	}
   }
   function getCommaseparatedList(){
   	label = "";
  -	for(var cnt=1;cnt<=aliquotGrid.getRowsNum();cnt++){
  +	for(var cnt=1;cnt<aliquotGrid.getRowsNum();cnt++){
   		if(cnt!=1){
   			label = label+","
   		}
  -		label = label+aliquotGrid.cellById(cnt,0).getValue();
  +		label = label+aliquotGrid.cellByIndex(cnt,0).getValue();
  +	}
  +	return label;
  +}
  +function getCommaseparatedIdList(){
  +	label = "";
  +	for(var cnt=1;cnt<aliquotGrid.getRowsNum();cnt++){
  +		if(cnt!=1){
  +			label = label+","
  +		}
  +		label = label+aliquotGrid.cellByIndex(cnt,7).getValue();
   	}
   	return label;
   }
  
positive.code: 			aliquotGrid.attachEvent("onEditCell", function(stage,rId,cInd,nValue,oValue){
  				if(stage==2 ){
  					if(cInd == 3 && nValue != oValue){
  					aliquotGrid.cellById(rId,4).setValue("");
  					aliquotGrid.cellById(rId,5).setValue("");
  					}
  				}
  				return true;
  
negative.code: 		}
  		function onGridLoadSetAutoGenerated(grid_obj,rowCount){
  			if("${isLabelGenerationOn}"=="true" || "${isBarGenerationOn}"=="true"){
  				for(var cnt=1;cnt<grid_obj.getRowsNum();cnt++){
  					grid_obj.cellByIndex(cnt,0).setValue("Auto Generated");
  					grid_obj.cellByIndex(cnt,1).setValue("Auto Generated");
  				}
  			}
  		}
  		function onGridLoad(grid_obj,rowCount){
  			for(var cnt=1;cnt<grid_obj.getRowsNum();cnt++){
  				grid_obj.cellByIndex(cnt,6).setValue("<a href='#' onClick='openMapPopUp(\""+cnt+"\")' >Map</a>");
  			}
  		}
  		function openMapPopUp(rowNum){
  			aliquotGrid.selectRow(rowNum);
  			var containerName = aliquotGrid.cellByIndex(rowNum,3).getValue();
  			var pos1 = aliquotGrid.cellByIndex(rowNum,4).getValue();
  			var pos2 = aliquotGrid.cellByIndex(rowNum,5).getValue();
  				String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g, '');};
  			if(containerName.trim()!=""){
  				loadDHTMLXWindowForTransferEvent(containerName,pos1,pos2,rowNum);
  