<!-- Hide script from old browsers

<!-- Audiogearreviews.com Enclosure Volume Calculator -->

///////////////Rectangular Enclosures///////////////
<!-- Gross enclosure volume for sealed rectangular enclosures -->
function DisplayVolume() {
	grossvolume = 	(((document.calculator.Legnth.value - (2 * document.calculator.Thickness.value))) *
	 					((document.calculator.Height.value - (2 * document.calculator.Thickness.value))) *
	 					((document.calculator.Width.value - (2 * document.calculator.Thickness.value))))/1728;
	total1 = (Math.round(grossvolume*100))/100
	document.calculator.Volume.value = total1
}

<!-- Port Area in square inches -->
function DisplayArea() {
	radius = document.calculator.Diameter.value-0.25;
	area = ((radius * radius) * Math.PI) * document.calculator.Tuning.value;
	totalarea = (Math.round(area*100))/100
	document.calculator.Area.value = totalarea
}

<!-- Net enclosure volume for sealed rectangular enclosures -->
function DisplayNet() {
	radius = document.calculator.Diameter.value;
	area = ((radius * radius) * Math.PI) * document.calculator.Tuning.value;
	volport = (area* document.calculator.Port.value)/1728;
	
	netvolume = 	total1 - (volport +(document.calculator.Number.value * document.calculator.Size.value));
	total2 = (Math.round(netvolume*100))/100
	document.calculator.Net.value = total2
}

<!-- Port Tuning Frequency -->
function DisplayFreq() {
	tuneRad = (Math.sqrt(document.calculator.Tuning.value))*(document.calculator.Diameter.value - 0.25);
	upper = 8466 * tuneRad * tuneRad;
	lower1 = (1.463 * tuneRad) - (-1 * document.calculator.Port.value);
	lower2 = lower1 * total2
	freqBox =  Math.sqrt(upper/lower2)
	total3 = Math.round(freqBox)
	document.calculator.Freq.value = total3
}


///////////////End Rectangular Enclosures///////////////



// End hiding script from old browsers -->
