var arrMonth;
var arrMonthShort;
var strDay;
var strMonth;
var strYear;

function blnIsEmpty(strValue) {
	var blnIsEmpty_val;
	if (strValue == null) {
		blnIsEmtpy_val = true
	} else { 
		if (strValue == "") {
			blnIsEmpty_val = true
		} else {
			blnIsEmpty_val = false
		}
	}
	return blnIsEmpty_val;
}

//Format a strWert based on a string describing a style
//
//Datumsformate benötigen ein ARRAY mit Monatsnamen! Bezeichnung: arrMonth und arrMonthShort
//Bsp.: arrMonth = array('Januar', 'Februar',...))
//Bsp.: arrMonthShort = array('Jan', 'Feb',...))
//
//Datumsbezeichnungen mit Strings für Monat / Jahr / Tag benötigen die Übersetzungen für die Bezeichnungen
// Format: strYear, strMonth, strDay
function strFormat(strValue, strFormatString) {
	var arrFormatParts;
	var blnDate;
	var blnTime;
	var intCounter;
	var lngFixed;
	var lngPrecision;
	var strDecimal;
	var strGroup;
	var ratioOnLeft;
	var strDD;
	var strHH;
	var strMM;
	var strNN;
	var dblValue;
	var strSS;
	var strYY;
	var strYYYY;
	var objRegEx;
	var objRegMatches;
	var dblBoundary;
	var strComparison;
	var strTemp;
	var intTemp;
	var intI;
	
	if (!blnIsEmpty(strValue)) {
		strValue = strValue + "";
		// Don't format in case current format is empty
		if (!blnIsEmpty(strFormatString)) {
			// dynamic formats
			if(strFormatString.indexOf("dynamic") != -1) {
					strCondition = strFormatString.split(":")[1].split(";")[0].replace(",", ".");
					strConditionTrue = strFormatString.split(":")[1].split(";")[1];
					strConditionFalse = strFormatString.split(":")[1].split(";")[2];
					if(strCondition.substr(0, 2) == "<=") {
						strFormatString = strValue.replace(",", ".") <= strCondition.substr(2) ? strConditionTrue : strConditionFalse;
					}
					else if (strCondition.substr(0,2) == ">=") {
						strFormatString = strValue.replace(",", ".") >= strCondition.substr(2) ? strConditionTrue : strConditionFalse;
					}
					else if (strCondition.substr(0,1) == "<") {
						strFormatString = strValue.replace(",", ".") < strCondition.substr(1) ? strConditionTrue : strConditionFalse;
					}
					else if (strCondition.substr(0,1) == ">") {
						strFormatString = strValue.replace(",", ".") > strCondition.substr(1) ? strConditionTrue : strConditionFalse;
					}
					else if (strCondition.substr(0,1) == "=") {
						strFormatString = strValue.replace(",", ".") == strCondition.substr(1) ? strConditionTrue : strConditionFalse;
					}
			}
			switch (strFormatString) {
				// Numeric formats
				// Lines 1 for all, 2-5 German, 6-9 English, 10-14 Swiss
				case "0": case "+0": case "0%": case "+0%": case "0 EUR": case "0 T": case "0 Mio": case "0 Mrd":
				case "0,0": case "+0,0": case "0,0%": case "+0,0%": case "0,0 EUR": case "0,0 T": case "0,0 Mio": case "0,0 Mrd":
				case "0,00": case "+0,00": case "0,00%": case "+0,00%": case "0,00 EUR": case "0,00 T": case "0,00 Mio": case "0,00 Mrd":
				case "0,000": case "+0,000": case "0,000%": case "+0,000%": case "0,000 EUR": case "0,000 T": case "0,000 Mio": case "0,000 Mrd":
				case "0,0000": case "+0,0000": case "0,0000%": case "+0,0000%": case "0,0000 EUR": case "0,0000 T": case "0,0000 Mio": case "0,0000 Mrd":
				case "0.0": case "+0.0": case "0.0%": case "+0.0%": case "0.0 EUR": case "0.0 T": case "0.0 Mio": case "0.0 Mrd":
				case "0.00": case "+0.00": case "0.00%": case "+0.00%": case "0.00 EUR": case "0.00 T": case "0.00 Mio": case "0.00 Mrd":
				case "0.000": case "+0.000": case "0.000%": case "+0.000%": case "0.000 EUR": case "0.000 T": case "0.000 Mio": case "0.000 Mrd":
				case "0.0000": case "+0.0000": case "0.0000%": case "+0.0000%": case "0.0000 EUR": case "0.0000 T": case "0.0000 Mio": case "0.0000 Mrd":
					strValue = strValue.replace(",", ".");
					if (!isNaN(strValue)) {
						strDecimal = ".";
						strGroup = "";
						lngPrecision = 0;
						if(strFormatString.indexOf(".") > 0) {
							lngPrecision = strFormatString.lastIndexOf("0") - strFormatString.lastIndexOf(".");
							strDecimal = ".";
							strGroup = ",";
						} else if (strFormatString.indexOf(",") > 0) {
							lngPrecision = strFormatString.lastIndexOf("0") - strFormatString.lastIndexOf(",");
							strDecimal = ",";
							strGroup = ".";
						}
						// Swiss Format
						if (strFormatString.indexOf("'") != -1) {
							strGroup = "'";
						}
						
						if (strFormatString.charAt(strFormatString.length - 1) == "%") {
							strValue = strNumberFormat(strValue, lngPrecision, strGroup, strDecimal);
							strValue = strValue.concat("%");
						} else if (strFormatString.substr(strFormatString.length - 3, 3) == "EUR") {
							strValue = strNumberFormat(strValue, lngPrecision, strGroup, strDecimal);
							strValue = strValue.concat("&nbsp;EUR");
						} else if (strFormatString.charAt(strFormatString.length - 1) == "T") {
							strValue = strValue / 1000;
							strValue = strNumberFormat(strValue, lngPrecision, strGroup, strDecimal);
							strValue = strValue.concat("&nbsp;T");
						} else if (strFormatString.substr(strFormatString.length - 3, 3) == "Mio") {
							strValue = strValue / 1000000;
							strValue = strNumberFormat(strValue, lngPrecision, strGroup, strDecimal);
							strValue = strValue.concat("&nbsp;Mio");
						} else if (strFormatString.substr(strFormatString.length - 3, 3) == "Mrd") {
							strValue = strValue / 1000000000;
							strValue = strNumberFormat(strValue, lngPrecision, strGroup, strDecimal);
							strValue = strValue.concat("&nbsp;Mio");
						} else {
							strValue = strNumberFormat(strValue, lngPrecision, strGroup, strDecimal);
						}
						
						if (strFormatString.charAt(0) == "+" && strValue.charAt(0) != "-") { 
							strValue = "+" + strValue;
						}
						strValue = strValue.replace(/^-\./,"-");
					}
					break;
				// 1-4 German, 5-8 English, 9-12 Swiss
				case "0,?": case "0,0?": case "0,00?": case "0,000?": case "0,0000?":
				case "0,??": case "0,0??": case "0,00??": case "0,000???": case "0,0000??"		:
				case "0,???": case "0,0???": case "0,00???": case "0,000????": case "0,0000???"		:
				case "0,????": case "0,0????": case "0,00????": case "0,000?????": case "0,0000????"	:
					strValue = strValue.replace(",", ".");
					if (!isNaN(strValue)) {
						
						// Die LÃ¤nge zurechtschneiden bzw. auffÃ¼llen und ggf. GroupSeparator setzen
						if (strFormatString.indexOf(",") != -1) {
							lngPrecision = strFormatString.length - strFormatString.lastIndexOf(",");
							strDecimal = ",";
							strGroup = "";
						} else if (strFormatString.lastIndexOf(".") != -1 && strFormatString.lastIndexOf("'") != -1) {
							lngPrecision = strFormatString.length - strFormatString.lastIndexOf(".");
							strDecimal = ".";
							strGroup = "'";
						} else if (strFormatString.lastIndexOf(".") != -1) {
							lngPrecision = strFormatString.length - strFormatString.lastIndexOf(".");
							strDecimal = ".";
							strGroup = "";
						}
						strValue = strNumberFormat(strValue, lngPrecision, strGroup, strDecimal);
						
						// Anzahl der Stellen die angezeigt werden wenn nicht 0
						strValue = strRTrimZeros(strValue, strFormatString, strDecimal)
					}
					break;
				// 1-3 German, 4-6 English, 7-9 Swiss
				case "0,#": case  "0,0#": case "0,00#": case "0,000#": case "0,0000#":
				case "0,#%": case "0,0#%": case "0,00#%": case "0,000#%": case "0,0000#%":
				case "+0,#%": case "+0,0#%": case "+0,00#%": case "+0,000#%": case "+0,0000#%":
				strValue = strValue.replace(",", ".");
					if (!isNaN(strValue)) {
						
						if (strFormatString.indexOf(",") != -1) {
							strDecimal = ",";
							strGroup = "";
						} else if (strFormatString.lastIndexOf(".") != -1 && strFormatString.lastIndexOf("'") != -1) {
							strDecimal = ".";
							strGroup = "'";
						} else if (strFormatString.lastIndexOf(".") != -1) {
							strDecimal = ".";
							strGroup = "";
						}
						
						lngPrecision = strValue.length - strValue.lastIndexOf(".");
						strValue = strNumberFormat(strValue, lngPrecision, strGroup, strDecimal);
						strValue = strRTrimZeros(strValue, strFormatString, strDecimal)
						
						if (strFormatString.charAt(0) == "+" && strValue.charAt(0) != "-") { 
							strValue = "+" + strValue;
						}
					}
					break;
				case "1/n": case "1/n.":
					strValue = strValue.replace(",", ".");
					if (!isNaN(strValue)) {
						if (strValue != 0) {
							// Determine which side of the ratio is "1"
							if (strValue >= 1) {
								strValue = 1 / strValue;
							}
							lngPrecision = 4;
							strValue = strNumberFormat(strValue, lngPrecision, "", ".");
							while (strValue.length > 1 && strValue.charAt(strValueDecimalPart.length - 1) == "0") {
								// Letzte Null(en) abschneiden
								strValue = strValue.slice(0, strValue.length - 1);
							}
							if (isNaN(strValue.charAt(strValue.length - 1))) {
								strValue = strValue.slice(0, strValue.length - 1);
							}
							
						}
					}
					break;
				// Time formats (without seconds)
				case "HH:NN":
					var objExpression = /\d{2}:\d{2}:d{2}/;
					if (objExpression.test(strValue) == true) {
						strValue = strValue.substr(0,5);
					}
				// Time formats (with seconds)
				case "HH:NN:SS":
					var objExpression = /\d{2}:\d{2}:d{2}/;
					if (objExpression.test(strValue) == true) {
						strValue = strValue;
					}
					break;
				// Date / time formats
				case "DD.MM.": case "DD/MM": case "DD-MM": case "MM/DD/YY": case "DD/MM/YY": case "DD.MM.YY": case "DD-MM-YY": case "MM-DD-YY":
				case "MM/DD/YYYY": case "DD/MM/YYYY": case "DD.MM.YYYY": case "DD-MM-YYYY": case "MM-DD-YYYY": case "YYYY-MM-DD": case "YYYY[Jahr]MM[Monat]DD[Tag]":
				case "MMM, D YYYY": case "MMMM": case "DD MMM YY": case "DD MMM YYYY": case "D MMM YY": case "D MMM YYYY":
				case "MM/DD/YY HH:NN": case "DD/MM/YY HH:NN": case "DD.MM.YY HH:NN": case "DD-MM-YY HH:NN": case "MM-DD-YY HH:NN":
				case "MM/DD/YYYY HH:NN": case "DD/MM/YYYY HH:NN": case "DD.MM.YYYY HH:NN": case "DD-MM-YYYY HH:NN": case "MM-DD-YYYY HH:NN": case "YYYY-MM-DD HH:NN": case "MMM, D YYYY HH:NN":
				case "DD MMM YY HH:NN": case "DD MMM YYYY HH:NN": case "D MMM YY HH:NN": case "D MMM YYYY HH:NN":
				case "MM/DD/YY HH:NN:SS": case "DD/MM/YY HH:NN:SS": case "DD.MM.YY HH:NN:SS": case "DD-MM-YY HH:NN:SS": case "MM-DD-YY HH:NN:SS":
				case "MM/DD/YYYY HH:NN:SS": case "DD/MM/YYYY HH:NN:SS": case "DD.MM.YYYY HH:NN:SS": case "DD-MM-YYYY HH:NN:SS": case "MM-DD-YYYY HH:NN:SS":
				case "DD MMM YY HH:NN:SS": case "DD MMM YYYY HH:NN:SS": case "D MMM YY HH:NN:SS": case "D MMM YYYY HH:NN:SS":
					if (!isNaN(strValue) && strValue.length == 8) {
						blnDate = true;
						strYYYY = strValue.substr(0,4);
						strYY = strValue.substr(2,2);
						strMM = strValue.substr(4,2);
						strDD = strValue.substr(6,2);
					} else if (strValue.length >= 10) {
						blnDate = true
						strYYYY = strValue.substr(6,4);
						strYY = strValue.substr(8,2);
						strMM = strValue.substr(3,2);
						strDD = strValue.substr(0,2);
						if (strValue.length >=15) {
							strHH = strValue.substr(11,2);
							strNN = strValue.substr(14,2);
							if (strValue.length >= 18) {
								strSS = strValue.substr(17,2);
							} else {
								strSS = ""
							}
						} else {
							strHH = "";
							strNN = "";
						}
					} else {
						blnDate = false
					}
					if (blnDate) {
						switch(strFormatString) {
							case "DD/MM":						strValue = strDD + "/" + strMM; break;
							case "DD-MM":						strValue = strDD + "-" + strMM; break;
							case "DD.MM.":						strValue = strDD + "." + strMM + "."; break;
							case "DD/MM/YY":					strValue = strDD + "/" + strMM + "/" + strYY; break;
							case "MM/DD/YY":					strValue = strMM + "/" + strDD + "/" + strYY; break;
							case "DD/MM/YY":					strValue = strDD + "/" + strMM + "/" + strYY; break;
							case "DD.MM.YY":					strValue = strDD + "." + strMM + "." + strYY; break;
							case "DD-MM-YY":					strValue = strDD + "-" + strMM + "-" + strYY; break;
							case "MM-DD-YY":					strValue = strMM + "-" + strDD + "-" + strYY; break;
							case "MM/DD/YYYY":					strValue = strMM + "/" + strDD + "/" + strYYYY; break;
							case "DD/MM/YYYY":					strValue = strDD + "/" + strMM + "/" + strYYYY; break;
							case "DD.MM.YYYY":					strValue = strDD + "." + strMM + "." + strYYYY; break;
							case "DD-MM-YYYY":					strValue = strDD + "-" + strMM + "-" + strYYYY; break;
							case "MM-DD-YYYY":					strValue = strMM + "-" + strDD + "-" + strYYYY; break;
							case "YYYY-MM-DD":					strValue = strYYYY + "-" + strMM + "-" + strDD; break;
							case "YYYY[Jahr]MM[Monat]DD[Tag]":	strValue = strYYYY + strYear + strMM + strMonth + strDD + strDay; break;
							case "MMM, D YYYY":					strValue = arrMonthShort[parseInt(strMM) - 1].substr(0,3) + " " + parseInt(strDD) + ", " + strYYYY; break;
							case "MMMM":						strValue = arrMonth[parseInt(strMM) - 1]; break;
							case "DD MMM YY":					strValue = strDD + " " + arrMonthShort[parseInt(strMM) - 1] + " " + strYY; break;
							case "DD MMM YYYY":					strValue = strDD + " " + arrMonthShort[parseInt(strMM) - 1] + " " + strYYYY; break;
							case "D MMM YY":					strValue = parseInt(strDD) + " " + arrMonthShort[parseInt(strMM) - 1] + " " + strYY; break;
							case "D MMM YYYY":					strValue = parseInt(strDD) + " " + arrMonthShort[parseInt(strMM) - 1] + " " + strYYYY; break;
							case "MM/DD/YY HH:NN":		strValue = strMM + "/" + strDD + "/" + strYY + " " + strHH + ":" + strNN; break;
							case "DD/MM/YY HH:NN":		strValue = strDD + "/" + strMM + "/" + strYY + " " + strHH + ":" + strNN; break;
							case "DD.MM.YY HH:NN":		strValue = strDD + "." + strMM + "." + strYY + " " + strHH + ":" + strNN; break;
							case "DD-MM-YY HH:NN":		strValue = strDD + "-" + strMM + "-" + strYY + " " + strHH + ":" + strNN; break;
							case "MM-DD-YY HH:NN":		strValue = strMM + "-" + strDD + "-" + strYY + " " + strHH + ":" + strNN; break;
							case "MM/DD/YYYY HH:NN":	strValue = strMM + "/" + strDD + "/" + strYYYY + " " + strHH + ":" + strNN; break;
							case "DD/MM/YYYY HH:NN":	strValue = strDD + "/" + strMM + "/" + strYYYY + " " + strHH + ":" + strNN; break;
							case "DD.MM.YYYY HH:NN":	strValue = strDD + "." + strMM + "." + strYYYY + " " + strHH + ":" + strNN; break;
							case "DD-MM-YYYY HH:NN":	strValue = strDD + "-" + strMM + "-" + strYYYY + " " + strHH + ":" + strNN; break;
							case "MM-DD-YYYY HH:NN":	strValue = strMM + "-" + strDD + "-" + strYYYY + " " + strHH + ":" + strNN; break;
							case "YYYY-MM-DD HH:NN":	strValue = strYYYY + "-" + strMM + "-" + strDD + " " + strHH + ":" + strNN; break;
							case "MMM, D YYYY HH:NN":	strValue = arrMonthShort[parseInt(strMM) - 1].substr(0,3) + " " + parseInt(strDD) + ", " + strYYYY + " " + strHH + ":" + strNN; break;
							case "DD MMM YY HH:NN":		strValue = strDD + " " + arrMonthShort[parseInt(strMM) - 1] + " " + strYY + " " + strHH + ":" + strNN; break;
							case "DD MMM YYYY HH:NN":	strValue = strDD + " " + arrMonthShort[parseInt(strMM) - 1] + " " + strYYYY + " " + strHH + ":" + strNN; break;
							case "D MMM YY HH:NN":		strValue = parseInt(strDD) + " " + arrMonthShort[parseInt(strMM) - 1] + " " + strYY + " " + strHH + ":" + strNN; break;
							case "D MMM YYYY HH:NN":	strValue = parseInt(strDD) + " " + arrMonthShort[parseInt(strMM) - 1] + " " + strYYYY + " " + strHH + ":" + strNN; break;
							case "MM/DD/YY HH:NN:SS":		strValue = strMM + "/" + strDD + "/" + strYY + " " + strHH + ":" + strNN + ":" + strSS; break;
							case "DD/MM/YY HH:NN:SS":		strValue = strDD + "/" + strMM + "/" + strYY + " " + strHH + ":" + strNN + ":" + strSS; break;
							case "DD.MM.YY HH:NN:SS":		strValue = strDD + "." + strMM + "." + strYY + " " + strHH + ":" + strNN + ":" + strSS; break;
							case "DD-MM-YY HH:NN:SS":		strValue = strDD + "-" + strMM + "-" + strYY + " " + strHH + ":" + strNN + ":" + strSS; break;
							case "MM-DD-YY HH:NN:SS":		strValue = strMM + "-" + strDD + "-" + strYY + " " + strHH + ":" + strNN + ":" + strSS; break;
							case "MM/DD/YYYY HH:NN:SS":		strValue = strMM + "/" + strDD + "/" + strYYYY + " " + strHH + ":" + strNN + ":" + strSS; break;
							case "DD/MM/YYYY HH:NN:SS":		strValue = strDD + "/" + strMM + "/" + strYYYY + " " + strHH + ":" + strNN + ":" + strSS; break;
							case "DD.MM.YYYY HH:NN:SS":		strValue = strDD + "." + strMM + "." + strYYYY + " " + strHH + ":" + strNN + ":" + strSS; break;
							case "DD-MM-YYYY HH:NN:SS":		strValue = strDD + "-" + strMM + "-" + strYYYY + " " + strHH + ":" + strNN + ":" + strSS; break;
							case "MM-DD-YYYY HH:NN:SS":		strValue = strMM + "-" + strDD + "-" + strYYYY + " " + strHH + ":" + strNN + ":" + strSS; break;
							case "DD MMM YY HH:NN:SS":		strValue = strDD + " " + arrMonthShort[parseInt(strMM) - 1] + " " + strYY + " " + strHH + ":" + strNN + ":" + strSS; break;
							case "DD MMM YYYY HH:NN:SS":	strValue = strDD + " " + arrMonthShort[parseInt(strMM) - 1] + " " + strYYYY + " " + strHH + ":" + strNN + ":" + strSS; break;
							case "D MMM YY HH:NN:SS":		strValue = parseInt(strDD) + " " + arrMonthShort[parseInt(strMM) - 1] + " " + strYY + " " + strHH + ":" + strNN + ":" + strSS; break;
							case "D MMM YYYY HH:NN:SS":		strValue = parseInt(strDD) + " " + arrMonthShort[parseInt(strMM) - 1] + " " + strYYYY + " " + strHH + ":" + strNN + ":" + strSS; break;
						}
					}
					break;
				
			}
		}
	}
	else
	{
		strValue = "";
	}
	return strValue;
}

	
	
