document.getElementById('assessmentForm').addEventListener('submit', function(event) { event.preventDefault(); // Prevent the form from reloading the page // Get values from the form and convert to numbers const passiveAngle = parseFloat(document.getElementById('passiveAngle').value); const activeAngle = parseFloat(document.getElementById('activeAngle').value); const latStanding = parseFloat(document.getElementById('latStanding').value); const latSeated = parseFloat(document.getElementById('latSeated').value); const pecMajorAngle = parseFloat(document.getElementById('pecMajorAngle').value); const externalRotationAngle = parseFloat(document.getElementById('externalRotationAngle').value); let reportHTML = '
Your passive range (${passiveAngle}°) is significantly greater than your active range (${activeAngle}°). This points to a Motor Control or Strength Deficit. You have the flexibility but lack the strength to use it.
`; limitingFactors.push('Motor Control/Strength'); } else { flexionReport += `Your active and passive ranges are similar. Any limitation is likely due to tissue tightness. This is a good result.
`; } flexionReport += `Your range of motion dropped significantly from ${latStanding}° (standing) to ${latSeated}° (seated/rounded). This strongly indicates that Tight Lats are a primary limiting factor.
`; limitingFactors.push('Tight Lats'); } else { latReport += `Your range of motion was stable between the two positions. Your lats are likely not a significant restriction. This is a good result.
`; } latReport += `Your arms only reached ${pecMajorAngle}° past your shoulders (goal is 45°). This indicates Tight Pec Major muscles, which can pull the shoulders forward.
`; limitingFactors.push('Tight Pec Major'); } else { pecReport += `You achieved ${pecMajorAngle}° of extension, meeting the goal of 45°. Your pec major length is excellent. This is a great result.
`; } pecReport += `Your external rotation was ${externalRotationAngle}° past vertical (goal is 45°). This indicates Tight Internal Rotators, a very common issue that restricts overhead mobility.
`; limitingFactors.push('Tight Internal Rotators'); } else { externalRotationReport += `You achieved ${externalRotationAngle}° of external rotation, meeting the goal of 45°. Your internal rotator length is excellent. This is a great result.
`; } externalRotationReport += `Excellent work! Based on your results, you have well-balanced shoulder mobility with no significant limitations detected. Focus on maintaining this balance with a well-rounded program.
`; } else { summaryReport += `Your primary areas for improvement appear to be: ${limitingFactors.join(', ')}.
`; summaryReport += `To improve your shoulder health, prioritize stretches and mobility drills that target these specific muscles.
`; } summaryReport += `