				  function addprice(temp,status,objname,con,pricedays)
				  {
				  var tot;
				  var pp=objname.split("|");
				  //alert(pp[1]+"---"+pp[0]);
				  if(con=="")
				  con=0;

				  if (status==true)
				  {
					  //check if selected is Options POOL heating	
					  if(pp[1]=="Pool Heating")//check if selected is Options POOL heating
					  {
						  
					//if pool heatring total added to rental with tax	  
					//add to Rental total
					
					//check if price per day is >0
					 if(pricedays>0)		
					//add to Rental total
					document.forms['frmbook'].txtrentailprice.value=parseFloat(document.forms['frmbook'].txtrentailprice.value)+((parseFloat(temp)/parseFloat(pricedays))*parseInt(con));
					else
					document.forms['frmbook'].txtrentailprice.value=parseFloat(document.forms['frmbook'].txtrentailprice.value)+parseFloat(temp);
					
					
					
					//SALES TAX
					var saletax=(parseFloat(document.forms['frmbook'].orgsaletax.value)/100)*parseFloat(document.forms['frmbook'].txtrentailprice.value);
					document.forms['frmbook'].txtsaletax.value=Math.round(saletax*100)/100;
					
					//TOURIST TAX
					var tourtax=(parseFloat(document.forms['frmbook'].orgtourtax.value)/100)*parseFloat(document.forms['frmbook'].txtrentailprice.value);
					document.forms['frmbook'].txttouristtax.value=Math.round(tourtax*100)/100;
					
					//GRAND TOTAL
					var gtot=parseFloat(document.forms['frmbook'].txtrentailprice.value)+parseFloat(saletax)+parseFloat(tourtax);
					document.forms['frmbook'].txtamount.value=Math.round(gtot*100)/100;
					
					  }
					  else
					  {
						
					  if(document.forms['frmbook'].txtoptionamount.value=="")
					  tot=0.00;
					  else
					  tot=parseFloat(document.forms['frmbook'].txtoptionamount.value);
					  
					  if(pricedays>0)
					  {
						optionnet = (parseFloat(temp)/parseFloat(pricedays))*parseInt(con);
					  }
					  else
					  {
					  	optionnet = parseFloat(temp);
					  }
					  
					  tot=tot+optionnet;
					  
					  document.forms['frmbook'].txtoptionamount.value=Math.round(tot*100)/100;
					  					  
					  document.getElementById('optiontaxtotal').value = Number(document.getElementById('optiontaxtotal').value) + Number(optionnet)*(Number(document.getElementById('optiontaxrate'+pp[0]).value)/100);
					  
					  document.forms['frmbook'].txtoptiontax.value=document.getElementById('optiontaxtotal').value;
					  }
					  
				   }
				   else
				   {
					   
					   
					   
				if(objname.match("Pool Heating"))
				{
				


					//check if price per day is >0
					 if(pricedays>0)		
					//add to Rental total
					document.forms['frmbook'].txtrentailprice.value=parseFloat(document.forms['frmbook'].txtrentailprice.value)-((parseFloat(temp)/parseFloat(pricedays))*parseInt(con));
					else
					document.forms['frmbook'].txtrentailprice.value=parseFloat(document.forms['frmbook'].txtrentailprice.value)-parseFloat(temp);


//document.forms['frmbook'].txtrentailprice.value=parseFloat(document.forms['frmbook'].txtrentailprice.value)-(parseFloat(temp)*con);
					
					
					var saletax=(parseFloat(document.forms['frmbook'].orgsaletax.value)/100)*parseFloat(document.forms['frmbook'].txtrentailprice.value);
					document.forms['frmbook'].txtsaletax.value=Math.round(saletax*100)/100;
					var tourtax=(parseFloat(document.forms['frmbook'].orgtourtax.value)/100)*parseFloat(document.forms['frmbook'].txtrentailprice.value);
					document.forms['frmbook'].txttouristtax.value=Math.round(tourtax*100)/100;
					
					
					
					var gtot=parseFloat(document.forms['frmbook'].txtrentailprice.value)+parseFloat(saletax)+parseFloat(tourtax);
				 	document.forms['frmbook'].txtamount.value=Math.round(gtot*100)/100;
				
				
				 }
				else
				{   
					   
					   
				     if(document.forms['frmbook'].txtoptionamount.value=="")
					  tot=0.00;
					  else
					  tot=parseFloat(document.forms['frmbook'].txtoptionamount.value);
					  
					  
					  if(pricedays>0)
					  {
					  	optionnet = (parseFloat(temp)/parseFloat(pricedays))*parseInt(con);
					  }
					  else
					  {
					  	optionnet = parseFloat(temp);					  
					  }
					  
					  tot=tot-optionnet;
					  
					  document.forms['frmbook'].txtoptionamount.value=Math.round(tot*100)/100;
					  
					   document.getElementById('optiontaxtotal').value = Number(document.getElementById('optiontaxtotal').value) - Number(optionnet)*(Number(document.getElementById('optiontaxrate'+pp[0]).value)/100);
					  
					  document.forms['frmbook'].txtoptiontax.value=document.getElementById('optiontaxtotal').value;
				  }
					  
					  
				   }
				   var fnamt=parseFloat(document.forms['frmbook'].txtamount.value)+parseFloat(document.forms['frmbook'].txtoptionamount.value)+parseFloat(document.forms['frmbook'].txtoptiontax.value);
				   document.forms['frmbook'].finalamount.value=  Math.round(fnamt*100)/100;
				  }