function strNumberFormat(strValue, lngPrecision, strGroupSeparator, strDecimalSeparator)
{
	var arrParts;
	var intI;
	var strPart;
	var strTemp;
	
	// number_format(number, decimals, comma, formatSeparator)
	strValue = parseFloat(strValue).toFixed(lngPrecision);
	strValue = strValue + '';
	arrParts = strValue.split('.');
	if(!arrParts[0]) arrParts[0] = '0';
	if(!arrParts[1]) arrParts[1] = '';

	if(strDecimalSeparator != '' && arrParts[0].length > 3)
	{
		strPart = arrParts[0];
		arrParts[0] = '';
		for(intI = 3; intI < strPart.length; intI += 3)
		{
			strTemp = strPart.slice(strPart.length - intI, strPart.length - intI + 3);
			arrParts[0] = strGroupSeparator + strTemp +  arrParts[0] + '';
		}
		strTemp = strPart.substr(0, (strPart.length % 3 == 0) ? 3 : (strPart.length % 3));
		arrParts[0] = strTemp + arrParts[0];
	}
	
	strDecimalSeparator = (lngPrecision <= 0) ? '': strDecimalSeparator;
	return arrParts[0] + strDecimalSeparator + arrParts[1];
}
	
function strRTrimZeros(strValue, strFormatString, strDecimal)
{
	var intDecimal;
	var intI;
	var strFormatStringDecimalPart;
	var strTemp;
	var intKeep;
	var intOptional;
	var strValueDecimalPart;
	if (strValue.indexOf(strDecimal) != -1)
	{
		if (strValue.charAt(strValue.length - 1) == "0")
		{
			intDecimal = 0;
			if (strFormatString.indexOf(strDecimal) != -1)
			{
				strFormatStringDecimalPart = strFormatString.split(strDecimal)[1];
				strTemp = strFormatStringDecimalPart.slice(strFormatStringDecimalPart.indexOf("0"), strFormatStringDecimalPart.lastIndexOf("0") + 1);
				intKeep = strTemp.length;
				
				if (strFormatStringDecimalPart.indexOf("?") != -1)
				{
					strTemp = strFormatStringDecimalPart.slice(strFormatStringDecimalPart.indexOf("?"), strFormatStringDecimalPart.lastIndexOf("?") + 1);
					intOptional = strTemp.length;
				}
				else if (strFormatStringDecimalPart.indexOf("#") != -1)
				{
					intOptional = 10 - intKeep + 1;
				}
			}
			strValueDecimalPart = strValue.split(strDecimal)[1];
			intDecimal = strValueDecimalPart.length;
			if (intDecimal < intKeep)
			{
				intI = intKeep - intDecimal;
				while (intI > 0)
				{
					strValueDecimalPart = strValueDecimalPart.concat("0");
					intI = intI - 1;
				}
			}
			else
			{
				intI = intKeep + intOptional;
				if (intDecimal > intI)
				{
					strValueDecimalPart = strValueDecimalPart.substr(0, intI);
				}
				else if (intDecimal < intI)
				{
					intI = strValueDecimalPart.length;
				}
				while (intI > intKeep && strValueDecimalPart.charAt(strValueDecimalPart.length - 1) == "0")
				{
					// Letzte Null(en) abschneiden
					strValueDecimalPart = strValueDecimalPart.slice(0, strValueDecimalPart.length - 1);
					intI = intI - 1;
				}
			}				
			// Trennzeichen entfernen wenn keine Zahl nach der Trennung vorhanden
			strValue = strValue.split(strDecimal)[0] + strDecimal + strValueDecimalPart;
			if (isNaN(strValue.charAt(strValue.length - 1)))
			{
				strValue = strValue.slice(0, strValue.length - 1);
			}
			
			// ggf. % anfuegen
			if (strFormatString.charAt(strFormatString.length - 1) == "%")
			{
				strValue = strValue + '&nbsp;%';
			}
		}
	}
	return strValue;
}