function CurrencyFormatted(amount)
{
	var i = parseFloat(amount);
	if(isNaN(i)) { i = 0.00; }
	var minus = '';
	if(i < 0) { minus = '-'; }
	i = Math.abs(i);
	i = parseInt((i + .005) * 100);
	i = i / 100;
	s = new String(i);
	if(s.indexOf('.') < 0) { s += '.00'; }
	if(s.indexOf('.') == (s.length - 2)) { s += '0'; }
	s = minus + s;
	return s;
}




function rates(form)
{

cust=form.cust.value;
if(cust == 50) {totalc = 35;} else if (cust == 250) {totalc = 100; }
else if (cust == 'Unlimited') {totalc = 350; }

tech=form.tech.value;
if(tech == 1) {totalt = 0;} else if (tech == 2) {totalt = 25; }
else if (tech == 3) {totalt = 50; } else if (tech == 4) {totalt = 75; }
else if (tech == 5) {totalt = 100; } else if (tech == 10) {totalt = 200; }
else if (tech == 20) {totalt = 350; }

pay_type=form.pay_type.value;
if(pay_type == 0) {totalp = 0;} else if(pay_type == 1) {totalp = 50;}

inventory=form.inventory.value;
if(inventory == 0) {totali = 0;} else if(inventory == 1) {totali = 50;}

//pos=form.pos.value;
//if(pos == 0) {totalpos = 0;} 
//else if(pos == 1) {totalpos = 150;}
//else if(pos == 2) {totalpos = 300;}
//else if(pos == 3) {totalpos = 450;}
//else if(pos == 4) {totalpos = 600;}
//else if(pos == 5) {totalpos = 750;}
//else if(pos == 10) {totalpos = 1000;}
totalpos=0;

active=form.active.value;
if(active == 0) {totala = 0;} 
else if(active == 1) {totala = 50;}

profile=form.profile.value;
if(profile == 1) {totalprofile = 0;} 
else if(profile == 2) {totalprofile = 35;}
else if(profile == 3) {totalprofile = 70;}
else if(profile == 4) {totalprofile = 105;}

support=form.support.value;
if(support == 0) {totalsupport = 0;} 
else if(support == 1) {totalsupport = 50;} 

discount=form.code.value;
//alert ("discount" + discount);
total=(totalc + totalt + totalp + totali + totala + totalpos + totalprofile + totalsupport); 


computers=form.computers.value;
if(computers == 1) {total+=0;} 
else if(computers == 2) {total= (total + (total * .5));}
else if(computers == 3) {total= (total + (total * 1.5));}
else if(computers == 4) {total= (total + (total * 2.5));}

if(discount == 'military'){
total= (total - (total * .10));
}

if(discount == 'upgrade'){
total-=35;
}

currency=CurrencyFormatted(total)
form.total.value=currency;


}

