
	 function roundPrice(pricestring, dec)
	 {		
		hascomma = false;
		
		if (pricestring.indexOf(',') > 0)
			{
			  pricestring = pricestring.replace(',','.');
			  hascomma = true;
			}
		
		var result = new Number(Math.round(pricestring*Math.pow(10,dec))/Math.pow(10,dec))
		result = result.toFixed(2);
		
		
		
		if (hascomma)
			{
			 
			 
			  returnval = '' + result.toString().replace('.',',');		
					  
		      return returnval;
			}
		else
			{
			  if (result.toString().indexOf('.') < 0)
			  {
			    var returnval = result.toString() + '.00';
			    return returnval;
			    
			  }else {
			    return result;
			  }
			}
		
					
     }
	 
	 function roundValue(val, dec)
	 {		
		if (val != undefined)
			{
				hascomma = false;
				val2 = val.toString();
				if (val2.indexOf(',') > 0)
					{
					val2 = val2.replace(',','.');
					  hascomma = true;
					}
				
				var result = Math.round(val2*Math.pow(10,dec))/Math.pow(10,dec);
				
				if (hascomma)
					{
				      returnval = '' + result.toString().replace('.',',');		
				      return returnval;
					}
				else
					{
					  return result;
					}
			}
		else return '';
		
					
     }
	 
		
		
