  
	
		function formatnumber(n,d)
		{
			ceros="000000"
			punto=n.search("[.]")		
			if (punto==-1){t= n+","+ceros.substr(1,d)}
			else 
				{
					t= n.substr(0,punto) + ',' 
					if (n.substr(punto+1,d).length < d) {t=t+n.substr(punto+1,d)+ceros.substr(1,d-n.substr(punto+1,d).length)}
					else {t=t+ n.substr(punto+1,d)}
				}
			//t=t.replace(".",",")
			return t;
			
		}
