function btnAdd_AddDriveModel() { //If NOT: "... and finally a Firmware." if (document.all.selFirmwares.options[document.all.selFirmwares.selectedIndex].value != 0) { oNewTH = document.createElement("TH"); oNewTH.innerHTML = document.all.lbManufacturers.options[document.all.lbManufacturers.selectedIndex].text + "
" + document.all.selDriveModels.options[document.all.selDriveModels.selectedIndex].text + ": " + document.all.selFirmwares.options[document.all.selFirmwares.selectedIndex].text; oNewTH.style.cursor = "hand"; oNewTH.title = "Press to add to removal Queue"; oNewTH.onmouseover = likeLink; oNewTH.onmouseout = notLikeLink; oNewTH.onclick = addToSpanRemove; oTHRow = document.all.tblResults.tHead.rows(0); if (oTHRow.cells.length <= 1) // replace "caption" on first TH addition... { document.all.capResults_1.style.visibility = "hidden"; document.all.capResults_2.style.visibility = "visible"; }; if ( !existsInCollection(oTHRow.cells, oNewTH) ) { oTHRow.appendChild(oNewTH); // document.all.tblFetchResults.style.visibility = "visible"; }; } else alert( "Please first select a Firmware version" ); }; function existsInCollection(varCollection, varItem) { for (var i = 0; i <= varCollection.length - 1; i++) { if (varCollection(i).innerText == varItem.innerText) return true; }; return false; }; function addToSpanRemove() { document.all.spanRemove.innerText = event.srcElement.innerText; document.all.btnRemove.disabled = false; }; function likeLink() { event.srcElement.style.textDecoration = "underline"; event.srcElement.style.color = "blue"; }; function notLikeLink() { event.srcElement.style.textDecoration = "none"; event.srcElement.style.color = "black"; };