Aircraft Component Repair & Overhaul Services



Papa.parse(csvUrl, { download: true, header: true, skipEmptyLines: true, complete: function(results) { allRows = results.data; headers = results.meta.fields; } });

function doSearch() { const query = document.getElementById("searchInput").value.toLowerCase(); const filtered = allRows.filter(row => { return Object.values(row).some(val => val && val.toLowerCase().includes(query) ); });

const tableContainer = document.getElementById("table-container"); const thead = document.getElementById("tableHead"); const tbody = document.getElementById("tableBody"); thead.innerHTML = ""; tbody.innerHTML = "";

if (filtered.length === 0) { tableContainer.style.display = "none"; return; }

const headerRow = document.createElement("tr"); headers.forEach(h => { const th = document.createElement("th"); th.textContent = h; th.style.border = "1px solid #ddd"; th.style.padding = "8px"; headerRow.appendChild(th); }); thead.appendChild(headerRow);

const maxRows = 10; const toDisplay = filtered.slice(0, maxRows);

toDisplay.forEach(row => { const tr = document.createElement("tr"); headers.forEach(key => { const td = document.createElement("td"); td.textContent = row[key] || ''; td.style.border = "1px solid #ddd"; td.style.padding = "8px"; tr.appendChild(td); }); tbody.appendChild(tr); });

if (filtered.length > maxRows) { const tr = document.createElement("tr"); const td = document.createElement("td"); td.setAttribute("colspan", headers.length); td.style.color = "red"; td.style.fontWeight = "bold"; td.style.padding = "8px"; td.innerHTML = 'For Repair and OH please contact: Phone: (902)-628-8846 | Fax: (902)-628-8838 . Send an email to us.'; tr.appendChild(td); tbody.appendChild(tr); }

tableContainer.style.display = "block"; }