function addOMIPF() {	
	if(getExperimentInfo('species') == 'Human')
	{
		if(getExperimentInfo('nooftargets') > 754)
		{
			Ext.get('emessage').removeCls('hidden');
			updateContMessage()
			return;
		}
	}else
	{
		if(getExperimentInfo('nooftargets') > 750)
		{
			Ext.get('emessage').removeCls('hidden');
			updateContMessage()
			return;
		}	
	}
	Ext.get('emessage').addCls('hidden');
	
	//var title = "TaqMan<sup>&reg;</sup>&nbsp;OpenArray<sup>&reg;</sup>&nbsp;miRNA Panel";
	var title = "TaqMan<sup>&reg;</sup>&nbsp;OpenArray<sup>&reg;</sup>&nbsp;miRNA Panels";
	var isQuant = getExperimentInfo('openarrayinstrument') == "QuantStudio" ? true : false;
	var isNTCycler = getExperimentInfo('openarrayinstrument') == "NTCycler" ? true : false;
	var formatObj1 = isQuant ? findApproximateOpenQuantMirnaRecord(getExperimentInfo('species'))
			: findApproximateOpenMirnaRecord(getExperimentInfo('species'));

	var formatObj = findApproximateOpenMirnaRecord(getExperimentInfo('species'));
	var format = isQuant ? formatObj1.get('concatenate') : formatObj1
			.get('productname');
			
	var partNo = formatObj1.get('partnumber');
	var noofgenes = formatObj.get('nooftargets');
	
	var specie = getExperimentInfo('species');
	var preamprtperc = (Ext.get('preamprtperc').dom.value).split('%')[0];
	var accessoriesperc = (Ext.get('accessoriesperc').dom.value).split('%')[0];
	
	var isPreamp = false;
	if (Ext.get('preampchk').dom.checked || Ext.get('preampchk1').dom.checked) {
		isPreamp = true;
	} else {
		isPreamp = false;
	}
	if(getExperimentInfo('species') == 'Human')
	{
		var reqnoofunits = getExperimentInfo('noofsamples')* getExperimentInfo('noofsubarrays')/ 3;
	}else{
		var reqnoofunits = getExperimentInfo('noofsamples')* getExperimentInfo('noofsubarrays')/ 3;
	}
	
	var noofunits = reqnoofunits < formatObj.get('min') ? formatObj.get('min')
			: Math.ceil(reqnoofunits);
			
	var min = formatObj.get('min');
	var isMin = (min == 1 ? 1 : (Math.ceil(reqnoofunits) < min ? 0 : 1));

	var noofreactions = noofgenes * getExperimentInfo('noofsamples') * getExperimentInfo('noofreplicates');
	
	var masterperc = (Ext.get('masterperc').dom.value).split('%')[0];
	var accessperc = (Ext.get('accessoriesperc').dom.value).split('%')[0];
	
	/*
	Commented accorrding to the Lini instructions on 04/10/2013.
	var mvolume = noofreactions * formatObj.get('mastermixneededperunit');
	*/
	
	/*
	Commented accorrding to the Lini instructions on 25/Nov/2013.
	var mvolume = (getExperimentInfo('noofsamples') * getExperimentInfo('noofreplicates') )* 45;
	*/
	
	/*
	Modify thus code accorrding to the Lini instructions on 25/Nov/2013.
		-We need 150uL per panel.So for 160 units we need 160*150uL=24,000 and uL=24mL.Ideal would be 3 units of 1.5mL and 4 units of 5mL.
	*/
	var mvolume = (getExperimentInfo('noofsamples') * getExperimentInfo('noofreplicates')) * 45;
	
	
	var mmxObj = accessories.findRecord('partnumber',"4462159");
	var mmxObj1 = accessories.findRecord('partnumber',"4462164");
	var mastermix = "";
	mastermix = mmxObj.get('product');
	var mastermix1 = mmxObj1.get('product');
	var mmxPartNumber = mmxObj.get('partnumber');
	var mmxPartNumber1 = mmxObj1.get('partnumber');
	
	//alert('reqnoofunits : '+ formatObj.get('mastermixneededperunit') +' * '+ reqnoofunits +' % 3.34');
	//alert( (formatObj.get('mastermixneededperunit') * reqnoofunits) +' % 3.34');
	//alert( (formatObj.get('mastermixneededperunit') * reqnoofunits)  % 3.34 );
	
	/*
	Commented accorrding to the Lini instructions on 04/10/2013.
	
	var mnoofunits = Math
			.ceil((formatObj.get('mastermixneededperunit') * reqnoofunits) % 3.34);
			
	var mnoofunits1 = Math
			.floor((formatObj.get('mastermixneededperunit') * reqnoofunits) / 3.4);
			
	*/
	var Totmnoofunits = mvolume / 1000;
	var mnoofunits = Math.ceil(Totmnoofunits / 1.5);
	
	var mnoofunits1 = Math.ceil(Totmnoofunits / 5);
			
	//alert('mnoofunits : '+ mnoofunits);	
	
	//var pricePerUnit = (isQuant ? formatObj1.get('Pricing or Min Order')/formatObj1.get('min'): (pricelist.findRecord('partnumber', partNo).regions().findRecord('region', region + "-" + currency).get('price')));
	var pricePerUnit = ((pricelist.findRecord('partnumber', partNo).regions().findRecord('region', region + "-" + currency).get('price')));
	//var price = (isQuant ? formatObj1.get('Pricing or Min Order')/formatObj1.get('min') : (pricelist.findRecord('partnumber', partNo).regions().findRecord('region',region + "-" + currency).get('price')))* noofunits;
	var price = ((pricelist.findRecord('partnumber', partNo).regions().findRecord('region',region + "-" + currency).get('price')))* noofunits;
	var volumeDiscount = 0;	
	
    var smp = getExperimentInfo('noofsamples');
	var subarr = getExperimentInfo('noofsubarrays');
	/*if(noofunits <= 10)
	{
		volumeDiscount = 35;	
	}else if((noofunits <= 11  && noofunits >= 20))
	{
		volumeDiscount = 40;
	}else if((noofunits <= 21  && noofunits >= 100))
	{
		volumeDiscount = 45; 
	}else if((noofunits <= 101  && noofunits >= 300))
	{
		 volumeDiscount = 50;
	}else if((noofunits > 300))
	{
		volumeDiscount = 60;
	}
	
	if((smp <= 30) || (subarr <= 10))
	{
		volumeDiscount = 35;	
	}else if((smp <= 31 && smp >= 60 ) || (subarr <= 11 && subarr >= 20 ))
	{
		volumeDiscount = 45;
	}else if((smp <= 11 && smp >= 100 ) || (subarr <= 61 && subarr >= 300 ))
	{
		volumeDiscount = 50;
	}else if((smp <= 101 && smp >= 300 ) || (subarr <= 301 && subarr >= 900 ))
	{
		volumeDiscount = 55;
	}else if((smp <= 301 ) || (subarr <= 901 ))
	{
		volumeDiscount = 60;
	}
	*/
	var assayCostPerUnit = pricePerUnit;
	
	
	
	
	var discObj = tsstablemirna.findRecord('product', formatObj.get('productname'));
	var discunits = (noofunits > 910) ? 910 :(noofunits-(noofunits%10));
	var volobj = discObj.discounts().findRecord('volume', discunits);
	//volumeDiscount = volobj.get('value');
	var smp = getExperimentInfo('noofsamples');
	var subarr = getExperimentInfo('noofsubarrays');
	
	/*
	if((smp <= 30) || (subarr <= 10))
	{
		volumeDiscount = 35;	
	}else if((smp <= 31 && smp >= 60 ) || (subarr <= 11 && subarr >= 20 ))
	{
		volumeDiscount = 45;
	}else if((smp <= 11 && smp >= 100 ) || (subarr <= 61 && subarr >= 300 ))
	{
		volumeDiscount = 50;
	}else if((smp <= 101 && smp >= 300 ) || (subarr <= 301 && subarr >= 900 ))
	{
		volumeDiscount = 55;
	}else if((smp <= 301 ) || (subarr <= 901 ))
	{
		volumeDiscount = 60;
	}
	*/
	
// Volume Discounts for miRNA OpenArray Plates changes request by Lini on 25-02-2014 starts here >>>>
	
		/*if(noofunits <= 10)	{
			volumeDiscount = 35;	
		}else if((noofunits >= 11) && (noofunits <= 20)){			
			volumeDiscount = 40;			
		}else if((noofunits >= 21) && (noofunits <= 100)){			
			volumeDiscount = 45; 			
		}else if((noofunits >= 101) && (noofunits <= 300)){			
			 volumeDiscount = 50;			 
		}else if(noofunits > 300){
			volumeDiscount = 60;
		}*/
		
		if(noofunits <= 13)	{
			volumeDiscount = 0;
		}else if((noofunits >= 14) && (noofunits <= 20)){
			volumeDiscount = 10;
		}else if((noofunits >= 21) && (noofunits <= 100)){
			volumeDiscount = 20;
		}else if((noofunits >= 101) && (noofunits <= 300)){
			 volumeDiscount = 30;
		}else if(noofunits > 300){
			volumeDiscount = 35;
		}
		
	
// Volume Discounts for miRNA OpenArray Plates changes request by Lini on 25-02-2014 ends here <<<<


	
	var openarrayperc = parseFloat((Ext.get('openarrayperc').dom.value)
			.split('%')[0]);
	
	
	var costWithVolDisc = noofunits * assayCostPerUnit * (1 - ((volumeDiscount + openarrayperc) / 100));
	
	
	var totalAssayCost = costWithVolDisc;
	var masterMixCostPerUnit = pricelist.findRecord('partnumber', mmxPartNumber).regions().findRecord('region',
			region + "-" + currency).get('price');
	var masterMixCostPerUnit1 = pricelist.findRecord('partnumber', mmxPartNumber1).regions().findRecord('region',
			region + "-" + currency).get('price');

	var totalMasterMixCost = masterMixCostPerUnit * mnoofunits
			* (1 - (masterperc / 100));
	var totalMasterMixCost1 = masterMixCostPerUnit1 * mnoofunits1
			* (1 - (masterperc / 100));
	
	/*Added this code accorrding to Linio instruction on OCT 4th 2013*/
	
	//To get Combination of 1.5 and 5 ML MasterMix
	var tempmnoofunits = Totmnoofunits / 1.5;
	var tempmnoofunits1 = Totmnoofunits / 5;
	
	if(tempmnoofunits1 > 1){
	
		var temp = mnoofunits1 - 1;
		
		var temp1 = Totmnoofunits - (temp * 5);
		var temp2 = Math.ceil(temp1 / 1.5);
		
		var temp3 = masterMixCostPerUnit1 * temp * (1 - (masterperc / 100));
		var temp4 = masterMixCostPerUnit * temp2 * (1 - (masterperc / 100));
		
		var temp5 = temp3 + temp4;
		//alert(totalMasterMixCost1 +' = temp5 : ' + temp5);
		
		if(temp5 < totalMasterMixCost1){
			mnoofunits = temp2;
			mnoofunits1 = temp;
			totalMasterMixCost = temp4;
			totalMasterMixCost1 = temp3;
		}else{
			mnoofunits1 = mnoofunits1;
			mnoofunits = 0;
			totalMasterMixCost1 = totalMasterMixCost1;
		}
	}else{
		if(totalMasterMixCost1 < totalMasterMixCost){
			mnoofunits = 0;
			totalMasterMixCost = 0;
			mnoofunits1 = mnoofunits1;
		}else{
			mnoofunits1 = 0;
			totalMasterMixCost1 = 0;
			mnoofunits = mnoofunits;
		}
	}
	/*End of New added code on OCT 4 - 2013*/
	
	
	//Changed to noofreactions		
	var assayCostPerReaction = totalAssayCost/ noofreactions;
	var masterMixCostPerReaction = (totalMasterMixCost + totalMasterMixCost1) / noofreactions;
	var masterMixCostPerReaction1 = totalMasterMixCost1 / noofreactions;

	var rtObj = mirnaRT.findRecord('productname', 'TaqMan® MicroRNA Reverse Transcription Kit, 200 rxns');
	var rtObj1 = mirnaRT.findRecord('productname', 'TaqMan® MicroRNA Reverse Transcription Kit, 1000 rxns');
	var rtCostPerUnit = pricelist.findRecord('partnumber', rtObj.get('partnumber')).regions().findRecord('region', region + "-" + currency).get('price');
	var rtNoOfReactions = getExperimentInfo('noofsamples');
	/*
	//Commented 26/08/2015 based - OMIPFINST 1 
	var rtNoOfUnits = Math.ceil((formatObj.get('rtkitperunit') * reqnoofunits) % 5);*/
	
	//OMIPFINST 1 : Added on 26/08/2015 based Lini instruction - changed the calc for RT-NO-UNITS
	var kit200Rxn = 65;
	var rtNoOfUnits = Math.ceil(rtNoOfReactions/kit200Rxn);
	var totalRTCost = rtCostPerUnit * rtNoOfUnits * (1 - (preamprtperc / 100));
	var rtCostPerReaction = totalRTCost / noofreactions;

	var rtCostPerUnit1 = pricelist.findRecord('partnumber', rtObj1.get('partnumber')).regions().findRecord('region', region + "-" + currency).get('price');
	var rtNoOfReactions1 = getExperimentInfo('noofsamples');
	
	//Commented 26/08/2015 based - OMIPFINST 1 
	//var rtNoOfUnits1 = Math.floor((formatObj.get('rtkitperunit') * reqnoofunits) / 5);
	
	//Added on 26/08/2015 based - OMIPFINST 1 
	var kit1000Rxn = 332;
	var rtNoOfUnits1 = Math.ceil( rtNoOfReactions1/kit1000Rxn );
	var totalRTCost1 = rtCostPerUnit1 * rtNoOfUnits1 * (1 - (preamprtperc / 100));
	var rtCostPerReaction1 = totalRTCost1 / noofreactions;
	//Added on 26/08/2015 based - OMIPFINST 1 
	if( totalRTCost <= totalRTCost1 ){
		rtNoOfUnits1 = 0;
		totalRTCost1 = 0;
		rtCostPerReaction1 = 0;
	}else if( totalRTCost1 < totalRTCost){
		rtNoOfUnits = 0;
		totalRTCost = 0;
		rtCostPerReaction = 0;
		
	}
	var preAmpObj = mirnaPreAmp.findRecord('productname','TaqMan® PreAmp Master Mix - 1mL');
	var preAmpObj1 = mirnaPreAmp.findRecord('productname','TaqMan® PreAmp Master Mix - 5mL');
	var preAmpCostPerUnit = pricelist.findRecord('partnumber', preAmpObj.get('partnumber')).regions().findRecord(
			'region', region + "-" + currency).get('price');
	var preAmpCostPerUnit1 = pricelist.findRecord('partnumber', preAmpObj1.get('partnumber')).regions().findRecord(
			'region', region + "-" + currency).get('price');
	var preAmpNoOfReactions = getExperimentInfo('noofsamples');
	
	//As per Necip - removing replicates in calculation on Nov 9,2015
	
	var preAmpNoOfUnits = isPreamp ? Math.ceil(getExperimentInfo('noofsamples') / 40) : 0; // 40 reactions
	var preAmpNoOfUnits1 = isPreamp ? Math.ceil(getExperimentInfo('noofsamples') / 200) : 0; // 200 reactions
	var totalPreAmpCost = preAmpCostPerUnit * preAmpNoOfUnits * (1 - (preamprtperc / 100));
	var totalPreAmpCost1 = preAmpCostPerUnit1 * preAmpNoOfUnits1	* (1 - (preamprtperc / 100));
	var preAmpProduct = preAmpObj.get('productname');
	var preAmpProduct1 = preAmpObj1.get('productname');
	var preAmpPartNumber = preAmpObj.get('partnumber');
	var preAmpPartNumber1 = preAmpObj1.get('partnumber');
	
	/*if(totalPreAmpCost1 < totalPreAmpCost){
		totalPreAmpCost = 	totalPreAmpCost1;
		preAmpNoOfUnits = preAmpNoOfUnits1;
		preAmpCostPerUnit = preAmpCostPerUnit1;
		preAmpProduct = preAmpProduct1;
		preAmpPartNumber = preAmpPartNumber1;
	}*/
	
	// combination of 1mL and 5mL starts
	var tempmnoofunits = preAmpNoOfUnits ;
	var tempmnoofunits1 = preAmpNoOfUnits1 ;
					
	if(tempmnoofunits1 > 1){
	
		var temp = preAmpNoOfUnits1 - 1;
		
		var temp1 = preAmpNoOfUnits;
		var temp2 = preAmpNoOfUnits1;
		
		var temp3 = preAmpCostPerUnit1 * temp * (1 - (preamprtperc / 100));
		var temp4 = preAmpCostPerUnit * temp2 * (1 - (preamprtperc / 100));
		
		var temp5 = temp3 + temp4;
		//alert(totalMasterMixCost1 +' = temp5 : ' + temp5);
		
		if(temp5 < totalPreAmpCost1){
			preAmpNoOfUnits = temp2;
			preAmpNoOfUnits1 = temp;
			totalPreAmpCost = temp4;
			totalPreAmpCost1 = temp3;
		}else{
			preAmpNoOfUnits1 = preAmpNoOfUnits1;
			preAmpNoOfUnits = 0;
			totalPreAmpCost1 = totalPreAmpCost1;
		}
	}else{
		if(totalPreAmpCost1 < totalPreAmpCost){
			preAmpNoOfUnits = 0;
			totalPreAmpCost = 0;
			preAmpNoOfUnits1 = preAmpNoOfUnits1;
		}else{
			preAmpNoOfUnits1 = 0;
			totalPreAmpCost1 = 0;
			preAmpNoOfUnits = preAmpNoOfUnits;
		}
	}
	// combination of 1mL and 5mL ends
	
	
	var preAmpCostPerSample = totalPreAmpCost / preAmpNoOfReactions;
	var preAmpCostPerSample1 = totalPreAmpCost1 / preAmpNoOfReactions;
	//Changed to noofreactions
	var preAmpCostPerReaction = totalPreAmpCost / noofreactions;
	var preAmpCostPerReaction1 = totalPreAmpCost1 / noofreactions;
	
	
	var openArray384Obj = accessories.findRecord('product', 'OpenArray® 384-well Sample Plates');
	var acc1PartNumber = openArray384Obj.get('partnumber');
	
	var openArray384WellSamplePlatesUnits = Math.ceil(formatObj
			.get('openarraysampleplatesperunit')
			* reqnoofunits) < openArray384Obj.get('min') ? openArray384Obj.get(
					'min') : Math.ceil(formatObj
			.get('openarraysampleplatesperunit')
			* reqnoofunits);
	
	var openArray384WellSamplePlatesCost = pricelist.findRecord('partnumber',
			acc1PartNumber).regions().findRecord('region',
					region + "-" + currency).get('price')
			* openArray384WellSamplePlatesUnits;
	

	var openArrayAccuFillSystemTipsUnits = Math.ceil((formatObj
			.get('openarraytipsperunit') * reqnoofunits) % 10);

	
	var acc2PartNumber = mirnaAccessories.findRecord('productname',
	'OpenArray® AccuFill® System Tips').get('partnumber');

	var openArrayAccuFillSystemTipsCost = pricelist.findRecord('partnumber',
			acc2PartNumber).regions().findRecord('region',
					region + "-" + currency).get('price')
			* openArrayAccuFillSystemTipsUnits;

	var acc3PartNumber = mirnaAccessories.findRecord('productname',
	'OpenArray® AccuFill® System Tips, 10 pack').get('partnumber');

	var openArrayAccuFillSystemTips10PackUnits = Math.floor((formatObj
			.get('openarraytipsperunit') * reqnoofunits) / 10);
	var openArrayAccuFillSystemTips10PackCost = pricelist.findRecord('partnumber',
			acc3PartNumber).regions().findRecord('region',
					region + "-" + currency).get('price')
			* openArrayAccuFillSystemTips10PackUnits;
	
	if(isQuant)
	{
		
	var acc4PartNumber = mirnaAccessories.findRecord('productname',
	'QuantStudio 12K Flex OpenArray® Accessories Kit').get('partnumber');
	var realtimePCRname = "TaqMan® OpenArray® QuantStudio 12K Flex OpenArray® Accessories Kit";
	}else
	{
		
		var acc4PartNumber = mirnaAccessories.findRecord('productname',
	'OpenArray® Real-Time PCR Accessories Kit').get('partnumber');
	var realtimePCRname = "TaqMan® OpenArray® Real-Time PCR Accessories Kit";
	}
	
   
	var openArrayRealTimePCRAccessoriesKitUnits = Math.ceil(formatObj
			.get('accessorieskitperunit')
			* reqnoofunits);
	var openArrayRealTimePCRAccessoriesKitCost = pricelist.findRecord('partnumber',
			acc4PartNumber).regions().findRecord('region',
					region + "-" + currency).get('price')
			* openArrayRealTimePCRAccessoriesKitUnits;
	
	//var megaplexPrimerPoolsHumanUnits = isPreamp ? Math.ceil(formatObj.get('primerpoolsperunit') * reqnoofunits) : 0;
	
	// 1 kit is for 50 samples. Lini asked to change this formula on 30-10-2015
	var megaplexPrimerPoolsHumanUnits = Math.ceil( ( getExperimentInfo('noofsamples') * getExperimentInfo('noofreplicates') ) / 50 );
	
	//As per Necip - removing replicates in calculation on Nov 9,2015
	var megaplexPrimerPoolsHumanUnits = Math.ceil( ( getExperimentInfo('noofsamples') ) / 50 );

	var species = specie;
	species = (species == "Rat" || species == "Mouse") ? "Rodent" : species;
	
	
	var acc5PartNumber = (species == "Human" ? accessories.findRecord(
			'product', 'Megaplex® Primer Pools, Human').get('partnumber')
			: accessories.findRecord('product',
					'Megaplex® Primer Pools, Rodent').get('partnumber'));
	var assay5costperUnts =  pricelist.findRecord('partnumber',
			acc5PartNumber).regions().findRecord('region',
					region + "-" + currency).get('price');
	var megaplexPrimerPoolsHumanCost = assay5costperUnts * megaplexPrimerPoolsHumanUnits
			* (1 - (parseFloat(accessoriesperc) / 100));
	
	
	var rtPrimerPoolsObj = getRTPrimerPools(specie,
			getExperimentInfo('noofreplicates')
					* getExperimentInfo('noofsamples'),(format.indexOf("A+B") != -1 ? "Pool Set v3.0" : "Pool B v3.0"));
	var rtPrimerPools = rtPrimerPoolsObj.get('productname');
	
	var rtPrimerPoolsNoOfUnits = isPreamp ? 0 : Math
			.ceil(getExperimentInfo('noofreplicates')
					* getExperimentInfo('noofsamples')
					/ rtPrimerPoolsObj.get('reactions'));
	var rtPrimerPoolsPartNumber = rtPrimerPoolsObj.get('partnumber');
	
	var rtPrimerPoolsPricePerUnit = pricelist.findRecord('partnumber',
			rtPrimerPoolsPartNumber).regions().findRecord('region',
			region + "-" + currency).get('price');
	var totalRtPrimerPoolsPriceCost = rtPrimerPoolsPricePerUnit
			* rtPrimerPoolsNoOfUnits * (1 - (preamprtperc / 100));
	;

	var openArray384WellSamplePlatesCostWithDisc = openArray384WellSamplePlatesCost * (1 - (accessperc / 100));
	var openArrayAccuFillSystemTips10CostWithDisc = openArrayAccuFillSystemTips10PackCost * (1 - (accessperc / 100));
	var openArrayAccuFillSystemTipsCostWithDisc	  = openArrayAccuFillSystemTipsCost * (1 - (accessperc / 100));
	var openArrayRealTimePCRAccessoriesKitCostCostWithDisc	  = openArrayRealTimePCRAccessoriesKitCost * (1 - (accessperc / 100));

	var accessoriescost = openArray384WellSamplePlatesCostWithDisc
			+ openArrayAccuFillSystemTipsCostWithDisc
			+ openArrayAccuFillSystemTips10CostWithDisc
			+ openArrayRealTimePCRAccessoriesKitCostCostWithDisc
			+ megaplexPrimerPoolsHumanCost + totalRtPrimerPoolsPriceCost;

	var totalAccessoriescost = accessoriescost;

	var accessoriesCostPerReaction = totalAccessoriescost / noofreactions;

	var totalCostPerReaction = assayCostPerReaction + masterMixCostPerReaction
			+ rtCostPerReaction + rtCostPerReaction1 + preAmpCostPerReaction
			+ accessoriesCostPerReaction;
	
	var mmixCostPerSample = totalMasterMixCost
			/ getExperimentInfo('noofsamples');
	var mmixCostPerSample1 = totalMasterMixCost1
			/ getExperimentInfo('noofsamples');
	var assayCostPerSample = totalAssayCost / getExperimentInfo('noofsamples');
	var rtCostPerSample = totalRTCost / getExperimentInfo('noofsamples');
	var rtCostPerSample1 = totalRTCost1 / getExperimentInfo('noofsamples');
	
	var acc1CostPerSample = openArray384WellSamplePlatesCostWithDisc
			/ getExperimentInfo('noofsamples');
	var acc2CostPerSample = openArrayAccuFillSystemTipsCostWithDisc
			/ getExperimentInfo('noofsamples');
	var acc3CostPerSample = openArrayAccuFillSystemTips10CostWithDisc
			/ getExperimentInfo('noofsamples');
	var acc4CostPerSample = openArrayRealTimePCRAccessoriesKitCostCostWithDisc
			/ getExperimentInfo('noofsamples');
	var acc5CostPerSample = megaplexPrimerPoolsHumanCost
			/ getExperimentInfo('noofsamples');
			
	var rtPrimerPoolsPerSample = totalRtPrimerPoolsPriceCost / getExperimentInfo('noofsamples');		
	var accessoriesCostPerSample = acc1CostPerSample + acc2CostPerSample
			+ acc3CostPerSample + acc4CostPerSample + acc5CostPerSample;
	var totalCostPerSample = assayCostPerSample + mmixCostPerSample
			+ rtCostPerSample + rtCostPerSample1 + preAmpCostPerSample
			+ accessoriesCostPerSample+mmixCostPerSample1+rtPrimerPoolsPerSample;
	
	var totalCostPreDisc = costWithVolDisc
			+ (masterMixCostPerUnit * mnoofunits) + totalPreAmpCost
			+ totalRTCost + totalRTCost1 + accessoriescost;
	var totalDiscount = 100 - (totalCost * 100 / totalCostPreDisc);
	var rtProduct = rtObj.get('productname');
	var rtProduct1 = rtObj1.get('productname');	
	var rtPartNumber = rtObj.get('partnumber');
	var rtPartNumber1 = rtObj1.get('partnumber');
	

	var noOfHours = 0;
	var oType = getExperimentInfo('openarrayinstrument') == "QuantStudio" ? "GEandMirnaQS"
			: "GEandMirnaNT";
	var tRec = openarrayruntimes.findRecord('type', oType);
	noOfHours = Math.ceil(Math.ceil((reqnoofunits)
			/ tRec.get('noofplatesperrun'))
			* tRec.get('totalmin') / 60);

	var totalCost = totalAssayCost + totalMasterMixCost + totalRTCost
			+ totalRTCost1 + totalPreAmpCost + totalAccessoriescost + totalMasterMixCost1;
	
	var totalReactions = (getExperimentInfo('nooftargets') * getExperimentInfo('noofreplicates') * getExperimentInfo('noofsamples'));		
	
	var totalCostPerReaction = totalCost /noofreactions ;
	
	var productUrl = "";
	if(species == "Rodent") {
		productUrl = "http://products.invitrogen.com/ivgn/product/4470188"; //4461105 
	} else {
		productUrl = "http://products.invitrogen.com/ivgn/product/4470187"; //4461104
	}
	
	var imageType = "";
	if(isNTCycler){
		imageType = "openarray-ntcycler-fixed";
	}
	
	outputList.add({
				pno : 18,
				title : title,
				partnumber : partNo,
				format : format.replace(/�/gi, '<sup>&reg;</sup>&nbsp;'),
				rtproduct : rtProduct
						.replace(/�/gi, '<sup>&reg;</sup>&nbsp;'),
				rtproduct1 : rtProduct1.replace(/�/gi,
						'<sup>&reg;</sup>&nbsp;'),
				preampproduct : preAmpProduct.replace(/�/gi,
						'<sup>&reg;</sup>&nbsp;'),
				preampproduct1 : preAmpProduct1.replace(/�/gi,
						'<sup>&reg;</sup>&nbsp;'),
				rtnoofunits : rtNoOfUnits,
				rtnoofunits1 : rtNoOfUnits1,
				rtpartnumber : rtPartNumber,
				rtpartnumber1 : rtPartNumber1,
				rtcostperunit : roundNumber(rtCostPerUnit, 2),
				rtcostperunit1 : roundNumber(rtCostPerUnit1, 2),
				rtcostpersample : roundNumber(rtCostPerSample, 2),
				rtcostpersample1 : roundNumber(rtCostPerSample1, 2),
				totalrtcost : roundNumber(totalRTCost, 2),
				totalrtcost1 : roundNumber(totalRTCost1, 2),
				preamppartnumber : preAmpPartNumber,
				preampnoofunits : preAmpNoOfUnits,
				preampcostperunit : roundNumber(preAmpCostPerUnit, 2),
				preampcostpersample : preAmpCostPerSample,
				totalpreampcost : roundNumber(totalPreAmpCost, 2),
				preamppartnumber1 : preAmpPartNumber1,
				preampnoofunits1 : preAmpNoOfUnits1,
				preampcostperunit1 : roundNumber(preAmpCostPerUnit1, 2),
				preampcostpersample1 : preAmpCostPerSample1,
				totalpreampcost1 : roundNumber(totalPreAmpCost1, 2),
				realtimePCRname:realtimePCRname,	
				noofunits : noofunits,
				noofreactions : noofreactions,
				mastermix : mastermix
						.replace(/�/gi, '<sup>&reg;</sup>&nbsp;'),
				mastermix1 : mastermix1.replace(/�/gi,
						'<sup>&reg;</sup>&nbsp;'),
				mnoofunits : mnoofunits,
				mnoofunits1 : mnoofunits1,
				totalcost : roundNumber(totalCost, 2),
				volumediscount : volumeDiscount,
				mvolumediscount : 0,
				mastermixdisc : masterperc,
				accessoriesdisc : accessperc,
				assayscost : roundNumber(assayCostPerUnit, 2),
				assayscostperunit : roundNumber(assayCostPerUnit, 2),
				assayscostwithvoldisc : roundNumber(totalAssayCost, 2),
				mastermixvol : 0,
				mastermixcostperunit : roundNumber(masterMixCostPerUnit, 2),
				mastermixcostperunit1 : roundNumber(masterMixCostPerUnit1, 2),
				mastermixcostwithvoldisc : roundNumber(
						(masterMixCostPerUnit * mnoofunits), 2),
				mastermixcostwithvoldisc1 : roundNumber(
						(masterMixCostPerUnit1 * mnoofunits1), 2),
				mastermixcostwithdisc : roundNumber(totalMasterMixCost, 2),
				mastermixcostwithdisc1 : roundNumber(totalMasterMixCost1, 2),
				mastermixcost : roundNumber(
						(masterMixCostPerUnit * mnoofunits), 2),
				mastermixcost1 : roundNumber(
						(masterMixCostPerUnit1 * mnoofunits1), 2),
				noofhours : noOfHours,
				rtcostperreaction : roundNumber(rtCostPerReaction, 2),
				rtcostperreaction1 : roundNumber(rtCostPerReaction1, 2),
				preampcostperreaction : roundNumber(preAmpCostPerReaction, 2),
				preampcostperreaction1 : roundNumber(preAmpCostPerReaction1, 2),
				assaycostperreaction : roundNumber(assayCostPerReaction, 2),
				mastermixcostperreaction : roundNumber(
						masterMixCostPerReaction, 2),
				mastermixcostperreaction1 : roundNumber(
						masterMixCostPerReaction1, 2),

				accessoriescostperreaction : roundNumber(
						accessoriesCostPerReaction, 2),
				optimizationcostperreaction : 0,
				totalcostperreaction : roundNumber(totalCostPerReaction, 2),
				producturl : productUrl,
				openarray384wellsampleplatescost : openArray384WellSamplePlatesCost,
				openarrayaccufillsystemtipscost : openArrayAccuFillSystemTipsCost,
				openarrayaccufillsystemtips10packcost : openArrayAccuFillSystemTips10PackCost,
				openarray384wellsampleplatesunits : openArray384WellSamplePlatesUnits,
				openarrayaccufillsystemtipsunits : openArrayAccuFillSystemTipsUnits,
				openarrayaccufillsystemtips10packunits : openArrayAccuFillSystemTips10PackUnits,
				openarrayrealtimepcraccessorieskitunits : openArrayRealTimePCRAccessoriesKitUnits,
				openarrayrealtimepcraccessorieskitcost : openArrayRealTimePCRAccessoriesKitCost,
				megaplexprimerpoolshumanunits : megaplexPrimerPoolsHumanUnits,
				megaplexprimerpoolshumancost : roundNumber(
						megaplexPrimerPoolsHumanCost, 2),
				rtprimerpools : rtPrimerPools,
				rtprimerpoolsnoofunits : rtPrimerPoolsNoOfUnits,
				rtprimerpoolpartnumber : rtPrimerPoolsPartNumber,
				rtprimerpoolspriceperunit : rtPrimerPoolsPricePerUnit,
				totalrtprimerpoolspricecost : totalRtPrimerPoolsPriceCost,

				totalcostpersample : roundNumber(totalCostPerSample, 2),
				accessoriescost : roundNumber(accessoriescost, 2),
				accessoriescostwithdisc : roundNumber(totalAccessoriescost, 2),
				assaycostpersample : roundNumber(assayCostPerSample, 2),
				accessoriescostpersample : roundNumber(
						accessoriesCostPerSample, 2),
				mmxcostpersample : roundNumber(mmixCostPerSample, 2),
				mmxcostpersample1 : roundNumber(mmixCostPerSample1, 2),
				totalcostpredisc : roundNumber(totalCostPreDisc, 2),
				totaldiscount : roundNumber(totalDiscount, 2),
				accessory1partnumber : acc1PartNumber,
				accessory2partnumber : acc2PartNumber,
				accessory3partnumber : acc3PartNumber,
				accessory4partnumber : acc4PartNumber,
				accessory5partnumber : acc5PartNumber,
				assay5costperUnts : assay5costperUnts,
				mastermixpartnumber : mmxPartNumber,
				mastermixpartnumber1 : mmxPartNumber1,
				reqnoofunits : reqnoofunits,
				type : 'openarray-fixed',
				min : min,
				ismin : isMin,
				imageType:imageType,
				fnName:'addOMIPF'
			});

}
	
function findApproximateOpenMirnaRecord(species) {
	species = (species == "Rat" || species == "Mouse") ? "Rodent" : species;
	var recordIndex = 0;
	var count = 0;
	mirnaAssay.each(function(record) {
		if (record.get('species') == species
				&& record.get('producttype') == "OpenArray") {
			recordIndex = count;
			return false; // a record with this data exists

		}
		count++;
	});

	return mirnaAssay.getAt(recordIndex);
}

function findApproximateOpenQuantMirnaRecord(species) {
	species = (species == "Rat" || species == "Mouse") ? "Rodent" : species;

	var name = (species == "Rodent" ? "TaqMan® OpenArray® Rodent MicroRNA  Panel QuantStudio TM 12K Flex"
			: "TaqMan® OpenArray® Human MicroRNA  Panel QuantStudio TM 12K Flex");
	var recordIndex = 0;
	var count = 0;
	quantstudio.each(function(record) {
		if (record.get('concatenate').indexOf(name) != -1) {
			recordIndex = count;
			return false; // a record with this data exists

		}
		count++;
	});
	return quantstudio.getAt(recordIndex);
}
