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