<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><style>html{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;line-height:1.6;color:#1e293b;background:#fff;}body{margin:0;padding:0;background:#fff;color:#1e293b;}img{max-width:100%;height:auto;display:block;}table{max-width:100%;}</style></head><body> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Radiator Water Capacity Calculator</title> <style> body { font-family: 'Arial', sans-serif; background-color: #f4f6f9; margin: 0; padding: 0; display: flex; justify-content: center; align-items: center; height: 100vh; overflow: hidden; /* Prevents scrollbars */ } .container { background-color: white; width: 100%; max-width: 900px; padding: 20px; border-radius: 10px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); box-sizing: border-box; /* Ensures padding is included in the width */ overflow: hidden; } h2 { text-align: center; color: #333; font-size: 24px; } .tab-btn { background-color: #007bff; color: white; border: none; padding: 12px; border-radius: 8px; margin: 5px; cursor: pointer; transition: background-color 0.3s; flex: 1; } .tab-btn:hover { background-color: #0056b3; } .tab-container { display: flex; margin-bottom: 30px; flex-wrap: wrap; } .form-group { margin-bottom: 20px; } label { font-weight: bold; color: #555; } input, select { width: 100%; padding: 10px; margin-top: 8px; border-radius: 8px; border: 1px solid #ddd; font-size: 16px; box-sizing: border-box; } .calculate-btn { background-color: #28a745; color: white; border: none; padding: 12px; border-radius: 8px; width: 100%; font-size: 16px; cursor: pointer; margin-top: 20px; } .calculate-btn:hover { background-color: #218838; } .result { margin-top: 20px; padding: 15px; background-color: #f9f9f9; border: 1px solid #ddd; border-radius: 8px; font-size: 18px; text-align: center; color: #333; } .result p { margin: 10px 0; } .result .formula { color: #007bff; font-weight: bold; } </style> </head> <body> <div class="container"> <h2>Radiator Water Capacity Calculator</h2> <!-- Tabs for different calculation methods --> <div class="tab-container"> <button onclick="showBasic()" id="basicTab" class="tab-btn">Basic</button> <button onclick="showPanelRadiator()" id="panelTab" class="tab-btn">Panel Radiator</button> <button onclick="showCastIronSections()" id="castIronTab" class="tab-btn">Cast Iron Sections</button> <button onclick="showSystemAndGlycol()" id="glycolTab" class="tab-btn">System & Glycol</button> </div> <form id="calculatorForm"> <!-- Basic Mode --> <div id="basicMode" style="display: block;"> <div class="form-group"> <label for="length">Enter Length (cm):</label> <input type="number" id="length" placeholder="Enter length in cm"> </div> <div class="form-group"> <label for="height">Enter Height (cm):</label> <input type="number" id="height" placeholder="Enter height in cm"> </div> <div class="form-group"> <label for="effectiveDepth">Enter Effective Depth (cm):</label> <input type="number" id="effectiveDepth" placeholder="Enter effective depth in cm"> </div> <button type="button" class="calculate-btn" onclick="calculateWaterVolume()">Calculate</button> </div> <!-- Panel Radiator Mode --> <div id="panelMode" style="display: none;"> <div class="form-group"> <label for="radiatorLength">Enter Radiator Length (cm):</label> <input type="number" id="radiatorLength" placeholder="Enter radiator length in cm"> </div> <div class="form-group"> <label for="radiatorType">Select Radiator Type:</label> <select id="radiatorType"> <option value="0.70">4-column 450 mm — 0.70 L/section</option> <option value="0.88">4-column 600 mm — 0.88 L/section</option> <option value="1.00">4-column 750 mm — 1.00 L/section</option> <option value="1.14">4-column 900 mm — 1.14 L/section</option> <option value="1.00">6-column 450 mm — 1.00 L/section</option> <option value="1.20">6-column 600 mm — 1.20 L/section</option> <option value="1.098">Cast iron 4-column 38 in — 1.098 L/section</option> <option value="1.10">Generic cast iron section — 1.10 L/section</option> </select> </div> <button type="button" class="calculate-btn" onclick="calculatePanelRadiator()">Calculate</button> </div> <!-- Cast Iron Sections Mode --> <div id="castIronMode" style="display: none;"> <div class="form-group"> <label for="radiatorModel">Select Radiator Model:</label> <select id="radiatorModel"> <option value="0.70">4-column 450 mm — 0.70 L/section</option> <option value="0.88">4-column 600 mm — 0.88 L/section</option> <option value="1.00">4-column 750 mm — 1.00 L/section</option> <option value="1.14">4-column 900 mm — 1.14 L/section</option> <option value="1.00">6-column 450 mm — 1.00 L/section</option> <option value="1.20">6-column 600 mm — 1.20 L/section</option> <option value="1.098">Cast iron 4-column 38 in — 1.098 L/section</option> <option value="1.10">Generic cast iron section — 1.10 L/section</option> </select> </div> <div class="form-group"> <label for="numberOfSections">Enter Number of Sections:</label> <input type="number" id="numberOfSections" placeholder="Enter number of sections"> </div> <button type="button" class="calculate-btn" onclick="calculateCastIronVolume()">Calculate</button> </div> <!-- System & Glycol Mode --> <div id="glycolMode" style="display: none;"> <div class="form-group"> <label for="systemVolume">If known, enter total liters (system volume):</label> <input type="number" id="systemVolume" placeholder="Enter total system volume"> </div> <div class="form-group"> <label for="pipeSize">Select Pipe Size:</label> <select id="pipeSize"> <option value="0.0121">1/2 in — 0.0121 US gal/ft</option> <option value="0.0252">3/4 in — 0.0252 US gal/ft</option> <option value="0.0429">1 in — 0.0429 US gal/ft</option> </select> </div> <div class="form-group"> <label for="pipeLength">Enter Pipe Length (ft):</label> <input type="number" id="pipeLength" placeholder="Enter pipe length in feet"> </div> <div class="form-group"> <label for="glycolType">Select Glycol Type:</label> <select id="glycolType"> <option value="propylene">Propylene Glycol (typical for hydronic heating)</option> <option value="ethylene">Ethylene Glycol</option> </select> </div> <div class="form-group"> <label for="glycolConcentration">Enter Glycol Concentration (%):</label> <input type="number" id="glycolConcentration" placeholder="Enter glycol concentration"> </div> <button type="button" class="calculate-btn" onclick="calculateSystemVolume()">Calculate</button> </div> <!-- Result Section --> <div id="result" class="result" style="display: none;"> <p id="calculatedVolume">Calculated Water Volume: </p> <p class="formula">Formula: </p> <p id="calculationDetails">Calculation: </p> </div> </form> </div> <script> // JavaScript functions for tab switching and calculation (same as your original code) </script> </body> </html> <p></p> <script>const FRAME_ID = "toolpress-frame-165";</script><script>(function(){function sendHeight(){var h=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight,document.documentElement.offsetHeight,document.body.offsetHeight);parent.postMessage({type:'toolpressEmbedHeight',id:FRAME_ID,height:h},'*');}window.addEventListener('load',sendHeight);window.addEventListener('resize',sendHeight);document.addEventListener('input',function(){setTimeout(sendHeight,50);});document.addEventListener('click',function(){setTimeout(sendHeight,50);});setTimeout(sendHeight,60);setTimeout(sendHeight,300);setTimeout(sendHeight,900);})();</script></body></html>