


function calcTrail() {
	if(document.form1.tirediam.value == "") {
		alert("OOOps - You forgot to enter the front tire diameter!")
		document.form1.tirediam.focus()
		return false
	}
	if(document.form1.rake.value == "") {
		alert("OOOps - You forgot to enter the head rake in degrees!")
		document.form1.rake.focus()
		return false
	}
	if(document.form1.offset.value == "") {
		alert("OOOps - You forgot to enter the offset value in inches!")
		document.form1.offset.focus()
		return false
	}
	if(document.form1.length1.value == "") {
		alert("OOOps - You forgot to enter the length of front forks in inches!")
		document.form1.length.focus()
		return false
	}
	if(document.form1.tripletree.value == "") {
		alert("OOOps - You forgot to enter the tree rake in degrees!")
		document.form1.tripletree.focus()
		return false
	}
	
	anglea = 90 + (document.form1.tripletree.value * 1)
	anglear = (anglea / 180) * Math.PI
	anglec = document.form1.rake.value
	anglecr = (anglec / 180) * Math.PI
	angled = (document.form1.rake.value * 1) + (document.form1.tripletree.value * 1)
	angledr = (angled * 1 / 180) * Math.PI
	tempoff = document.form1.offset.value
	result1 = tempoff * Math.sin(anglear)
	x = result1 / Math.sin(anglecr)
	templength1 = document.form1.length1.value
	w = templength1 * Math.cos(angledr) 
	y = Math.sin(angledr) * templength1
	tempdiam1 = document.form1.tirediam.value
	tempdiam = tempdiam1 / 2
	tempv = (w * 1) - (x * 1)
	v = (tempv * 1) + (tempdiam *1)
	z = Math.tan(anglecr) * v
	tempi = (z * 1) - (y * 1)
	test = tempi
	tempj = Math.round(test * 100)
	tempk = tempj * .01
	daRatio = parseInt(tempk * 100) / 100 
	document.form1.ratio.value = daRatio
}




