function calculatePercentage (newval) {
    value1 = (2.41*newval);
    document.getElementById("weeklyPayRoll").value = "$" + CommaFormatted((value1*52).toFixed(2));
    document.getElementById("biWeeklyPayRoll").value = "$" + CommaFormatted((value1*26).toFixed(2));
}
function calculatePercentage2 (newval) {
    value2 = (1.90*newval);
    document.getElementById("weeklyWage").value = "$" + CommaFormatted((value2*52).toFixed(2));
    document.getElementById("weeklyStatement").value = "$" + CommaFormatted((value2*26).toFixed(2));
}
function resetValues () {
    document.getElementById("paidEmployees").value = "";
        document.getElementById("weeklyPayRoll").value = "";
            document.getElementById("biWeeklyPayRoll").value = "";
}
function resetValues2 () {
    document.getElementById("paidEmployees2").value = "";
        document.getElementById("weeklyWage").value = "";
            document.getElementById("weeklyStatement").value = "";
}
function CommaFormatted(amount)
{
	var delimiter = ","; // replace comma if desired
	var a = amount.split('.',2)
	var d = a[1];
	var i = parseInt(a[0]);
	if(isNaN(i)) { return ''; }
	var minus = '';
	if(i < 0) { minus = '-'; }
	i = Math.abs(i);
	var n = new String(i);
	var a = [];
	while(n.length > 3)
	{
		var nn = n.substr(n.length-3);
		a.unshift(nn);
		n = n.substr(0,n.length-3);
	}
	if(n.length > 0) { a.unshift(n); }
	n = a.join(delimiter);
	if(d.length < 1) { amount = n; }
	else { amount = n + '.' + d; }
	amount = minus + amount;
	return amount;
}
// end of function CommaFormatted()