

function ChkNumber(Nummer)
	{var Variable="";
	 var Ausgabe = "";
	Komma = 0;

	        Gross = Nummer.length - 1;
		for(i = Gross; i >= 0; i--)
		{ if (isNaN(Nummer.charAt(i)) != true)
			Variable=Variable.concat(Nummer.charAt(i));

		 if(Nummer.charAt(i) == "-")
			{if(Nummer.charAt(0) == "-") 
				Variable=Variable.concat("-");
			}

		if (Nummer.charAt(i)=="," && Komma==0 || Nummer.charAt(i)=="." && Komma==0)
			{Variable=Variable.concat(".");
			 Komma = Komma+1;
			}

		}
		Gross = Variable.length - 1;
		if (Gross == 0)
			Ausgabe="0";
		for(i = Gross; i >= 0; i--)
		{ 
		if (i == Gross && Variable.charAt(i)=="0" )
			{Ausgabe= Ausgabe;
			 Gross=Gross-1;}

		else
			Ausgabe= Ausgabe.concat(Variable.charAt(i));		
		}
		return Ausgabe;

	}   



function TestB(WertA,WertB,WertC,WertD,WertE,WertF,WertG,Faktor,Bil,UK)
	{		
		
		Faktor = Faktor*1 + 100;
		Wert = (WertA*1+WertB*1+WertC*1+WertE*1+WertD*1+WertF/12+WertG*1)*Faktor;
		
		Wert = parseInt((Wert)+0.5)/100;
		
		WertB = parseInt(WertA * 1200)/100;
 		Steuer = 0;

		if ((WertB < 12740) && (WertB > 7664))
			{ 
			 Y = (WertB - 7664)/10000;
			 Steuer = (883.47 * Y + 1500) * Y;
			 Steuer = parseInt(Steuer * 100)/1200;
			 }

		if ((WertB < 52152) && (WertB > 12739))
			{
			 Z = (WertB - 12740)/10000;
			 Steuer = (228.74 * Z + 2397) * Z + 989; 
			 Steuer = parseInt(Steuer * 100)/1200;

			}
		if (WertB > 52151) 
			{
			 Steuer = 0.42 * WertB - 7914; 
			 Steuer = parseInt(Steuer * 100)/1200;
			 
			}
		Wert = parseInt((Wert + Steuer)*100)/100;

		alert ("Sie benötigen einen Umsatz in Höhe von mindestens " + Wert + " € monatlich.");

		Wert = Wert*12;

		Tage = 250 - (UK*1);
		Zeit = Tage * (Bil*1);
		Wert = Wert / Zeit*100;	
		Wert = parseInt((Wert)+0.5)/100;
      	

		return Wert;
	}


