var currentPaneStyle = 0; var currentTab = 0; function tabstrip() { this.tabs = new Array(); this.add = addTab; this.write = writeTabstrip; } function tab(caption,content) { this.setId = setId; this.caption = caption; this.content = content; this.write = writeTab; this.writeContent = writePane; } function addTab(tab) { tab.setId("tab" + this.tabs.length); this.tabs[this.tabs.length] = tab; } function setId(id) { this.id = id; } function initiate() { var div = document.getElementById("tab0"); showPane(div); } function showPane(div) { if(currentTab != 0) { currentTab.style.backgroundColor = "#999999"; } div.style.backgroundColor = "#ffffff"; currentTab = div; if(currentPaneStyle != 0) currentPaneStyle.display = "none"; var paneId = "pn_" + div.id; var objPaneStyle = document.getElementById(paneId).style; objPaneStyle.display = "block"; currentPaneStyle = objPaneStyle; } function SubmitForm() { window.alert("Form submitted. This would normally take you to another page"); // normally, you would here check the form and submit it. // if the form has the name 'tabform', then it is submitted // with tabform.submit(); } function writePane() { document.write("