function CalcCost(){
	vals=new Array()
	COST=this.document.forms[1].cost.value
	if (COST == "") {
		this.document.calc.reset()
		this.document.calc.elements[1].focus()
		return
	}
	if (COST > 124999) {
		alert ("The amount that you specified is too high for us to\ncalculate an accurate value of the lease payments.\nPlease contact the us at (905) 326-0676")
		this.document.calc.reset()
		this.document.calc.elements[1].select()
		this.document.calc.elements[1].focus()
		return
	}
 
	if (COST < 1000) {
		alert ("The amount that you specified is too low for us to\ncalculate an accurate value of the lease payments.\nPlease contact the us at (905) 326-0676")
		this.document.calc.reset()
		this.document.calc.elements[1].select()
		this.document.calc.elements[1].focus()
		return
	}

	if (COST < 125000) { // $50K to $125K
		vals[0]=.0472 // 24 month
		vals[1]=.0333 // 36 month
		vals[2]=.0269 // 48 month
	}
 
	if (COST < 50000) { // $25K to $50K
		vals[0]=.0476 // 24 month
		vals[1]=.0336 // 36 month
		vals[2]=.0271 // 48 month
	}
 
	if (COST < 25000) { // Up to $25K
		vals[0]=.0478 // 24 month
		vals[1]=.0339 // 36 month
		vals[2]=.0274 // 48 month
	}
 
	for (x=0, y=2; x <= 2; x+=1, y+=1) {
		temp=COST*vals[x]
		temp=new String(temp)
		ind=temp.indexOf(".")
		if (ind<1) {
			ind+=16
		}
		ind+=3
		temp = temp.substring(0,ind);
		if(temp.indexOf(".") > 0){
		temp = temp.substring(0,temp.indexOf("."));
		}
		this.document.calc.elements[y].value="$"+temp
	}
 
}

