// Formatovani ceny - pouze cislice serazene bud na 1000000 nebo na 1 000 000
function formatPrice(toto,ismez){
var price = toto.value;var priceNew = "";var chars = "0123456789";var po = 0;var mark = "";
for(var i=price.length-1;i>=0;i--){
	if (chars.indexOf(price.charAt(i))>-1)
	{
		if (po == 3 && ismez!="") 
		{ 
			mark=" "; po = 0; 
		} 
		else mark = "";
		po++;
		priceNew = price.charAt(i)+mark+priceNew;
	}
}
toto.value = priceNew;
}

function formatPrice2(toto,ismez){
var price = toto.value;var priceNew = "";var chars = "+0123456789";var po = 0;var mark = "";
for(var i=price.length-1;i>=0;i--){
	if (chars.indexOf(price.charAt(i))>-1)
	{
		if (po == 3 && ismez!="") 
		{ 
			mark=" "; po = 0; 
		} 
		else mark = "";
		po++;
		priceNew = price.charAt(i)+mark+priceNew;
	}
}
toto.value = priceNew;
}

function formatPrice3(toto,ismez){
var price = toto.value;var priceNew = "";var chars = ".0123456789";var po = 0;var mark = "";
for(var i=price.length-1;i>=0;i--){
	if (chars.indexOf(price.charAt(i))>-1)
	{
		if (po == 3 && ismez!="") 
		{ 
			mark=" "; po = 0; 
		} 
		else mark = "";
		po++;
		priceNew = price.charAt(i)+mark+priceNew;
	}
}
toto.value = priceNew;
}
