/* - - - - - do the calc - - - - - */	
function calc_CT() {
var selInt, i;
var vMult, fYears;
var vCost, vYears, tCost, dCost; 
selInt=document.form1.emp_type.selectedIndex;

if (selInt == 1) {
//vMult = 2.41; 
	vMult = 0.00;
	if (document.form1.ct_part1.checked == true) vMult = 0.60;
	if (document.form1.ct_part2.checked == true) vMult = vMult + 0.60;
	if (document.form1.ct_part3.checked == true) vMult = vMult + 0.30;
	if (document.form1.ct_part4.checked == true) vMult = vMult + 0.10;
	if (document.form1.ct_part5.checked == true) vMult = vMult + 0.81;
}
else if (selInt == 2) {
//vMult = 1.76; 
	vMult = 0.00;
	if (document.form1.ct_part1.checked == true) vMult = 0.25;
	if (document.form1.ct_part2.checked == true) vMult = vMult + 0.25;
	if (document.form1.ct_part3.checked == true) vMult = vMult + 0.12;
	if (document.form1.ct_part4.checked == true) vMult = vMult + 0.10;
	if (document.form1.ct_part5.checked == true) vMult = vMult + 1.04;
}
else if (selInt == 3) {
//vMult = 1.41; 
	vMult = 0.00;
	if (document.form1.ct_part1.checked == true) vMult = 0.35;
	if (document.form1.ct_part2.checked == true) vMult = vMult + 0.35;
	if (document.form1.ct_part3.checked == true) vMult = vMult + 0.16;
	if (document.form1.ct_part4.checked == true) vMult = vMult + 0.10;
	if (document.form1.ct_part5.checked == true) vMult = vMult + 0.45;
}
else vMult = 0.00; 

vCost = document.form1.emp_cost.value; 
if (vCost.search(/,/) > -1) 
	vCost = vCost.replace(/,/g, "");
vCost = parseInt(vCost); 

fYears = parseFloat(document.form1.emp_years.value); 
//vYears = 1 / fYears; 

//tCost = vCost * vYears * vMult; 
tCost = vCost * vMult; 
tCost = tCost * ( 1 + ((fYears - 1) / 10))
tCost = Math.round(tCost); 
tCost = tCost.toString();

i = tCost.length;
dCost = "";
while (i > 3) {
	dCost = "," + tCost.substring(i - 3, i) + dCost;
	i = i - 3;
}
if (i > 0) dCost = tCost.substring(0, i) + dCost;
document.form1.tot_cost.value = dCost;
}
