{"id":1278,"date":"2025-10-10T14:09:04","date_gmt":"2025-10-10T14:09:04","guid":{"rendered":"http:\/\/selectairsystemsinccom.local\/?page_id=1278"},"modified":"2025-10-21T14:29:26","modified_gmt":"2025-10-21T14:29:26","slug":"single-curb-spec-sheet","status":"publish","type":"page","link":"https:\/\/selectairsystemsinc.com\/selectwp\/roof-curbs\/single-curb-spec-sheet\/","title":{"rendered":"Single Curb Spec Sheet"},"content":{"rendered":"\n<div id=\"roofcurb-specsheet\">\n  <h2>Roof Curb Spec Sheet Generator<\/h2>\n\n  <!-- LIVE PREVIEW DIV -->\n  <div id=\"livePreview\" style=\"display:flex; justify-content:center; margin-bottom:20px;\">\n    <img decoding=\"async\" id=\"previewImg\" src=\"\" style=\"max-width:50%; width:auto; height:auto; display:none; border:1px solid #ccc; padding:5px; box-sizing:border-box;\">\n  <\/div>\n\n  <div class=\"input-row\">\n    <label for=\"curbType\">Curb Type:<\/label>\n    <select id=\"curbType\">\n      <option value=\"\">&#8212; Select &#8212;<\/option>\n      <option value=\"StandardFlat\">Standard Flat<\/option>\n      <option value=\"StandardPitched\">Standard Pitched<\/option>\n      <option value=\"exhaustFlatHinged\">Exhaust Flat &#038; Hinged<\/option>\n      <option value=\"exhaustPitchedHinged\">Exhaust Pitched &#038; Hinged<\/option>\n    <\/select>\n  <\/div>\n\n  <div class=\"input-row\" id=\"tSquareWrapper\" style=\"display:none;\">\n    <label for=\"tSquare\">T-Square (inches):<\/label>\n    <input type=\"number\" id=\"tSquare\" min=\"1\">\n  <\/div>\n\n  <div class=\"input-row\" id=\"pitchWrapper\" style=\"display:none;\">\n    <label for=\"pitch\">Pitch (on 12):<\/label>\n    <input type=\"number\" id=\"pitch\" min=\"0\" max=\"12\">\n  <\/div>\n\n  <div class=\"input-row\" id=\"curbODWrapper\">\n    <label for=\"curbOD\">Curb OD (inches):<\/label>\n    <input type=\"number\" id=\"curbOD\" min=\"1\">\n  <\/div>\n\n  <div class=\"input-row\">\n    <label for=\"curbHeight\">Curb Height (10\u201336 in):<\/label>\n    <input type=\"number\" id=\"curbHeight\" min=\"10\" max=\"36\">\n  <\/div>\n\n  <button id=\"generateBtn\">Generate Spec Sheet<\/button>\n<\/div>\n\n<style>\n  .input-row {\n    display: flex;\n    flex-wrap: wrap;\n    align-items: center;\n    margin-bottom: 10px;\n  }\n\n  .input-row label {\n    flex: 0 0 150px;\n    margin-right: 10px;\n  }\n\n  .input-row input,\n  .input-row select {\n    flex: 1 1 200px;\n    min-width: 100px;\n  }\n\n  @media (max-width: 600px) {\n    #previewImg {\n      max-width: 90%;\n    }\n    .input-row label {\n      flex: 0 0 100%;\n      margin-bottom: 4px;\n    }\n    .input-row input,\n    .input-row select {\n      flex: 1 0 100%;\n    }\n  }\n\n  @media print {\n    #generateBtn, .input-row, #livePreview {\n      display: none !important;\n    }\n    body {\n      margin: 0;\n      padding: 0;\n    }\n  }\n<\/style>\n\n<script>\nconst curbTemplates = {\n  StandardFlat: \"https:\/\/selectairsystemsinc.com\/selectwp\/wp-content\/uploads\/2025\/10\/Flat.png\",\n  StandardPitched: \"https:\/\/selectairsystemsinc.com\/selectwp\/wp-content\/uploads\/2025\/10\/Pitched.png\",\n  exhaustFlatHinged: \"https:\/\/selectairsystemsinc.com\/selectwp\/wp-content\/uploads\/2025\/10\/Flat-Hinged.png\",\n  exhaustPitchedHinged: \"https:\/\/selectairsystemsinc.com\/selectwp\/wp-content\/uploads\/2025\/10\/Pitched-Hinged.png\"\n};\n\nconst curbTypeEl = document.getElementById(\"curbType\");\nconst curbODEl = document.getElementById(\"curbOD\");\nconst curbODWrapper = document.getElementById(\"curbODWrapper\");\nconst curbHeightEl = document.getElementById(\"curbHeight\");\nconst tSquareEl = document.getElementById(\"tSquare\");\nconst tSquareWrapper = document.getElementById(\"tSquareWrapper\");\nconst pitchWrapper = document.getElementById(\"pitchWrapper\");\nconst pitchEl = document.getElementById(\"pitch\");\nconst previewImg = document.getElementById(\"previewImg\");\n\nlet curbODValue = \"\";\n\ncurbTypeEl.addEventListener(\"change\", function() {\n  const type = this.value;\n\n  \/\/ Live preview\n  if(type && curbTemplates[type]){\n    previewImg.src = curbTemplates[type];\n    previewImg.style.display = \"inline-block\";\n  } else {\n    previewImg.src = \"\";\n    previewImg.style.display = \"none\";\n  }\n\n  \/\/ Hinged curbs logic\n  if(type === \"exhaustFlatHinged\" || type === \"exhaustPitchedHinged\") {\n    tSquareWrapper.style.display = \"block\";\n    curbODWrapper.style.display = \"none\";\n  } else {\n    tSquareWrapper.style.display = \"none\";\n    curbODWrapper.style.display = \"flex\";\n    curbODEl.value = \"\";\n  }\n\n  \/\/ Pitched logic\n  if(type === \"StandardPitched\" || type === \"exhaustPitchedHinged\") {\n    pitchWrapper.style.display = \"block\";\n    pitchEl.value = \"\";\n  } else {\n    pitchWrapper.style.display = \"none\";\n    pitchEl.value = \"\";\n  }\n});\n\ntSquareEl.addEventListener(\"input\", function() {\n  const type = curbTypeEl.value;\n  if(type === \"exhaustFlatHinged\" || type === \"exhaustPitchedHinged\") {\n    const tsq = parseFloat(this.value);\n    curbODValue = !isNaN(tsq) ? (tsq - 1).toFixed(2) : \"\";\n  }\n});\n\n\/\/ --------- New Header Function ---------\nfunction getSpecSheetHeader(titleText = \"Roof Curb Spec Sheet\") {\n  return `\n    <div style=\"position:relative; padding-bottom:10px; border-bottom:2px solid #000; margin-bottom:20px;\">\n      <img decoding=\"async\" src=\"https:\/\/selectairsystemsinc.com\/selectwp\/wp-content\/uploads\/2025\/10\/SELECT-AIR-SYSTEMS-LOGO-black-on-white.jpg\"\n           alt=\"Logo\" style=\"position:absolute; top:0; left:0; height:50px;\">\n      <h2 style=\"text-align:center; margin:0;\">${titleText}<\/h2>\n    <\/div>\n  `;\n}\n\/\/ --------------------------------------\n\ndocument.getElementById(\"generateBtn\").addEventListener(\"click\", function() {\n  const type = curbTypeEl.value;\n  let curbOD = (curbODWrapper.style.display === \"none\") ? curbODValue : curbODEl.value;\n  const curbHeight = curbHeightEl.value;\n  const pitch = pitchEl.value;\n  const tSquareValue = tSquareEl.value;\n\n  if(!type || !curbHeight) {\n    alert(\"Please fill out all required fields.\");\n    return;\n  }\n\n  const templateImg = curbTemplates[type] || \"\";\n\n  const modelMap = {\n    StandardFlat: \"Model RC\",\n    StandardPitched: \"Model RC-P\",\n    exhaustFlatHinged: \"Model RC-H\",\n    exhaustPitchedHinged: \"Model RC-P-H\"\n  };\n  const model = modelMap[type] || type;\n\n  let standardFeatures = [\n    \"18 ga. galvanized steel\",\n    \"All welded, weatherproof construction\",\n    \"Self flashing curb base\"\n  ];\n  let optionalFeatures = [\n    \"Fiberglass insulation\",\n    \"Hinged curb\",\n    \"Corrugated roof curb\",\n    \"Interior metal liner\"\n  ];\n\n  if(type === \"exhaustFlatHinged\" || type === \"exhaustPitchedHinged\") {\n    if(!standardFeatures.includes(\"Hinged\")) standardFeatures.push(\"Hinged\");\n    optionalFeatures = optionalFeatures.filter(f => f !== \"Hinged curb\");\n  }\n\n  let pitchRow = pitch ? `<tr><th style=\"text-align:left;\">Pitch<\/th><td>${pitch} on 12<\/td><\/tr>` : '';\n  let tSquareRow = (tSquareValue && (type === \"exhaustFlatHinged\" || type === \"exhaustPitchedHinged\"))\n                    ? `<tr><th style=\"text-align:left;\">T-Square<\/th><td>${tSquareValue} in<\/td><\/tr>` : '';\n  let hingeRow = (tSquareValue && (type === \"exhaustFlatHinged\" || type === \"exhaustPitchedHinged\"))\n                    ? `<tr><th style=\"text-align:left;\">Hinge<\/th><td>${(parseFloat(tSquareValue) - 0.5).toFixed(2)} in<\/td><\/tr>` : '';\n\n  const sheet = `\n    <html>\n      <head>\n        <style>\n          body { font-family: Arial; margin:0; padding:0; }\n          table { border-collapse: collapse; width:100%; text-align:left; margin-bottom:20px; }\n          th, td { border:1px solid #ccc; padding:6px; }\n          ul { margin-bottom:16px; }\n          @media print { button { display: none !important; } }\n        <\/style>\n      <\/head>\n      <body>\n        <div style=\"max-width:800px; margin:auto; padding:20px;\">\n          ${getSpecSheetHeader(\"Roof Curb Spec Sheet\")}\n\n          <table>\n            <tr><th>Model<\/th><td>${model}<\/td><\/tr>\n            <tr><th>Curb OD<\/th><td>${curbOD} in<\/td><\/tr>\n            <tr><th>Curb Height<\/th><td>${curbHeight} in<\/td><\/tr>\n            ${pitchRow}\n            ${tSquareRow}\n            ${hingeRow}\n          <\/table>\n\n          <h3>Standard Features<\/h3>\n          <ul>${standardFeatures.map(f => `<li>${f}<\/li>`).join(\"\")}<\/ul>\n\n          <h3>Optional Features<\/h3>\n          <ul>${optionalFeatures.map(f => `<li>${f}<\/li>`).join(\"\")}<\/ul>\n\n          ${templateImg ? `<div style=\"text-align:center; margin-top:20px;\">\n            <img decoding=\"async\" src=\"${templateImg}\" style=\"max-width:600px; height:auto;\">\n          <\/div>` : \"\"}\n\n          <div style=\"text-align:center; margin-top:20px;\">\n            <button onclick=\"window.print()\" style=\"padding:8px 16px;\">Print<\/button>\n          <\/div>\n        <\/div>\n      <\/body>\n    <\/html>\n  `;\n\n  const win = window.open(\"\", \"_blank\", \"width=900,height=1000,scrollbars=yes\");\n  win.document.write(sheet);\n  win.document.close();\n});\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"<p>Roof Curb Spec Sheet Generator Curb Type: &#8212; Select &#8212;Standard FlatStandard PitchedExhaust Flat &#038; HingedExhaust Pitched &#038; Hinged T-Square (inches): Pitch (on 12): Curb OD (inches): Curb Height (10\u201336 in): Generate Spec Sheet<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":34,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1278","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/selectairsystemsinc.com\/selectwp\/wp-json\/wp\/v2\/pages\/1278","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/selectairsystemsinc.com\/selectwp\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/selectairsystemsinc.com\/selectwp\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/selectairsystemsinc.com\/selectwp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/selectairsystemsinc.com\/selectwp\/wp-json\/wp\/v2\/comments?post=1278"}],"version-history":[{"count":2,"href":"https:\/\/selectairsystemsinc.com\/selectwp\/wp-json\/wp\/v2\/pages\/1278\/revisions"}],"predecessor-version":[{"id":1525,"href":"https:\/\/selectairsystemsinc.com\/selectwp\/wp-json\/wp\/v2\/pages\/1278\/revisions\/1525"}],"up":[{"embeddable":true,"href":"https:\/\/selectairsystemsinc.com\/selectwp\/wp-json\/wp\/v2\/pages\/34"}],"wp:attachment":[{"href":"https:\/\/selectairsystemsinc.com\/selectwp\/wp-json\/wp\/v2\/media?parent=1278"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}